widgetarian 0.0.1-dev.1 copy "widgetarian: ^0.0.1-dev.1" to clipboard
widgetarian: ^0.0.1-dev.1 copied to clipboard

Widgetarian is a UI kit that simplifies common widget usage.

example/lib/main.dart

import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:widgetarian/theme.dart';
import 'pages/routes.dart';

void main() {
  // debugRepaintRainbowEnabled = true;
  runApp(const MyApp());
}

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return ThemePatrol(
      onAvailableChanged: (_) => log('available themes changed'),
      onThemeChanged: (theme) => log('theme changed to ${theme.selected}'),
      onModeChanged: (theme) => log('theme mode changed to ${theme.mode.name}'),
      onColorChanged: (theme) =>
          log('theme color changed to ${theme.color.toString()}'),
      onChanged: (theme) => log('value changed'),
      themes: {
        'basic': ThemeConfig.fromColor(Colors.green),
        'pro': ThemeConfig.fromColor(Colors.red),
        'premium': ThemeConfig.fromColor(Colors.amber),
      },
      // light: ThemeData.light(),
      // dark: ThemeData.dark(),
      builder: (context, theme) {
        return MaterialApp(
          title: 'Widgetarian',
          theme: theme.lightData,
          darkTheme: theme.darkData,
          themeMode: theme.mode,
          initialRoute: '/',
          routes: routes,
        );
      },
    );
  }
}
5
likes
0
pub points
14%
popularity

Publisher

verified publisherwidgetarian.com

Widgetarian is a UI kit that simplifies common widget usage.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on widgetarian