custom_theme_controller

Creator: coderz1093

Last updated:

0 purchases

custom_theme_controller Image
custom_theme_controller Images

Languages

Categories

Add to Cart

Description:

custom theme controller

Features #

It is use to switch the between light and dark theme in the app.
Used GetX State Management tool in it.

Getting started #

Add the dependency in the pubspec.yml
Add the GetX dependency in the pubspec.yml

Usage #
class MyApp extends StatelessWidget {
MyApp({super.key});
final themeController = Get.put(ThemeController());

@override
Widget build(BuildContext context) {
return Obx(() => MaterialApp(
theme: themeController.isDarkMode.value ? AppTheme.darkTheme : AppTheme.lightTheme,
home: HomePage(),
)
);
}
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.