index.dart 2.9KB

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