flutter Scaffoldで使えるWidget
Scaffoldで使えるWidgetを指定してみた。Scaffold使うと以下を簡単に指定できるのか
・appBar : 画面上のバー
・drawer : Drawerメニュー。指定するとappBarの左に勝手にメニューアイコンが表示された
・endDrawer : drawerと同じだけどappBarの右にメニュー表示して右から表示される
・floatingActionButton
・bottomNavigationBar
・bottomSheet : iOSのアクションシートみたいなやつ.これはあとで試す
イメージ

実装
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'MaterialApp Title',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
appBar: AppBar(title: Text("AppBar")),
drawer: Drawer(
child: Center(child: Text("drawer"),)
),
endDrawer: Drawer(
child: Center(child: Text("endDrawer"),)
),
body: Center(child: Text("Hello")),
floatingActionButton: FloatingActionButton.extended(
label: Text("floatingActionButton"),
icon: Icon(Icons.add),
),
persistentFooterButtons: <Widget>[
Text("persistentFooterButtons"),
IconButton(icon: new Icon(Icons.timer)),
IconButton(icon: new Icon(Icons.people)),
],
bottomNavigationBar: BottomAppBar(
child: Container(
height: 50,
child: Center(
child: Text("BottomAppBar"),
),
),
),
)
);
}
}
Drawerイメージ

以上です