login.dart 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:flutter_modular/flutter_modular.dart';
  4. class LoginPage extends StatefulWidget {
  5. const LoginPage({super.key});
  6. @override
  7. State<LoginPage> createState() => _LoginPageState();
  8. }
  9. class _LoginPageState extends State<LoginPage> {
  10. // final width = 375.0;
  11. // final height = 680.0;
  12. @override
  13. Widget build(BuildContext context) {
  14. // TODO: implement build
  15. return Container(
  16. decoration: const BoxDecoration(
  17. image: DecorationImage(
  18. image: AssetImage("images/login/login.png"),
  19. fit: BoxFit.fill,
  20. )),
  21. child: const Text("11111"),
  22. );
  23. }
  24. }
  25. // Padding(
  26. // padding: const EdgeInsets.fromLTRB(20, 20, 20, 20),
  27. // child: Form(
  28. // child: SingleChildScrollView(
  29. // physics: const NeverScrollableScrollPhysics(), // 禁用滚动
  30. // child: Align(
  31. // alignment: Alignment.center,
  32. // child: Column(
  33. // mainAxisAlignment: MainAxisAlignment.center,
  34. // mainAxisSize: MainAxisSize.min, // 设置为最小
  35. // children: [
  36. // const SizedBox(
  37. // width: 200,
  38. // height: 200,
  39. // ),
  40. // Padding(
  41. // padding: const EdgeInsets.fromLTRB(40, 40, 0, 0),
  42. // child: TextFormField(
  43. // decoration: const InputDecoration(
  44. // border: InputBorder.none,
  45. // labelText: "输入账号",
  46. // hintText: "输入账号",
  47. // ),
  48. // ),
  49. // ),
  50. // Padding(
  51. // padding: const EdgeInsets.fromLTRB(40, 10, 0, 0),
  52. // child: TextFormField(
  53. // decoration: const InputDecoration(
  54. // border: InputBorder.none,
  55. // labelText: "输入密码",
  56. // hintText: "输入密码",
  57. // ),
  58. // ),
  59. // ),
  60. // const SizedBox(
  61. // width: 200,
  62. // height: 50,
  63. // ),
  64. // Container(
  65. // width: 150,
  66. // height: 40,
  67. // child: ElevatedButton(
  68. // onPressed: () {
  69. // Modular.to.navigate("/home/main");
  70. // },
  71. // child: const Text("登录"),
  72. // ),
  73. // )
  74. // ],
  75. // ),
  76. // ),
  77. // ),
  78. // ),
  79. // ),