import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'YSBodyPropose.dart'; import 'base/YSBase.dart'; class YSInputWidgetInfo extends StatefulWidget { @override _YSInputWidgetInfoState createState() => _YSInputWidgetInfoState(); } class _YSInputWidgetInfoState extends State { @override Widget build(BuildContext context) { return YSBase( ystitle: '输入信息', ysright: CupertinoButton( padding: EdgeInsets.all(0), child: Container( height: 30, width: 55, decoration: BoxDecoration( color: Color(0xFFFFEB3B), border: Border.all(color: Color(0xFF292929),width: 1), borderRadius: BorderRadius.all(Radius.circular(20)) ), alignment: Alignment.center, child: Image(height: 17,width: 17,image: AssetImage('lib/images/updateb.png'),) ), onPressed: (){ Navigator.pop(context); }, ), yschild: Container( color: Colors.white, child: SingleChildScrollView( child: Column( children: [ Container( margin: EdgeInsets.only(top: 30,left: 50,right: 50,bottom: 50), child: Image.asset('lib/images/infobg.png'), ), Text('输入以下信息,查看科学增重计划',style: TextStyle(fontSize: 14,color: Color(0xFF8F8F8F)),), Container( margin: EdgeInsets.only(top: 20), padding: EdgeInsets.only(left: 20,right: 20), height: 50, child: CupertinoTextField( placeholder: '', style: TextStyle(fontSize: 14,color: Color(0xFF292929)), prefix: Text('身高(cm):',style: TextStyle(fontSize: 14,color: Color(0xFF292929),fontWeight: FontWeight.w600),), decoration: BoxDecoration(), ), ), Container( width: MediaQuery.of(context).size.width, height: 1.5, child: Image.asset('lib/images/line.png'), ), Container( padding: EdgeInsets.only(left: 20,right: 20), height: 50, child: CupertinoTextField( placeholder: '', style: TextStyle(fontSize: 14,color: Color(0xFF292929)), prefix: Text('孕前体重(kg):',style: TextStyle(fontSize: 14,color: Color(0xFF292929),fontWeight: FontWeight.w600),), decoration: BoxDecoration(), ), ), Container( width: MediaQuery.of(context).size.width, height: 1.5, child: Image.asset('lib/images/line.png'), ), CupertinoButton( padding: EdgeInsets.all(0), child: Container( height: 40, width: MediaQuery.of(context).size.width-150, decoration: BoxDecoration( color: Color(0xFFDB5278), borderRadius: BorderRadius.all(Radius.circular(20)) ), alignment: Alignment.center, child: Text('查看增重计划',style: TextStyle(fontSize: 16,color: Colors.white),), margin: EdgeInsets.only(top: 60), ), onPressed: (){ Navigator.of(context).push( CupertinoPageRoute( builder: (context){ return YSBodyPropose(); } ) ); }, ) ], ), ), ), ); } }