stacked_hooks 0.2.4 stacked_hooks: ^0.2.4 copied to clipboard
Classes that help you make use of hooks when using the stacked package
import 'package:flutter/material.dart';
import 'package:stacked_hooks_example/ui/common/app_colors.dart';
import 'package:stacked_hooks_example/ui/setup/setup_bottom_sheet_ui.dart';
import 'package:stacked_hooks_example/ui/setup/setup_dialog_ui.dart';
import 'package:stacked_services/stacked_services.dart';
import 'app/app.locator.dart';
import 'app/app.router.dart';
void main() {
setupLocator();
setupDialogUi();
setupBottomSheetUi();
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: Theme.of(context).copyWith(
primaryColor: kcBackgroundColor,
focusColor: kcPrimaryColor,
textTheme: Theme.of(context).textTheme.apply(
bodyColor: Colors.black,
),
),
initialRoute: Routes.startupView,
onGenerateRoute: StackedRouter().onGenerateRoute,
navigatorKey: StackedService.navigatorKey,
);
}
}