1234567891011121314151617181920212223242526272829303132333435363738394041 |
-
- import 'package:farmer_client/theme.dart';
- import 'package:flutter/material.dart';
- import 'package:get/get.dart';
- import 'package:get_storage/get_storage.dart';
- import 'package:flutter_screenutil/flutter_screenutil.dart';
-
- import 'models/index.dart';
- import 'routes/index.dart';
-
- void main() async {
- await GetStorage.init();
-
- 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) {
- GetStorage box = GetStorage();
-
- return ScreenUtilInit(
- designSize: const Size(375, 812),
- minTextAdapt: true,
- splitScreenMode: true,
- builder: (_) {
- return GetMaterialApp(
- theme: getTheme(),
- initialRoute: '/splash',
- defaultTransition: Transition.native,
- routingCallback: routingCallback,
- initialBinding: AppBindings(),
- getPages: pages,
- );
- },
- );
- }
- }
|