|
|
|
import 'dart:io';
|
|
|
|
import 'dart:ui';
|
|
|
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
import 'package:huixiang/article/hot_article_details_page.dart';
|
|
|
|
import 'package:huixiang/article/hot_article_item.dart';
|
|
|
|
import 'package:huixiang/generated/l10n.dart';
|
|
|
|
import 'package:huixiang/integral/integral_detailed_page.dart';
|
|
|
|
import 'package:huixiang/integral/integral_page.dart';
|
|
|
|
import 'package:huixiang/integral_store/integral_store_details_page.dart';
|
|
|
|
import 'package:huixiang/login/login_page.dart';
|
|
|
|
import 'package:huixiang/message/main_message_page.dart';
|
|
|
|
import 'package:huixiang/message/system_message.dart';
|
|
|
|
import 'package:huixiang/mine/mine_card_invalid_page.dart';
|
|
|
|
import 'package:huixiang/mine/mine_card_page.dart';
|
|
|
|
import 'package:huixiang/mine/mine_vip_level_page.dart';
|
|
|
|
import 'package:huixiang/mine/mine_wallet_page.dart';
|
|
|
|
import 'package:huixiang/mine/recharge_page.dart';
|
|
|
|
import 'package:huixiang/mine/user_info_page.dart';
|
|
|
|
import 'package:huixiang/order/exchange_history_page.dart';
|
|
|
|
import 'package:huixiang/order/exchange_order_page.dart';
|
|
|
|
import 'package:huixiang/order/exchange_order_success_page.dart';
|
|
|
|
import 'package:huixiang/order/exchange_order_detail_page.dart';
|
|
|
|
import 'package:huixiang/order/logistics_information_page.dart';
|
|
|
|
import 'package:huixiang/order/order_detail_page.dart';
|
|
|
|
import 'package:huixiang/order/order_history_page.dart';
|
|
|
|
import 'package:huixiang/order/store_selector_page.dart';
|
|
|
|
import 'package:huixiang/order/write_off_page.dart';
|
|
|
|
import 'package:huixiang/order/write_off_success_page.dart';
|
|
|
|
import 'package:huixiang/setting/about_page.dart';
|
|
|
|
import 'package:huixiang/setting/help_feedback_page.dart';
|
|
|
|
import 'package:huixiang/setting/permission_setting_page.dart';
|
|
|
|
import 'package:huixiang/setting/setting_page.dart';
|
|
|
|
// import 'package:huixiang/ui_test.dart';
|
|
|
|
import 'package:huixiang/union/store_details_page.dart';
|
|
|
|
import 'package:huixiang/union/union_details_page.dart';
|
|
|
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
|
|
|
|
import 'main_page.dart';
|
|
|
|
import 'mine/manage_address_page.dart';
|
|
|
|
import 'mine/roll_center_page.dart';
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
if (Platform.isAndroid) {
|
|
|
|
SystemChrome.setSystemUIOverlayStyle(
|
|
|
|
SystemUiOverlayStyle(statusBarColor: Colors.transparent));
|
|
|
|
}
|
|
|
|
|
|
|
|
runApp(MyApp());
|
|
|
|
}
|
|
|
|
|
|
|
|
class MyApp extends StatelessWidget {
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return ScreenUtilInit(
|
|
|
|
designSize: Size(375, 812),
|
|
|
|
builder: () => MaterialApp(
|
|
|
|
debugShowCheckedModeBanner: false,
|
|
|
|
theme: ThemeData(
|
|
|
|
primarySwatch: Colors.blue,
|
|
|
|
textTheme: TextTheme(
|
|
|
|
button: TextStyle(fontSize: 24.sp),
|
|
|
|
bodyText1: TextStyle(fontSize: 12.sp),
|
|
|
|
bodyText2: TextStyle(fontSize: 16.sp),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
// locale: appLocale.locale,
|
|
|
|
localeResolutionCallback: (locale, supportedLocales) {
|
|
|
|
return Localizations.maybeLocaleOf(context);
|
|
|
|
},
|
|
|
|
localizationsDelegates: [
|
|
|
|
GlobalMaterialLocalizations.delegate,
|
|
|
|
GlobalCupertinoLocalizations.delegate,
|
|
|
|
GlobalWidgetsLocalizations.delegate,
|
|
|
|
S.delegate
|
|
|
|
],
|
|
|
|
supportedLocales: S.delegate.supportedLocales,
|
|
|
|
// home: LoginPage(),
|
|
|
|
home: MainPage(),
|
|
|
|
routes: <String, WidgetBuilder>{
|
|
|
|
'/router/main_page': (_) => MainPage(),
|
|
|
|
'/router/msg_page': (_) => MainMessagePage(),
|
|
|
|
'/router/system_msg_page': (_) => SystemMessagePage(),
|
|
|
|
'/router/exchange_order_details': (_) => ExchangeOrderDetailPage(),
|
|
|
|
'/router/integral_page': (_) => IntegralPage(),
|
|
|
|
'/router/integral_detailed_page': (_) => IntegralDetailedPage(),
|
|
|
|
'/router/mine_wallet': (_) => MineWalletPage(),
|
|
|
|
'/router/user_info_page': (_) => UserInfoPage(),
|
|
|
|
'/router/mine_card': (_) => MineCardPage(),
|
|
|
|
'/router/roll_center_page': (_) => RollCenterPage(),
|
|
|
|
'/router/mine_card_invalid': (_) => MineCardInvalidPage(),
|
|
|
|
'/router/permission_setting': (_) => PermissionSettingPage(),
|
|
|
|
'/router/manage_address_page': (_) => ManageAddressPage(),
|
|
|
|
'/router/setting_page': (_) => SettingPage(),
|
|
|
|
'/router/about_page': (_) => AboutPage(),
|
|
|
|
'/router/help_feedback_page': (_) => HelpFeedbackPage(),
|
|
|
|
'/router/union_detail_page': (_) => UnionDetailsPage(),
|
|
|
|
'/router/store_detail_page': (_) => StoreDetailsPage(),
|
|
|
|
'/router/integral_store_page': (_) => IntegralStoreDetailsPage(),
|
|
|
|
'/router/exchange_order_page': (_) => ExchangeOrderPage(),
|
|
|
|
'/router/store_selector_page': (_) => StoreSelectorPage(),
|
|
|
|
'/router/exchange_order_success_page': (_) =>
|
|
|
|
ExchangeOrderSuccessPage(),
|
|
|
|
'/router/mine_vip_level_page': (_) => MineVipLevelPage(),
|
|
|
|
'/router/exchange_history_page': (_) => ExchangeHistoryPage(),
|
|
|
|
'/router/write_off_page': (_) => WriteOffPage(),
|
|
|
|
'/router/write_off_success_page': (_) => WriteOffSuccessPage(),
|
|
|
|
'/router/order_history_page': (_) => OrderHistoryPage(),
|
|
|
|
'/router/order_details': (_) => OrderDetailPage(),
|
|
|
|
// '/router/logistics_information_page': (_) => LogisticsInformationPage(),
|
|
|
|
'/router/recharge_page': (_) => RechargePage(),
|
|
|
|
'/router/hot_article_page': (_) => HotArticlePage(),
|
|
|
|
'/router/hot_article_details_page': (_) => HotArticleDetailsPage(),
|
|
|
|
// '/router/ui_test': (_) => UITest(),
|
|
|
|
}),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|