queen_themes 0.0.1 copy "queen_themes: ^0.0.1" to clipboard
queen_themes: ^0.0.1 copied to clipboard

discontinuedreplaced by: queen

queen support for multiple themes in flutter

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:queen_themes/queen_themes.dart';

void main() {
  QTheme.boot(AppThemesConfig());
  runApp(const MyApp());
}

class AppThemesConfig extends QThemeConfig {
  @override
  List<ThemeData> get themes => [
        ThemeData.dark(),
        ThemeData(
          scaffoldBackgroundColor: Colors.yellow,
        ),
        ThemeData.light(),
        ThemeData(
          scaffoldBackgroundColor: Colors.red,
        ),
      ];
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return QThemeBuilder(
      builder: (ctx) => MaterialApp(
        theme: QTheme.current,
        home: Scaffold(
          floatingActionButton: FloatingActionButton(
            onPressed: () => QTheme.next(),
            child: const Icon(Icons.add),
          ),
          body: Center(
            child: Text(
              QTheme.currentIndex.toString(),
              style: Theme.of(context).textTheme.headline1,
            ),
          ),
          appBar: AppBar(
            title: const Text('👑 Queen Themes'),
          ),
        ),
      ),
    );
  }
}
6
likes
140
points
3
downloads

Publisher

unverified uploader

Weekly Downloads

queen support for multiple themes in flutter

Homepage
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, shared_preferences

More

Packages that depend on queen_themes