flutter_heyteacher_views 3.0.0+142 copy "flutter_heyteacher_views: ^3.0.0+142" to clipboard
flutter_heyteacher_views: ^3.0.0+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: (_, asyncSnapshot) => MaterialApp.router(
      theme: ThemeViewModel.instance.lightTheme,
      darkTheme: ThemeViewModel.instance.darkTheme,
      themeMode: asyncSnapshot.data?.themeMode,
      title: 'Flutter Demo',
      localizationsDelegates: const [],
      routerConfig: AppRouter.instance.router,
      debugShowCheckedModeBanner: false,
    ),
  );
}
0
likes
0
points
37
downloads

Documentation

Documentation

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

unknown (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