login.dart 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. @override
  11. Widget build(BuildContext context) {
  12. // TODO: implement build
  13. return Scaffold(
  14. body: Container(
  15. decoration: const BoxDecoration(
  16. image: DecorationImage(
  17. image: AssetImage("images/login/login.png"),
  18. fit: BoxFit.fill,
  19. )
  20. ),
  21. child: Padding(
  22. padding: const EdgeInsets.fromLTRB(20, 20, 20, 20),
  23. child: Form(
  24. child: Column(
  25. children: [
  26. const SizedBox(
  27. width: 200,
  28. height: 200,
  29. ),
  30. Padding(
  31. padding: const EdgeInsets.fromLTRB(40, 30, 0, 0),
  32. child: TextFormField(
  33. decoration: const InputDecoration(
  34. border: InputBorder.none,
  35. labelText: "输入账号",
  36. hintText: "输入账号",
  37. ),
  38. ),
  39. ),
  40. Padding(
  41. padding: const EdgeInsets.fromLTRB(40, 0, 0, 0),
  42. child: TextFormField(
  43. decoration: const InputDecoration(
  44. border: InputBorder.none,
  45. labelText: "输入密码",
  46. hintText: "输入密码",
  47. ),
  48. ),
  49. ),
  50. const SizedBox(
  51. width: 200,
  52. height: 150,
  53. ),
  54. ElevatedButton(
  55. child: const Text("登录"),
  56. onPressed: (){
  57. },
  58. style: ButtonStyle(
  59. //minimumSize: Meta
  60. ),
  61. )
  62. ],
  63. ),
  64. ),
  65. ),
  66. ),
  67. );
  68. }
  69. }