|
...
|
...
|
@@ -3,6 +3,7 @@ import 'package:flutter_screenutil/screenutil.dart'; |
|
|
|
import 'package:one_key/provider/create_store_model.dart';
|
|
|
|
import 'package:one_key/res/colors.dart';
|
|
|
|
import 'package:one_key/route/navigator_util.dart';
|
|
|
|
import 'package:one_key/utils/event_bus.dart';
|
|
|
|
import 'package:one_key/widgets/round_button.dart';
|
|
|
|
import 'package:one_key/widgets/system_app_bar.dart';
|
|
|
|
import 'package:one_key/widgets/v_empty_view.dart';
|
|
...
|
...
|
@@ -28,88 +29,94 @@ class _EnterStoreNamePageState extends State<EnterStoreNamePage> { |
|
|
|
Widget build(BuildContext context) {
|
|
|
|
CreateStoreModel createStoreModel =
|
|
|
|
Provider.of<CreateStoreModel>(context, listen: false);
|
|
|
|
_controller.text = createStoreModel.storeInfo.name;
|
|
|
|
_controller.text = createStoreModel.storeInfo?.name;
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
appBar: SystemAppBar(
|
|
|
|
'',
|
|
|
|
onTap: () {
|
|
|
|
EventBus().emit('refresh_store_list');
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
body: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
body: WillPopScope(
|
|
|
|
onWillPop: () {
|
|
|
|
EventBus().emit('refresh_store_list');
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(70),
|
|
|
|
vertical: ScreenUtil().setWidth(60)),
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text('您的店铺名称是?',
|
|
|
|
style: TextStyle(
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(70),
|
|
|
|
vertical: ScreenUtil().setWidth(60)),
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text('您的店铺名称是?',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(40),
|
|
|
|
fontWeight: FontWeight.bold)),
|
|
|
|
VEmptyView(100),
|
|
|
|
TextField(
|
|
|
|
controller: _controller,
|
|
|
|
// textAlignVertical: TextAlignVertical.bottom,
|
|
|
|
maxLines: 1,
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(40),
|
|
|
|
fontWeight: FontWeight.bold)),
|
|
|
|
VEmptyView(100),
|
|
|
|
TextField(
|
|
|
|
controller: _controller,
|
|
|
|
// textAlignVertical: TextAlignVertical.bottom,
|
|
|
|
maxLines: 1,
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
// focusNode: _codeNode,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
contentPadding: EdgeInsets.symmetric(
|
|
|
|
vertical: ScreenUtil().setWidth(32),
|
|
|
|
horizontal: ScreenUtil().setWidth(40)),
|
|
|
|
border: OutlineInputBorder(),
|
|
|
|
hintText: '请输入店铺名称',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
// focusNode: _codeNode,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
contentPadding: EdgeInsets.symmetric(
|
|
|
|
vertical: ScreenUtil().setWidth(32),
|
|
|
|
horizontal: ScreenUtil().setWidth(40)),
|
|
|
|
border: OutlineInputBorder(),
|
|
|
|
hintText: '请输入店铺名称',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(
|
|
|
|
color: MyColours.color_bff6f7,
|
|
|
|
width: ScreenUtil().setWidth(2))),
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(
|
|
|
|
color: MyColours.color_bff6f7,
|
|
|
|
width: ScreenUtil().setWidth(2))),
|
|
|
|
),
|
|
|
|
onChanged: (value) {
|
|
|
|
createStoreModel.storeInfo.name = value;
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
keyboardType: TextInputType.text,
|
|
|
|
),
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(
|
|
|
|
color: MyColours.color_bff6f7,
|
|
|
|
width: ScreenUtil().setWidth(2))),
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(
|
|
|
|
color: MyColours.color_bff6f7,
|
|
|
|
width: ScreenUtil().setWidth(2))),
|
|
|
|
),
|
|
|
|
onChanged: (value) {
|
|
|
|
createStoreModel.storeInfo.name = value;
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
keyboardType: TextInputType.text,
|
|
|
|
),
|
|
|
|
VEmptyView(160),
|
|
|
|
RoundButton(
|
|
|
|
text: '下一步',
|
|
|
|
gradientStart: MyColours.color_199095,
|
|
|
|
gradientEnd: MyColours.color_199095,
|
|
|
|
// borderColor: MyColours.color_999999,
|
|
|
|
radius: ScreenUtil().setWidth(20),
|
|
|
|
fontSize: 28,
|
|
|
|
isBold: false,
|
|
|
|
onPressed: () {
|
|
|
|
NavigatorUtil.goEnterStoreAddressPage(context);
|
|
|
|
},
|
|
|
|
)
|
|
|
|
])))));
|
|
|
|
VEmptyView(160),
|
|
|
|
RoundButton(
|
|
|
|
text: '下一步',
|
|
|
|
gradientStart: MyColours.color_199095,
|
|
|
|
gradientEnd: MyColours.color_199095,
|
|
|
|
// borderColor: MyColours.color_999999,
|
|
|
|
radius: ScreenUtil().setWidth(20),
|
|
|
|
fontSize: 28,
|
|
|
|
isBold: false,
|
|
|
|
onPressed: () {
|
|
|
|
NavigatorUtil.goEnterStoreAddressPage(context);
|
|
|
|
},
|
|
|
|
)
|
|
|
|
]))))));
|
|
|
|
;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|