Flutter এর theming সিস্টেম আপনাকে consistent visual styling (রঙ, fonts, component styles) সংজ্ঞায়িত করতে দেয় যা পুরো app জুড়ে প্রয়োগ হয়, light/dark themes এর সাপোর্ট সহ। Theming এর মাধ্যমে styling কেন্দ্রীভূত করা consistency নিশ্চিত করে এবং apps কে পুনরায় style করা সহজ করে তোলে।
একটি theme সংজ্ঞায়িত করা
// define the app's theme in MaterialApp
MaterialApp(
theme: ThemeData( // LIGHT theme
colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue),
textTheme: TextTheme(/* font styles */),
elevatedButtonTheme: /* button styling */,
useMaterial3: true,
),
darkTheme: ThemeData.dark(), // DARK theme
themeMode: ThemeMode.system, // follow the system setting (or .light/.dark)
)
