if_need_create_store_item.dart
2.89 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
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/screenutil.dart';
import 'package:one_key/models/check_seller_acc_model.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/v_empty_view.dart';
class IfNeedCreateStoreItem extends StatefulWidget {
final CheckSellerAccSunModel model;
IfNeedCreateStoreItem({Key key, this.model}) : super(key: key);
@override
_IfNeedCreateStoreItemState createState() => _IfNeedCreateStoreItemState();
}
class _IfNeedCreateStoreItemState extends State<IfNeedCreateStoreItem> {
@override
Widget build(BuildContext context) {
return Stack(
children: [
Container(
decoration: BoxDecoration(
border: Border.all(
width: ScreenUtil().setWidth(2),
color: MyColours.color_D7F7F7),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10))),
),
Positioned(
top: 0,
left: 0,
child: ClipRRect(
//圆角图片
borderRadius: BorderRadius.only(
topRight: Radius.circular(ScreenUtil().setWidth(10)),
topLeft: Radius.circular(ScreenUtil().setWidth(10))),
child: widget.model.sellerImage != ''
? Image.network(
widget.model.sellerImage,
fit: BoxFit.cover,
width: ScreenUtil().setWidth(140 * 2),
height: ScreenUtil().setWidth(140 * 2),
)
: Image.asset(
Utils.getImgPath('no_image'),
fit: BoxFit.cover,
width: ScreenUtil().setWidth(140 * 2),
height: ScreenUtil().setWidth(140 * 2),
),
)),
Positioned(
bottom: 0,
left: ScreenUtil().setWidth(20),
right: ScreenUtil().setWidth(20),
child: Padding(
child: Column(
children: [
Text('${widget.model.sellername}',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: ScreenUtil().setWidth(30),
color: MyColours.color_333333)),
VEmptyView(10),
Text('${widget.model.roleName}',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: ScreenUtil().setWidth(24),
color: MyColours.color_666666))
],
),
padding:
EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(14))))
],
);
}
}