YSInputWidgetInfo.dart 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/material.dart';
  3. import 'YSBodyPropose.dart';
  4. import 'base/YSBase.dart';
  5. class YSInputWidgetInfo extends StatefulWidget {
  6. @override
  7. _YSInputWidgetInfoState createState() => _YSInputWidgetInfoState();
  8. }
  9. class _YSInputWidgetInfoState extends State<YSInputWidgetInfo> {
  10. @override
  11. Widget build(BuildContext context) {
  12. return YSBase(
  13. ystitle: '输入信息',
  14. ysright: CupertinoButton(
  15. padding: EdgeInsets.all(0),
  16. child: Container(
  17. height: 30,
  18. width: 55,
  19. decoration: BoxDecoration(
  20. color: Color(0xFFFFEB3B),
  21. border: Border.all(color: Color(0xFF292929),width: 1),
  22. borderRadius: BorderRadius.all(Radius.circular(20))
  23. ),
  24. alignment: Alignment.center,
  25. child: Image(height: 17,width: 17,image: AssetImage('lib/images/updateb.png'),)
  26. ),
  27. onPressed: (){
  28. Navigator.pop(context);
  29. },
  30. ),
  31. yschild: Container(
  32. color: Colors.white,
  33. child: SingleChildScrollView(
  34. child: Column(
  35. children: [
  36. Container(
  37. margin: EdgeInsets.only(top: 30,left: 50,right: 50,bottom: 50),
  38. child: Image.asset('lib/images/infobg.png'),
  39. ),
  40. Text('输入以下信息,查看科学增重计划',style: TextStyle(fontSize: 14,color: Color(0xFF8F8F8F)),),
  41. Container(
  42. margin: EdgeInsets.only(top: 20),
  43. padding: EdgeInsets.only(left: 20,right: 20),
  44. height: 50,
  45. child: CupertinoTextField(
  46. placeholder: '',
  47. style: TextStyle(fontSize: 14,color: Color(0xFF292929)),
  48. prefix: Text('身高(cm):',style: TextStyle(fontSize: 14,color: Color(0xFF292929),fontWeight: FontWeight.w600),),
  49. decoration: BoxDecoration(),
  50. ),
  51. ),
  52. Container(
  53. width: MediaQuery.of(context).size.width,
  54. height: 1.5,
  55. child: Image.asset('lib/images/line.png'),
  56. ),
  57. Container(
  58. padding: EdgeInsets.only(left: 20,right: 20),
  59. height: 50,
  60. child: CupertinoTextField(
  61. placeholder: '',
  62. style: TextStyle(fontSize: 14,color: Color(0xFF292929)),
  63. prefix: Text('孕前体重(kg):',style: TextStyle(fontSize: 14,color: Color(0xFF292929),fontWeight: FontWeight.w600),),
  64. decoration: BoxDecoration(),
  65. ),
  66. ),
  67. Container(
  68. width: MediaQuery.of(context).size.width,
  69. height: 1.5,
  70. child: Image.asset('lib/images/line.png'),
  71. ),
  72. CupertinoButton(
  73. padding: EdgeInsets.all(0),
  74. child: Container(
  75. height: 40,
  76. width: MediaQuery.of(context).size.width-150,
  77. decoration: BoxDecoration(
  78. color: Color(0xFFDB5278),
  79. borderRadius: BorderRadius.all(Radius.circular(20))
  80. ),
  81. alignment: Alignment.center,
  82. child: Text('查看增重计划',style: TextStyle(fontSize: 16,color: Colors.white),),
  83. margin: EdgeInsets.only(top: 60),
  84. ),
  85. onPressed: (){
  86. Navigator.of(context).push(
  87. CupertinoPageRoute(
  88. builder: (context){
  89. return YSBodyPropose();
  90. }
  91. )
  92. );
  93. },
  94. )
  95. ],
  96. ),
  97. ),
  98. ),
  99. );
  100. }
  101. }