my page
This commit is contained in:
parent
97356ae70e
commit
60232041df
11
wallpaper/lib/pages/mypage/mypage_binding.dart
Normal file
11
wallpaper/lib/pages/mypage/mypage_binding.dart
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import 'mypage_controller.dart';
|
||||||
|
|
||||||
|
class MyPageBinding extends Bindings {
|
||||||
|
@override
|
||||||
|
void dependencies() {
|
||||||
|
Get.lazyPut(() => MyPageController());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
5
wallpaper/lib/pages/mypage/mypage_controller.dart
Normal file
5
wallpaper/lib/pages/mypage/mypage_controller.dart
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
class MyPageController extends GetxController {
|
||||||
|
|
||||||
|
}
|
||||||
18
wallpaper/lib/pages/mypage/mypage_view.dart
Normal file
18
wallpaper/lib/pages/mypage/mypage_view.dart
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
class MyPageView extends GetView {
|
||||||
|
const MyPageView({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: const Text("我的"),
|
||||||
|
),
|
||||||
|
body: const Center(
|
||||||
|
child: Text("xxxxx"),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,6 +3,9 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:wallpaper/pages/homePage/homePage_view.dart';
|
import 'package:wallpaper/pages/homePage/homePage_view.dart';
|
||||||
|
import 'package:wallpaper/pages/downloadpage/downloadpage_view.dart';
|
||||||
|
import 'package:wallpaper/pages/collectionpage/collectionpage_view.dart';
|
||||||
|
import 'package:wallpaper/pages/mypage/mypage_view.dart';
|
||||||
class TabbarPageView extends GetView {
|
class TabbarPageView extends GetView {
|
||||||
const TabbarPageView({super.key});
|
const TabbarPageView({super.key});
|
||||||
|
|
||||||
@ -37,6 +40,6 @@ class TabbarPageView extends GetView {
|
|||||||
|
|
||||||
//返回每个tabitem对应控制器视图,必须一一对应
|
//返回每个tabitem对应控制器视图,必须一一对应
|
||||||
List<Widget> getPages(){
|
List<Widget> getPages(){
|
||||||
return [HomePageView(),];
|
return [HomePageView(),CollectionPageView(),DownloadPageView(),MyPageView(),];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -11,6 +11,9 @@ import 'package:wallpaper/pages/collectionpage/collectionpage_view.dart';
|
|||||||
import 'package:wallpaper/pages/collectionpage/collectionpage_binding.dart';
|
import 'package:wallpaper/pages/collectionpage/collectionpage_binding.dart';
|
||||||
|
|
||||||
|
|
||||||
|
import 'package:wallpaper/pages/mypage/mypage_view.dart';
|
||||||
|
import 'package:wallpaper/pages/mypage/mypage_binding.dart';
|
||||||
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
class AppRoutes {
|
class AppRoutes {
|
||||||
@ -42,6 +45,12 @@ class AppRoutes {
|
|||||||
binding: CollectionPageBinding(),
|
binding: CollectionPageBinding(),
|
||||||
participatesInRootNavigator: true,
|
participatesInRootNavigator: true,
|
||||||
),
|
),
|
||||||
|
GetPage(
|
||||||
|
name: '/my',
|
||||||
|
page: ()=> const MyPageView(),
|
||||||
|
binding: MyPageBinding(),
|
||||||
|
participatesInRootNavigator: true,
|
||||||
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user