flutter_heyteacher_views 2.1.3+142 copy "flutter_heyteacher_views: ^2.1.3+142" to clipboard
flutter_heyteacher_views: ^2.1.3+142 copied to clipboard

The flutter heyteacher package for views layer containing layout, widgets, theme utilities and routing utilities

example/lib/main.dart

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_heyteacher_views/flutter_heyteacher_views.dart' show ThemeViewModel;
import 'package:flutter_heyteacher_views_example/src/app_router.dart' show AppRouter;

Future<void> main() async {
  // ensureInitialized
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
}

/// This Widget is the main application widget.
class MyApp extends StatelessWidget {
  /// Creates the [MyApp].
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) => StreamBuilder(
    stream: ThemeViewModel.instance.themeStream,
    builder: (_, _) => MaterialApp.router(
      theme: ThemeViewModel.instance.lightTheme,
      darkTheme: ThemeViewModel.instance.darkTheme,
      themeMode: ThemeViewModel.instance.themeMode,
      title: 'Flutter Demo',
      localizationsDelegates: const [],
      routerConfig: AppRouter.instance.router,
    ),
  );
}
0
likes
160
points
37
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

The flutter heyteacher package for views layer containing layout, widgets, theme utilities and routing utilities

Repository
View/report issues

Topics

#flutter #widget #mvvm #theme #route

Funding

Consider supporting this project:

liberapay.com

License

BSD-3-Clause (license)

Dependencies

app_tutorial, cloud_firestore, collection, flutter, flutter_heyteacher_auth, flutter_heyteacher_locale, flutter_heyteacher_platform, go_router, logging, shared_preferences

More

Packages that depend on flutter_heyteacher_views