index.dart 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. import 'package:farmer_client/pages/main/widgets/OtherColumn.dart';
  2. import 'package:farmer_client/pages/main/widgets/UserAddress.dart';
  3. import 'package:farmer_client/pages/main/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 Scaffold(
  15. resizeToAvoidBottomInset: false,
  16. appBar: AppBar(
  17. title: Text('我的'),
  18. leading: Icon(Icons.arrow_back_ios),
  19. // backgroundColor: Colors.transparent,
  20. centerTitle: true,
  21. ),
  22. body:Container(
  23. alignment: Alignment.center,
  24. child: ListView(
  25. children: [
  26. Column(
  27. children: [
  28. UserInfo(),//头部,头像手机号姓名
  29. UserAddress(),//用户地址
  30. OtherColumn(),//功能菜单栏
  31. Container(
  32. height: 70.h,
  33. margin: EdgeInsets.only(top: 0, bottom: 40.0),
  34. alignment: Alignment.bottomCenter,
  35. decoration: BoxDecoration(
  36. boxShadow: [
  37. BoxShadow(
  38. blurRadius: 10, //阴影范围
  39. spreadRadius: 0.1, //阴影浓度
  40. color: Colors.grey.withOpacity(0.2), //阴影颜色
  41. ),
  42. ],
  43. ),
  44. child: SizedBox(
  45. width: 315.w,
  46. height: 49.h,
  47. child: ElevatedButton(
  48. onPressed: () {
  49. // _handelSubmit();
  50. print('用户点击了支付啊阿松大撒地方');
  51. },
  52. child: const Text(
  53. "退出登陆",
  54. style: TextStyle(
  55. fontSize: 18,
  56. color: Colors.black,
  57. fontWeight: FontWeight.bold),
  58. ),
  59. style: ButtonStyle(
  60. elevation: MaterialStateProperty.all(0),
  61. backgroundColor:
  62. MaterialStateProperty.all(const Color(0xFFFFFFFF)),
  63. shape: MaterialStateProperty.all(
  64. const RoundedRectangleBorder(
  65. borderRadius:
  66. BorderRadius.all(Radius.circular(24.4)))),
  67. ),
  68. ),
  69. ),
  70. ),
  71. ],
  72. ),
  73. ],
  74. )
  75. )
  76. );
  77. }
  78. }