增加若干基础页面

This commit is contained in:
2023-12-22 23:27:14 +08:00
parent a8f9b5265e
commit a16d808d2d
32 changed files with 801 additions and 51 deletions

View File

@@ -0,0 +1,6 @@
library user;
export './user_binding.dart';
export './user_logic.dart';
export './user_state.dart';
export './user_view.dart';

View File

@@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'user_logic.dart';
class UserBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut(() => UserLogic());
}
}

View 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();
}
}

View File

@@ -0,0 +1,5 @@
class UserState {
UserState() {
///Initialize variables
}
}

View 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("商家中心!!!"),
),
),
);
}
}