UserInfo.dart 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_screenutil/flutter_screenutil.dart';
  3. class UserInfo extends StatelessWidget {
  4. const UserInfo({Key? key}) : super(key: key);
  5. @override
  6. Widget build(BuildContext context) {
  7. return Container(
  8. margin: EdgeInsets.only(top: 20.0, bottom: 0.0),
  9. alignment: Alignment.center,
  10. height: 173.w,
  11. width: 345.w,
  12. decoration: BoxDecoration(
  13. image: const DecorationImage(
  14. image: AssetImage("images/mineBack.png"),
  15. fit: BoxFit.cover,
  16. ),
  17. borderRadius: BorderRadius.circular(10),
  18. ),
  19. child: Stack(
  20. fit: StackFit.expand,
  21. children: [
  22. Positioned(
  23. top: 0,
  24. right: 0,
  25. child: Container(
  26. alignment: Alignment.center,
  27. height: 24.w,
  28. width: 93.w,
  29. decoration: const BoxDecoration(
  30. borderRadius: BorderRadius.only(
  31. bottomLeft: Radius.circular(20),
  32. topRight: Radius.circular(20)),
  33. color: Color(0x30000000),
  34. ),
  35. child: GestureDetector(
  36. child: const Text(
  37. '修改个人信息',
  38. style: TextStyle(color: Colors.white,fontSize: 14),
  39. ),
  40. onTap: () {
  41. print('修改个人信息');
  42. },
  43. )),
  44. ),
  45. Row(
  46. children: [
  47. Column(
  48. mainAxisAlignment: MainAxisAlignment.center,
  49. children: [
  50. Container(
  51. decoration: BoxDecoration(
  52. shape: BoxShape.circle,
  53. border: Border.all(
  54. color: Colors.white,
  55. width: 2,
  56. ),
  57. ),
  58. margin: EdgeInsets.fromLTRB(30, 0, 15, 0),
  59. alignment: Alignment.center,
  60. child: Image.asset(
  61. "images/userMoren.png",
  62. width: 63.w,
  63. ),
  64. ),
  65. ],
  66. ),
  67. Container(
  68. child: Column(
  69. mainAxisAlignment: MainAxisAlignment.center,
  70. crossAxisAlignment: CrossAxisAlignment.start,
  71. children: [
  72. Container(
  73. margin: EdgeInsets.fromLTRB(0, 0, 0, 10),
  74. child: Text(
  75. '符西西',
  76. style: TextStyle(
  77. color: Colors.white,
  78. fontSize: 17,
  79. ),
  80. ),
  81. ),
  82. Container(
  83. margin: EdgeInsets.fromLTRB(0, 10, 0, 0),
  84. child: Text(
  85. '17775000245',
  86. style: TextStyle(
  87. color: Colors.white,
  88. fontSize: 17,
  89. ),
  90. ),
  91. ),
  92. // const Text(
  93. // '点击登陆',
  94. // style: TextStyle(
  95. // color: Colors.white,
  96. // fontSize: 17,
  97. // ),
  98. // ),
  99. ],
  100. ),
  101. ),
  102. ],
  103. ),
  104. ],
  105. ),
  106. );
  107. }
  108. }