index.dart 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import './widgets/OtherColumn.dart';
  2. import './widgets/UserAddress.dart';
  3. import './widgets/UserInfo.dart';
  4. import 'package:flutter/material.dart';
  5. import 'package:flutter_screenutil/flutter_screenutil.dart';
  6. class MainPage extends StatefulWidget {
  7. const MainPage({Key? key}) : super(key: key);
  8. @override
  9. State<MainPage> createState() => _MainPageState();
  10. }
  11. class _MainPageState extends State<MainPage> {
  12. @override
  13. Widget build(BuildContext context) {
  14. return Container(
  15. alignment: Alignment.center,
  16. child: ListView(
  17. children: [
  18. Column(
  19. children: [
  20. UserInfo(), //头部,头像手机号姓名
  21. UserAddress(), //用户地址
  22. OtherColumn(), //功能菜单栏
  23. Container(
  24. height: 70.h,
  25. margin: EdgeInsets.only(top: 0, bottom: 40.0),
  26. alignment: Alignment.bottomCenter,
  27. decoration: BoxDecoration(
  28. boxShadow: [
  29. BoxShadow(
  30. blurRadius: 10, //阴影范围
  31. spreadRadius: 0.1, //阴影浓度
  32. color: Colors.grey.withOpacity(0.2), //阴影颜色
  33. ),
  34. ],
  35. ),
  36. child: SizedBox(
  37. width: 315.w,
  38. height: 49.h,
  39. child: ElevatedButton(
  40. onPressed: () {
  41. // _handelSubmit();
  42. print('用户点击了支付啊阿松大撒地方');
  43. },
  44. child: const Text(
  45. "退出登陆",
  46. style: TextStyle(
  47. fontSize: 18,
  48. color: Colors.black,
  49. fontWeight: FontWeight.bold),
  50. ),
  51. style: ButtonStyle(
  52. elevation: MaterialStateProperty.all(0),
  53. backgroundColor:
  54. MaterialStateProperty.all(const Color(0xFFFFFFFF)),
  55. shape: MaterialStateProperty.all(
  56. const RoundedRectangleBorder(
  57. borderRadius:
  58. BorderRadius.all(Radius.circular(24.4)))),
  59. ),
  60. ),
  61. ),
  62. ),
  63. ],
  64. ),
  65. ],
  66. ),
  67. );
  68. }
  69. }