s
This commit is contained in:
parent
fef2c606c7
commit
b660bc4331
@ -1,78 +0,0 @@
|
|||||||
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),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,12 +1,9 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
// import 'MyApp.dart';
|
|
||||||
|
|
||||||
// import 'TestApp.dart';
|
// import 'TestApp.dart';
|
||||||
import 'WallPaperApp.dart';
|
import 'WallPaperApp.dart';
|
||||||
void main() {
|
void main() {
|
||||||
runApp(const WallPaperApp());
|
runApp(const WallPaperApp());
|
||||||
// runApp(const BottomNavigationBarLnt());
|
|
||||||
// runApp(const MyApp());
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user