Flutter-இன் theming system உங்களை consistent visual styling (colors, fonts, component styles) app முழுதும் define செய்ய அனுமதிக்கிறது, light/dark themes-க்கான support உடன். Themes மூலம் styling ஐ centralize செய்வது consistency உறுதி செய்கிறது மற்றும் apps ஐ easily restyle செய்ய உதவுகிறது.
Theme define செய்தல்
// 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)
)
