flutter_slick 2.2.3 flutter_slick: ^2.2.3 copied to clipboard
Slick patterns for Flutter.
import 'package:flutter/material.dart';
import 'package:flutter_slick/navigation/logic.dart';
import 'package:provider/provider.dart';
import 'application.dart';
import 'paths/root.dart' as root_paths;
import 'screens/initial.dart';
import 'screens/not_found.dart';
import 'services/mock_authentication.dart';
void main() {
runApp(
MultiProvider(
providers: [
Provider<MockAuthenticationService>(
lazy: false,
create: (context) {
return MockAuthenticationService();
},
),
ChangeNotifierProvider<NavigationLogic>(
lazy: false,
create: (context) {
return NavigationLogic(
context: context,
initialScreen: () => const InitialScreen(),
notFoundScreen: () => const NotFoundScreen(),
rootPath: root_paths.root,
authState:
Provider.of<MockAuthenticationService>(context, listen: false)
.authState,
);
},
),
],
child: const Application(),
),
);
}