first commit
This commit is contained in:
25
moehu/moehu_fontend/lib/router/AppNode.dart
Normal file
25
moehu/moehu_fontend/lib/router/AppNode.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
|
||||
/*
|
||||
* 根组件
|
||||
*/
|
||||
class AppNode extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ScreenUtilInit(
|
||||
designSize: Size(375, 667),
|
||||
// allowFontScaling: false,
|
||||
builder: () => MaterialApp(
|
||||
initialRoute: "/",
|
||||
navigatorKey: Modular.navigatorKey,
|
||||
onGenerateRoute: Modular.generateRoute,
|
||||
debugShowCheckedModeBanner: false,
|
||||
builder: BotToastInit(), //1. call BotToastInit
|
||||
navigatorObservers: [BotToastNavigatorObserver()],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user