stacked_cli 1.4.1-beta.0 stacked_cli: ^1.4.1-beta.0 copied to clipboard
The official dev tools for the Stacked Framework
import 'package:flutter/material.dart';
import 'package:example/app/app.bottomsheets.dart';
import 'package:example/app/app.dialogs.dart';
import 'package:example/app/app.locator.dart';
import 'package:example/app/app.router.dart';
import 'package:example/ui/common/app_colors.dart';
import 'package:stacked_services/stacked_services.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,
navigatorObservers: [
StackedService.routeObserver,
],
);
}
}