if_need_create_store_item.dart 3.36 KB

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_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/h_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 Container(
        height: ScreenUtil().setWidth(57 * 2),
        padding: EdgeInsets.only(
            left: ScreenUtil().setWidth(24 * 2),
            right: ScreenUtil().setWidth(35 * 2)),
        margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(40)),
        decoration: BoxDecoration(
            color: MyColours.color_ffffff,
            boxShadow: [
              BoxShadow(
                  color: Color.fromRGBO(67, 142, 147, 0.3),
                  spreadRadius: ScreenUtil().setWidth(2),
                  blurRadius: ScreenUtil().setWidth(8))
            ],
            border: Border.all(
                width: ScreenUtil().setWidth(2), color: MyColours.color_438E93),
            borderRadius: BorderRadius.circular(ScreenUtil().setWidth(16))),
        child: Row(
          children: [
            // 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),
            //             ),
            //     )),
            Container(
              width: ScreenUtil().setWidth(160 * 2),
              child: Text('${widget.model!.sellername}',
                  maxLines: 1,
                  overflow: TextOverflow.ellipsis,
                  style: TextStyle(
                      fontSize: ScreenUtil().setWidth(32),
                      color: MyColours.color_515151)),
            ),
            Spacer(),
            Text('${widget.model!.roleName}',
                maxLines: 1,
                overflow: TextOverflow.ellipsis,
                style: TextStyle(
                    fontSize: ScreenUtil().setWidth(32),
                    color: MyColours.color_999999)),
            HEmptyView(40),
            Image.asset(
              Utils.getImgPath('enter_store_arrow_r'),
              width: ScreenUtil().setWidth(20),
            )
          ],
        ));
  }
}