1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- import 'package:farmer_client/theme.dart';
- import 'package:flutter/material.dart';
- import 'package:flutter_easyloading/flutter_easyloading.dart';
- import 'package:fluwx/fluwx.dart';
- import 'package:get/get.dart';
- import 'package:get_storage/get_storage.dart';
- import 'package:flutter_screenutil/flutter_screenutil.dart';
-
- import 'package:flutter_localizations/flutter_localizations.dart';
-
- import 'models/index.dart';
- import 'routes/index.dart';
-
- void main() async {
- await GetStorage.init();
- registerWxApi(
- appId: "wx0969b05b5393ae17",
- doOnAndroid: true,
- doOnIOS: true,
- universalLink: "https://help.wechat.com/sdksample/njyz"
- );
-
- // // 高德地图隐私生命
- // showPrivacy();
-
- runApp(const MyApp());
- }
-
- class MyApp extends StatelessWidget {
- const MyApp({Key? key}) : super(key: key);
-
- // This widget is the root of your application.
- @override
- Widget build(BuildContext context) {
-
- return ScreenUtilInit(
- designSize: const Size(375, 812),
- minTextAdapt: true,
- splitScreenMode: true,
- builder: (context , child) {
- return GetMaterialApp(
-
- localizationsDelegates: const [
- GlobalMaterialLocalizations.delegate,
- GlobalWidgetsLocalizations.delegate,
- GlobalCupertinoLocalizations.delegate,
- ],
-
-
- supportedLocales: [
- Locale('zh', ''),
- Locale('en', ''),
- ],
- theme: getTheme(),
- initialRoute: '/',
- defaultTransition: Transition.native,
- routingCallback: routingCallback,
- initialBinding: AppBindings(),
- getPages: pages,
- builder: EasyLoading.init(),
- );
- },
- );
- }
- }
|