Skip to content

Instantly share code, notes, and snippets.

@vijayinyoutube
Created March 27, 2020 17:31
Embed
What would you like to do?
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: MyPage(),
);
}
}
class MyPage extends StatefulWidget {
@override
_MyPageState createState() => _MyPageState();
}
class _MyPageState extends State<MyPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
child: Padding(
padding: EdgeInsets.only(top: 100),
child: Wrap(
spacing: 10,
runSpacing: 10,
direction: Axis.horizontal,
children: <Widget>[
FlatButton(
color: Colors.red,
child: Text("Button"),
onPressed: () {},
),
FlatButton(
color: Colors.red,
child: Text("Button"),
onPressed: () {},
),
FlatButton(
color: Colors.red,
child: Text("Button"),
onPressed: () {},
),
FlatButton(
color: Colors.red,
child: Text("Button"),
onPressed: () {},
),
],
),
),
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment