deferred_helper 0.0.3 deferred_helper: ^0.0.3 copied to clipboard
A plugin to help manage deferred content of a flutter ap
import 'package:deferred_helper/deferred_helper.dart';
import 'package:example/directory.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
final deferredController = DeferredController();
MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: "FlockUp",
// Navigator.defaultRouteName,
onGenerateInitialRoutes: (initialRouteName) {
return [
Dir.routes(
RouteSettings(name: Dir.deferredRoute.path), deferredController),
];
},
onGenerateRoute: (settings) {
return Dir.routes(settings, deferredController);
},
);
}
}