if_need_create_store.dart
4.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/screenutil.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/utils/navigator_util.dart';
import 'package:one_key/utils/utils.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';
class IfNeedCreateStore extends StatefulWidget {
IfNeedCreateStore({Key key}) : super(key: key);
@override
_IfNeedCreateStoreState createState() => _IfNeedCreateStoreState();
}
class _IfNeedCreateStoreState extends State<IfNeedCreateStore> {
ScrollController _controller = ScrollController();
bool noStore = false;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: SystemAppBar(
'',
// leftTitle: '上一步',
onTap: () {
Navigator.pop(context);
},
),
body: Container(
width: double.infinity,
padding: EdgeInsets.all(ScreenUtil().setWidth(40)),
child: Column(crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.center,
children: [
VEmptyView(80),
Image.asset(
noStore
? Utils.getImgPath('not_member')
: Utils.getImgPath('is_member'),
width: ScreenUtil().setWidth(120),
height: ScreenUtil().setWidth(120),
),
VEmptyView(60),
Text(
noStore ? '您还没有绑定任何店铺' : '您已经是“xxxxx”的员工',
style: TextStyle(
fontSize: ScreenUtil().setSp(32),
color: MyColours.color_333333,
fontWeight: FontWeight.bold),
),
VEmptyView(172),
InkWell(
onTap: () {
if (noStore) {
//跳转至新建店铺流程
NavigatorUtil.goCreateStorePage(context);
} else {
//进入店铺
}
},
child: Container(
width: double.infinity,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
vertical: ScreenUtil().setWidth(18)),
decoration: BoxDecoration(
color: MyColours.color_24A4A8,
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10))),
child: Text(
noStore ? '创建店铺' : '进入“xxxxxxx”',
textAlign: TextAlign.center,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(34)),
),
)),
noStore
? Container()
: Container(
margin:
EdgeInsets.only(top: ScreenUtil().setWidth(40)),
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(30),
),
child: InkWell(
onTap: () {
//跳转至新建店铺流程
NavigatorUtil.goCreateStorePage(context);
},
child: Text(
'不是我,我要重新建店',
textAlign: TextAlign.center,
style: TextStyle(
color: MyColours.color_199095,
fontSize: ScreenUtil().setSp(30)),
),
)),
])));
}
}