Flutterは、Material(GoogleのMaterial Design、Androidスタイル)とCupertino(iOSスタイル)の2つの主要なデザインシステムをウィジェットセットとして提供します。これらにより、各プラットフォームのデザイン言語に合致するUI、または一貫したカスタム外観を構築できます。
Materialウィジェット(Material Design)
// Material widgets follow Google's Material Design (Android look, but usable anywhere)
MaterialApp( // the app root for Material apps
home: Scaffold( // Material page structure
appBar: AppBar(title: Text('Material')),
body: Center(
child: ElevatedButton( // Material button
onPressed: () {},
child: Text('Material Button'),
),
),
floatingActionButton: FloatingActionButton(onPressed: () {}),
),
)
// Material widgets: Scaffold, AppBar, ElevatedButton, Card, FloatingActionButton, etc.
