Flutter มีระบบดีไซน์หลักสองระบบในรูปแบบชุด widget: Material (Material Design ของ Google สไตล์ Android) และ Cupertino (สไตล์ iOS) ทั้งสองช่วยให้คุณสร้าง UI ที่เข้ากับภาษาดีไซน์ของแต่ละแพลตฟอร์ม หรือรูปลักษณ์ที่สอดคล้องและกำหนดเองได้
Material widget (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.
