playx_theme 0.0.1+1 copy "playx_theme: ^0.0.1+1" to clipboard
playx_theme: ^0.0.1+1 copied to clipboard

outdated

multi theme features for flutter apps from playx eco system

Playx Theme #

Get Started #

Features 🔥 #

  • no need for BuildContext (you still can access the theme from the context if you need 😉)
  • works out of the box
    • no need to store or load the last used theme by your self

boot the core #

 void main ()async{
 WidgetsFlutterBinding.ensureInitialized();

  /// boot the core
  await PlayXCore.bootCore();

  /// boot the theme
  /// you can provide `XThemeConfig` to add your custom themes
  await AppTheme.boot();

  /// run the real app
  runApp(const MyApp());
}

Wrap Your App With PlayXThemeBuilder #

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return PlayXThemeBuilder(
      builder: (xTheme) {
        return MaterialApp(
          title: 'Flutter Demo',
          theme: xTheme.theme,
          home: const MyHomePage(),
        );
      },
    );
  }
}

Thats it #

use AppTheme facade to switch between themes

1
likes
0
pub points
25%
popularity

Publisher

verified publisherplayx.sourcya.io

multi theme features for flutter apps from playx eco system

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, playx_core

More

Packages that depend on playx_theme