flutter_meedu 4.0.0+1 copy "flutter_meedu: ^4.0.0+1" to clipboard
flutter_meedu: ^4.0.0+1 copied to clipboard

outdated

A simple State Managment, Dependency Injection, Reactive programming and Navigation for Flutter apps.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_meedu/meedu.dart';
import 'package:flutter_meedu/router.dart' as router;
import 'package:flutter_meedu/state.dart';
import 'package:meedu_example/pages/counter_page.dart';
import 'package:meedu_example/pages/login_page.dart';

import 'routes/pages.dart';
import 'routes/routes.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  router.setDefaultTransition(router.Transition.fadeIn);
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      navigatorKey: router.navigatorKey,
      //  themeMode: controller.themeMode,
      theme: ThemeData.light(),
      darkTheme: ThemeData.dark(),
      home: LoginPage(),
      // navigatorObservers: [
      //   router.observer,
      // ],
      // routes: Pages.routes,
    );
  }
}

class AppThemeController extends SimpleNotifier {
  bool _darkMode = false;
  bool get darkMode => _darkMode;

  ThemeMode get themeMode => _darkMode ? ThemeMode.dark : ThemeMode.light;

  void onToggleTheme(bool enabled) {
    _darkMode = enabled;
    notify();
  }
}
135
likes
0
pub points
83%
popularity

Publisher

verified publishermeedu.app

A simple State Managment, Dependency Injection, Reactive programming and Navigation for Flutter apps.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

flutter, meedu

More

Packages that depend on flutter_meedu