Skip to content

Instantly share code, notes, and snippets.

@vijayinyoutube
Created March 27, 2020 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vijayinyoutube/4fbc3c0891704a7ded5d9f6b0deb1886 to your computer and use it in GitHub Desktop.
Save vijayinyoutube/4fbc3c0891704a7ded5d9f6b0deb1886 to your computer and use it in GitHub Desktop.
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