You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.6 KiB
53 lines
1.6 KiB
3 weeks ago
|
import 'package:flutter/material.dart';
|
||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||
|
import 'package:get/get_navigation/src/root/get_material_app.dart';
|
||
|
import 'package:get/get_navigation/src/routes/get_route.dart';
|
||
|
import 'package:get/get_navigation/src/routes/transitions_type.dart';
|
||
|
import 'package:problem_check_system/modules/home/home_page.dart';
|
||
|
import 'package:problem_check_system/modules/login/views/login_page.dart';
|
||
|
|
||
|
void main() {
|
||
|
runApp(const MainApp());
|
||
|
}
|
||
|
|
||
|
class MainApp extends StatelessWidget {
|
||
|
const MainApp({super.key});
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
//填入设计稿中设备的屏幕尺寸,单位dp
|
||
|
return ScreenUtilInit(
|
||
|
designSize: const Size(375, 812),
|
||
|
minTextAdapt: true,
|
||
|
splitScreenMode: true,
|
||
|
builder: (context, child) {
|
||
|
return GetMaterialApp(
|
||
|
debugShowCheckedModeBanner: false,
|
||
|
title: 'First Method',
|
||
|
// You can use the library anywhere in the app even in theme
|
||
|
theme: ThemeData(
|
||
|
useMaterial3: true,
|
||
|
primarySwatch: Colors.blue,
|
||
|
// textTheme: Typography.englishLike2018.apply(fontSizeFactor: 1.sp),
|
||
|
),
|
||
|
initialRoute: '/',
|
||
|
getPages: [
|
||
|
GetPage(
|
||
|
name: '/',
|
||
|
page: () => LoginPage(),
|
||
|
transition: Transition.cupertino,
|
||
|
),
|
||
|
GetPage(
|
||
|
name: '/home',
|
||
|
page: () => HomePage(),
|
||
|
transition: Transition.cupertino,
|
||
|
),
|
||
|
],
|
||
|
home: child,
|
||
|
);
|
||
|
},
|
||
|
child: LoginPage(),
|
||
|
);
|
||
|
}
|
||
|
}
|