UserInfo.dart 3.5KB

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