增加若干基础页面
This commit is contained in:
6
lib/pages/layout/user/index.dart
Normal file
6
lib/pages/layout/user/index.dart
Normal file
@@ -0,0 +1,6 @@
|
||||
library user;
|
||||
|
||||
export './user_binding.dart';
|
||||
export './user_logic.dart';
|
||||
export './user_state.dart';
|
||||
export './user_view.dart';
|
||||
10
lib/pages/layout/user/user_binding.dart
Normal file
10
lib/pages/layout/user/user_binding.dart
Normal file
@@ -0,0 +1,10 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'user_logic.dart';
|
||||
|
||||
class UserBinding extends Bindings {
|
||||
@override
|
||||
void dependencies() {
|
||||
Get.lazyPut(() => UserLogic());
|
||||
}
|
||||
}
|
||||
19
lib/pages/layout/user/user_logic.dart
Normal file
19
lib/pages/layout/user/user_logic.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'user_state.dart';
|
||||
|
||||
class UserLogic extends GetxController {
|
||||
final UserState state = UserState();
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
super.onReady();
|
||||
}
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
// TODO: implement onClose
|
||||
super.onClose();
|
||||
}
|
||||
}
|
||||
5
lib/pages/layout/user/user_state.dart
Normal file
5
lib/pages/layout/user/user_state.dart
Normal file
@@ -0,0 +1,5 @@
|
||||
class UserState {
|
||||
UserState() {
|
||||
///Initialize variables
|
||||
}
|
||||
}
|
||||
30
lib/pages/layout/user/user_view.dart
Normal file
30
lib/pages/layout/user/user_view.dart
Normal file
@@ -0,0 +1,30 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../utils/utils.dart';
|
||||
import 'user_logic.dart';
|
||||
|
||||
class UserPage extends StatelessWidget {
|
||||
const UserPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final logic = Get.find<UserLogic>();
|
||||
final state = Get.find<UserLogic>().state;
|
||||
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
onPopInvoked: (_) {
|
||||
ToolFn().isExit();
|
||||
},
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text("商家中心"),
|
||||
),
|
||||
body: const Center(
|
||||
child: Text("商家中心!!!"),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user