Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- `import 'package:flutter/material.dart';
- void main() => runApp(new MyApp());
- class MyApp extends StatelessWidget {
- // This widget is the root of your application.
- @override
- Widget build(BuildContext context) {
- return new MaterialApp(
- title: 'Flutter Demo',
- home: new MyHomePage(),
- );
- }
- }
- class MyHomePage extends StatefulWidget {
- @override
- _MyHomePageState createState() => new _MyHomePageState();
- }
- class _MyHomePageState extends State<MyHomePage> {
- @override
- Widget build(BuildContext context) {
- return new Scaffold(
- body: Container(
- child: Column(
- children: <Widget>[
- Expanded(
- child: Container(),
- ),
- Row(
- children: <Widget>[
- buildMaterialButton(),
- buildMaterialButton(),
- buildMaterialButton(),
- buildMaterialButton(),
- ],
- ),
- Row(
- children: <Widget>[
- buildMaterialButton(),
- buildMaterialButton(),
- buildMaterialButton(),
- buildMaterialButton(),
- ],
- ),
- Row(
- children: <Widget>[
- buildMaterialButton(),
- buildMaterialButton(),
- buildMaterialButton(),
- buildMaterialButton(),
- ],
- ),
- Row(
- children: <Widget>[
- buildMaterialButton(),
- buildMaterialButton(),
- buildMaterialButton(),
- buildMaterialButton(),
- ],
- ),
- Row(
- children: <Widget>[
- buildMaterialButton(),
- buildMaterialButton(),
- buildMaterialButton(),
- buildMaterialButton(),
- ],
- ),
- ],
- ),
- ),
- );
- }
- Widget buildMaterialButton() {
- return Expanded(
- child: Container(
- decoration: BoxDecoration(
- color: Colors.blueGrey,
- borderRadius: BorderRadius.circular(40.0)
- ),
- child: MaterialButton(
- onPressed: () {},
- child: Padding(
- padding: const EdgeInsets.all(20.0),
- child: Text("1"),
- ),
- ),
- ),
- );
- }
- }`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement