tako_dynamic_theme

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

tako dynamic theme

Tako Dynamic Theme #
Demo #

Getting started #

Add tako_dynamic_theme to your pubspec.yaml.

dependencies:
flutter:
sdk: flutter
tako_dynamic_theme: x.y.z
copied to clipboard

Run flutter pub get in the terminal.

Usage #
This package use key-value to index the ThemeData.
You can wrap your app by TakoDynamicTheme widget.
void main() {
runApp(
TakoDynamicThemeWidget(
themeMap: {
"light": ThemeData.light(),
"dark": ThemeData.dark(),
"night": ThemeConfig.nightTheme // pre-defined ThemeData
},
fallbackTheme: ThemeData.light(),
child: const MyApp()));
}
copied to clipboard
You can change the theme by the following code inside widget.
TakoDynamicTheme.of(context).changeTheme(themeKey: "night"),
copied to clipboard
You can checkout the example in this repository.
cd example
flutter run
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.