79 lines
2.3 KiB
Dart
79 lines
2.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/widgets.dart';
|
|
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:wallpaper/routes/app_routes.dart';
|
|
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
// This widget is the root of your application.
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'WallPaper',
|
|
theme: ThemeData(
|
|
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
|
|
useMaterial3: true,
|
|
),
|
|
home: const RootPage(title: 'Flutter Demo Home Page'),
|
|
);
|
|
}
|
|
}
|
|
|
|
class RootPage extends StatefulWidget {
|
|
const RootPage({super.key, required this.title});
|
|
final String title;
|
|
|
|
@override
|
|
State<RootPage> createState() => _RootPageState();
|
|
}
|
|
|
|
class _RootPageState extends State<RootPage> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ScreenUtilInit(
|
|
builder: (context,widget) {
|
|
return GetMaterialApp(
|
|
title: "WallPaper",
|
|
theme: ThemeData.light(useMaterial3: true).copyWith(
|
|
primaryColor: Color(0xFFFF9000),
|
|
),
|
|
themeMode: ThemeMode.light,
|
|
getPages: AppRoutes.routes,
|
|
initialRoute: AppRoutes.initialPage,
|
|
builder: (context,widget) {
|
|
return DefaultTabController(
|
|
length: 3,
|
|
child: Scaffold(
|
|
bottomNavigationBar: AppBar(
|
|
bottom: const TabBar(
|
|
tabs: [
|
|
Tab(icon: Icon(Icons.directions_car),),
|
|
Tab(icon: Icon(Icons.directions_bike),),
|
|
Tab(icon: Icon(Icons.directions_train),),
|
|
],
|
|
),
|
|
title: const Text("WallPaper tab"),
|
|
),
|
|
body: const TabBarView(
|
|
children: [
|
|
Center(
|
|
child: Text("fdsssssaj"),
|
|
),
|
|
Icon(Icons.directions_bike),
|
|
Icon(Icons.directions_train),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
},
|
|
);
|
|
},
|
|
);
|
|
}
|
|
}
|