Flutter tilbyder to hoveddesignsystemer som widgetsæt: Material (Googles Material Design, Android-stil) og Cupertino (iOS-stil). De lader dig bygge brugerflader, der matcher hver platforms designsprog, eller et konsistent tilpasset look.
Material widgets (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.
