123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- import 'package:farmer_client/theme.dart';
- import 'package:farmer_client/utils/location.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"
- );
-
-
-
-
- runApp(const MyApp());
- }
-
- class MyApp extends StatelessWidget {
- const MyApp({Key? key}) : super(key: key);
-
-
- @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(),
- );
- },
- );
- }
- }
|