|
@@ -4,6 +4,7 @@ import 'package:flutter/foundation.dart';
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
import 'package:get/get.dart';
|
|
|
+import 'package:naiyouwl/app/component/sys_app_bar.dart';
|
|
|
import 'package:window_manager/window_manager.dart';
|
|
|
|
|
|
import '../controllers/home_controller.dart';
|
|
@@ -12,6 +13,7 @@ class HomeView extends GetView<HomeController> {
|
|
|
const HomeView({Key? key}) : super(key: key);
|
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
|
+
|
|
|
final _usernameController = TextEditingController();
|
|
|
final _passwordController = TextEditingController();
|
|
|
return Container(
|
|
@@ -21,83 +23,11 @@ class HomeView extends GetView<HomeController> {
|
|
|
fit: BoxFit.fill,
|
|
|
),
|
|
|
),
|
|
|
- child: Scaffold(
|
|
|
+ child: const Scaffold(
|
|
|
backgroundColor: Colors.transparent,
|
|
|
- appBar: PreferredSize(
|
|
|
- preferredSize: const Size.fromHeight(64),
|
|
|
- child: GestureDetector(
|
|
|
- behavior: HitTestBehavior.translucent,
|
|
|
- onPanStart: (details) {
|
|
|
- if (Platform.isWindows || Platform.isMacOS) windowManager.startDragging();
|
|
|
- },
|
|
|
- onDoubleTap: () {}, //双击不实现任何
|
|
|
- child: AppBar(
|
|
|
- elevation: 0.0,
|
|
|
- backgroundColor: Colors.transparent,
|
|
|
- title: const Text(""),
|
|
|
- centerTitle: false,
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
-
|
|
|
- body:
|
|
|
- ListView(
|
|
|
- children: [
|
|
|
- Container(
|
|
|
- color: Colors.transparent, // 这里设置背景颜色
|
|
|
- child: const SizedBox(
|
|
|
- width: 375,
|
|
|
- height: 200.0,
|
|
|
- child: Center(
|
|
|
- child: Text(""),
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
-
|
|
|
- Padding(
|
|
|
- padding: const EdgeInsets.fromLTRB(55, 0, 20, 0),
|
|
|
- child: TextField(
|
|
|
- controller: _usernameController,
|
|
|
- decoration: const InputDecoration(
|
|
|
- labelText: '用户名',
|
|
|
- hintText: '请输入用户名',
|
|
|
- border: InputBorder.none,
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
- const SizedBox(height: 6.5), // 添加一些间距
|
|
|
- Padding(
|
|
|
- padding: const EdgeInsets.fromLTRB(55, 0, 20, 0),
|
|
|
- child: TextField(
|
|
|
- controller: _passwordController,
|
|
|
- decoration: const InputDecoration(
|
|
|
- labelText: '密码',
|
|
|
- hintText: '请输入密码',
|
|
|
- border: InputBorder.none,
|
|
|
- ),
|
|
|
- obscureText: true,
|
|
|
- ),
|
|
|
- ),
|
|
|
- const SizedBox(height: 20,),
|
|
|
- Padding(
|
|
|
- padding: const EdgeInsets.fromLTRB(55, 0, 55, 0),
|
|
|
- child: SizedBox(
|
|
|
- width: 150,
|
|
|
- height: 40,
|
|
|
- child: ElevatedButton(onPressed: (){
|
|
|
- if (kDebugMode) {
|
|
|
- print(_usernameController.text);
|
|
|
- }
|
|
|
- if (kDebugMode) {
|
|
|
- print(_passwordController.text);
|
|
|
- }
|
|
|
- //Modular.to.navigate("/home/main");
|
|
|
- }, child: const Text("登录"))
|
|
|
- ),
|
|
|
- )
|
|
|
- ],
|
|
|
- ),
|
|
|
+ appBar: SysAppBar(title: Text("首页"),),
|
|
|
|
|
|
+ body: Text("111111"),
|
|
|
),
|
|
|
);
|
|
|
}
|