Thuta Learning
Flutter
IntermediateMobile Developmentbeginner

Material 3 Theming & Design Tokens

Flutterသင်ခန်းစာ 10

ဒီခန်းပြီးရင် ဘာတတ်သွားမလဲ

  • Material 3 Theming & Design Tokens ရဲ့ widget, state နဲ့ lifecycle behavior ကိုရှင်းပြနိုင်ရန်
  • Responsive, failure နဲ့ interaction cases စမ်းနိုင်ရန်
  • Accessible, testable, performant Flutter code ရေးနိုင်ရန်

Material 3 Theming & Design Tokens ကို widget syntax အဖြစ်သာမမြင်ဘဲ constraints, size, position, rebuild scope, semantics နဲ့ platform adaptation contract အဖြစ်နားလည်ပါ။ Widget tree ကိုသေးသေးခွဲပြီး const widgets, lazy builders နဲ့ responsive constraints ကိုဦးစားပေးပါ။

ပိုပြီးနားလည်ထားရမယ့် အချက်

Material 3 Theming & Design Tokens ကို widget syntax အဖြစ်သာမမြင်ဘဲ constraints, size, position, rebuild scope, semantics နဲ့ platform adaptation contract အဖြစ်နားလည်ပါ။ Widget tree ကိုသေးသေးခွဲပြီး const widgets, lazy builders နဲ့ responsive constraints ကိုဦးစားပေးပါ။

လက်တွေ့မှာ ဘယ်လိုအသုံးချမလဲ

Material 3 Theming & Design Tokens example ကို small/large screen, text scaling, empty/loading/error, rapid interaction, navigation restore နဲ့ disposal cases ဖြင့် run/test လုပ်ပါ။ flutter analyze, widget tests နဲ့ profile mode ကိုလိုအပ်သလိုသုံးပါ။

ဒီသင်ခန်းစာပြီးရင်

dart
import 'package:flutter/material.dart';

void main() => runApp(MaterialApp(
  theme: ThemeData(
    colorScheme: ColorScheme.fromSeed(seedColor: Colors.indigo),
    useMaterial3: true,
  ),
  home: const Scaffold(body: Center(child: FilledButton(onPressed: null, child: Text('Save')))),
));
You should see
Shared color scheme သုံးထားသော Material 3 screen ပေါ်မည်

ကိုယ်တိုင်စမ်းကြည့်ရန်

Material 3 Theming & Design Tokens example ကို small/large screen, text scaling, empty/loading/error, rapid interaction, navigation restore နဲ့ disposal cases ဖြင့် run/test လုပ်ပါ။ flutter analyze, widget tests နဲ့ profile mode ကိုလိုအပ်သလိုသုံးပါ။

Lifecycle/Performance သတိပေးချက်

Screen တစ်မျိုးတွင် sample output မှန်ရုံဖြင့် rebuild, overflow, accessibility, async နဲ့ lifecycle paths အားလုံးမှန်ပြီဟုယူဆခြင်း။

Flutter documentationFlutter

ဒီနေရာမှာ လူအများမှားတတ်တယ်

  • Screen တစ်မျိုးတွင် sample output မှန်ရုံဖြင့် rebuild, overflow, accessibility, async နဲ့ lifecycle paths အားလုံးမှန်ပြီဟုယူဆခြင်း။
  • build() ထဲ expensive work လုပ်ခြင်း၊ controller/subscription မပိတ်ခြင်း သို့ setState ကိုကျယ်သော subtree ပေါ်ခေါ်ခြင်း။

လက်တွေ့လေ့ကျင့်ခန်း

Material 3 Theming & Design Tokens example ကို small/large screen, text scaling, empty/loading/error, rapid interaction, navigation restore နဲ့ disposal cases ဖြင့် run/test လုပ်ပါ။ flutter analyze, widget tests နဲ့ profile mode ကိုလိုအပ်သလိုသုံးပါ။

You'll know it worked when: Shared color scheme သုံးထားသော Material 3 screen ပေါ်မည်

Material 3 Theming & Design Tokens | Thuta Learning