|
|
|
@ -2,6 +2,7 @@ import 'package:akuCommunity/pages/tab_navigator.dart';
|
|
|
|
|
import 'package:akuCommunity/provider/user_provider.dart';
|
|
|
|
|
import 'package:amap_map_fluttify/amap_map_fluttify.dart';
|
|
|
|
|
import 'package:ani_route/ani_route.dart';
|
|
|
|
|
import 'package:bot_toast/bot_toast.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:fluwx/fluwx.dart';
|
|
|
|
@ -11,7 +12,6 @@ import 'package:akuCommunity/provider/cart.dart';
|
|
|
|
|
import 'package:flutter_picker/flutter_picker.dart';
|
|
|
|
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
|
|
|
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
|
|
|
|
import 'package:oktoast/oktoast.dart';
|
|
|
|
|
import 'package:akuCommunity/routers/router_init.dart';
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
@ -43,38 +43,31 @@ class _MyAppState extends State<MyApp> {
|
|
|
|
|
ChangeNotifierProvider(create: (context) => CartProvidde()),
|
|
|
|
|
ChangeNotifierProvider(create: (context) => UserProvider()),
|
|
|
|
|
],
|
|
|
|
|
child: OKToast(
|
|
|
|
|
textStyle: TextStyle(fontSize: 19.0, color: Colors.white),
|
|
|
|
|
backgroundColor: Colors.grey,
|
|
|
|
|
radius: 10.0,
|
|
|
|
|
animationCurve: Curves.easeIn,
|
|
|
|
|
animationBuilder: Miui10AnimBuilder(),
|
|
|
|
|
animationDuration: Duration(milliseconds: 200),
|
|
|
|
|
duration: Duration(seconds: 3),
|
|
|
|
|
child: GetMaterialApp(
|
|
|
|
|
title: '智慧社区',
|
|
|
|
|
// builder: BotToastInit(),
|
|
|
|
|
// navigatorObservers: [BotToastNavigatorObserver()],
|
|
|
|
|
navigatorKey: RouterInit.navigatorKey,
|
|
|
|
|
onGenerateRoute: RouterInit.router.generator,
|
|
|
|
|
debugShowCheckedModeBanner: false,
|
|
|
|
|
theme: ThemeData(
|
|
|
|
|
primarySwatch: Colors.yellow,
|
|
|
|
|
visualDensity: VisualDensity.adaptivePlatformDensity,
|
|
|
|
|
),
|
|
|
|
|
// home: TabNavigator(),
|
|
|
|
|
home: TabNavigator(),
|
|
|
|
|
//国际化支持
|
|
|
|
|
localizationsDelegates: [
|
|
|
|
|
PickerLocalizationsDelegate.delegate,
|
|
|
|
|
RefreshLocalizations.delegate,
|
|
|
|
|
GlobalMaterialLocalizations.delegate,
|
|
|
|
|
GlobalWidgetsLocalizations.delegate,
|
|
|
|
|
GlobalCupertinoLocalizations.delegate,
|
|
|
|
|
],
|
|
|
|
|
supportedLocales: [const Locale('zh', 'CH')],
|
|
|
|
|
locale: Locale('zh'),
|
|
|
|
|
child: GetMaterialApp(
|
|
|
|
|
title: '智慧社区',
|
|
|
|
|
// builder: BotToastInit(),
|
|
|
|
|
// navigatorObservers: [BotToastNavigatorObserver()],
|
|
|
|
|
navigatorKey: RouterInit.navigatorKey,
|
|
|
|
|
onGenerateRoute: RouterInit.router.generator,
|
|
|
|
|
debugShowCheckedModeBanner: false,
|
|
|
|
|
theme: ThemeData(
|
|
|
|
|
primarySwatch: Colors.yellow,
|
|
|
|
|
visualDensity: VisualDensity.adaptivePlatformDensity,
|
|
|
|
|
),
|
|
|
|
|
// home: TabNavigator(),
|
|
|
|
|
home: TabNavigator(),
|
|
|
|
|
//国际化支持
|
|
|
|
|
localizationsDelegates: [
|
|
|
|
|
PickerLocalizationsDelegate.delegate,
|
|
|
|
|
RefreshLocalizations.delegate,
|
|
|
|
|
GlobalMaterialLocalizations.delegate,
|
|
|
|
|
GlobalWidgetsLocalizations.delegate,
|
|
|
|
|
GlobalCupertinoLocalizations.delegate,
|
|
|
|
|
],
|
|
|
|
|
supportedLocales: [const Locale('zh', 'CH')],
|
|
|
|
|
locale: Locale('zh'),
|
|
|
|
|
builder: BotToastInit(),
|
|
|
|
|
navigatorObservers: [BotToastNavigatorObserver()],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|