YSBodyPropose.dart 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter/cupertino.dart';
  3. import 'base/YSBase.dart';
  4. class YSBodyPropose extends StatefulWidget {
  5. @override
  6. _YSBodyProposeState createState() => _YSBodyProposeState();
  7. }
  8. class _YSBodyProposeState extends State<YSBodyPropose> {
  9. @override
  10. Widget build(BuildContext context) {
  11. return YSBase(
  12. ystitle: '增重建议',
  13. yschild: SingleChildScrollView(
  14. child: Column(
  15. children: [
  16. Container(
  17. width: MediaQuery.of(context).size.width,
  18. margin: EdgeInsets.all(20),
  19. child: Text('我的合理增重范围(单位:kg)',style: TextStyle(fontSize: 12,color: Color(0xFF292929),fontWeight: FontWeight.bold),),
  20. ),
  21. Container(
  22. height: 100,
  23. padding: EdgeInsets.only(left: 20,right: 20),
  24. margin: EdgeInsets.only(bottom: 40),
  25. child: Row(
  26. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  27. children: [
  28. for(int i = 0;i<3;i++)Stack(
  29. children: [
  30. Container(
  31. height: 100,
  32. width: 100,
  33. child: Image.asset('lib/images/xuxian.png'),
  34. ),
  35. Container(
  36. height: 100,
  37. width: 100,
  38. padding: EdgeInsets.all(10),
  39. child: Column(
  40. mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  41. children: [
  42. Text('孕前 孕早期',style: TextStyle(fontSize: 12,color: Color(0xFF292929)),textAlign: TextAlign.center,),
  43. Text('0.5~2.0kg',style: TextStyle(fontSize: 14,color: Color(0xFFDB5278)),textAlign: TextAlign.center,)
  44. ],
  45. ),
  46. )
  47. ],
  48. ),
  49. ],
  50. ),
  51. ),
  52. Text('整个孕期建议增重',style: TextStyle(fontSize: 12,color: Color(0xFFDB5278)),),
  53. RichText(
  54. text: TextSpan(
  55. style: TextStyle(fontSize: 30,color: Color(0xFFDB5278),fontWeight: FontWeight.bold),
  56. children: [
  57. TextSpan(text: '5.0~9.0'),
  58. TextSpan(text: ' kg',style: TextStyle(fontSize: 16,fontWeight: FontWeight.normal)),
  59. ]
  60. ),
  61. ),
  62. CupertinoButton(
  63. padding: EdgeInsets.all(0),
  64. child: Container(
  65. height: 40,
  66. width: MediaQuery.of(context).size.width-150,
  67. decoration: BoxDecoration(
  68. color: Color(0xFFDB5278),
  69. borderRadius: BorderRadius.all(Radius.circular(20))
  70. ),
  71. alignment: Alignment.center,
  72. child: Text('开始管理体重',style: TextStyle(fontSize: 16,color: Colors.white),),
  73. margin: EdgeInsets.only(top: 150),
  74. ),
  75. onPressed: (){
  76. Navigator.pop(context);
  77. Navigator.pop(context);
  78. },
  79. )
  80. ],
  81. ),
  82. ),
  83. );
  84. }
  85. }