easy_dynamic_theme 1.0.0 copy "easy_dynamic_theme: ^1.0.0" to clipboard
easy_dynamic_theme: ^1.0.0 copied to clipboard

outdated

Automatically get your OS defined Theme (Dynamic), force your prefered one (Light / Dark) and persist your choice in the device.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:easy_dynamic_theme/easy_dynamic_theme.dart';
import 'theme.dart';
import 'home.dart';

void main() async {
  runApp(
    EasyDynamicThemeWidget(
      child: MyApp(),
    ),
  );
}

class MyApp extends StatelessWidget {
  final String title = 'EDT - Example';

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: title,
        theme: lightThemeData,
        darkTheme: darkThemeData,
        themeMode: EasyDynamicTheme.of(context).themeMode,
        home: new MyHomePage(
          title: title,
        ));
  }
}
119
likes
30
pub points
92%
popularity

Publisher

verified publisherrlazom.dev

Automatically get your OS defined Theme (Dynamic), force your prefered one (Light / Dark) and persist your choice in the device.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, flutter_web_plugins, shared_preferences

More

Packages that depend on easy_dynamic_theme