|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:huixiang/view_widget/my_appbar.dart';
|
|
|
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
|
|
|
|
import '../../utils/font_weight.dart';
|
|
|
|
import '../../view_widget/classic_header.dart';
|
|
|
|
import '../../view_widget/my_footer.dart';
|
|
|
|
|
|
|
|
class MerchantInfo extends StatefulWidget {
|
|
|
|
final Map<String, dynamic> arguments;
|
|
|
|
|
|
|
|
MerchantInfo({this.arguments});
|
|
|
|
@override
|
|
|
|
State<StatefulWidget> createState() {
|
|
|
|
return _MerchantInfo();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class _MerchantInfo extends State<MerchantInfo> {
|
|
|
|
final RefreshController refreshController = RefreshController();
|
|
|
|
int checkIndex = 0;
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return
|
|
|
|
Scaffold(
|
|
|
|
backgroundColor: Color(0xFFF8F8FA),
|
|
|
|
appBar: MyAppBar(
|
|
|
|
title: "商户信息",
|
|
|
|
titleColor: Colors.black,
|
|
|
|
background: Colors.white,
|
|
|
|
leadingColor: Colors.black,
|
|
|
|
brightness: Brightness.dark,
|
|
|
|
),
|
|
|
|
body: SmartRefresher(
|
|
|
|
controller: refreshController,
|
|
|
|
enablePullDown: true,
|
|
|
|
enablePullUp: false,
|
|
|
|
header: MyHeader(
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
footer: CustomFooter(
|
|
|
|
builder: (context, mode) {
|
|
|
|
return MyFooter(mode);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
onRefresh: () {
|
|
|
|
},
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
scrollController: ScrollController(),
|
|
|
|
child: Container(
|
|
|
|
margin: EdgeInsets.only(top: 24.h,left: 16.w,right: 16.w),
|
|
|
|
child:Column(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.white,
|
|
|
|
borderRadius: BorderRadius.circular(8.w),
|
|
|
|
boxShadow: [
|
|
|
|
BoxShadow(
|
|
|
|
color: Color(0x0F06152E).withAlpha(12),
|
|
|
|
offset: Offset(0, 2),
|
|
|
|
blurRadius: 4,
|
|
|
|
spreadRadius: 0,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
padding: EdgeInsets.only(top: 16.h,left: 16.w,right: 16.w,bottom:44.h),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
textItem("店铺名称","134****7777"),
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: 1.h,
|
|
|
|
color: Color(0xFFEBECEF),
|
|
|
|
margin: EdgeInsets.only(top:2.h,bottom: 16.h)
|
|
|
|
),
|
|
|
|
textItem("经营类目","奶"),
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: 1.h,
|
|
|
|
color: Color(0xFFEBECEF),
|
|
|
|
margin: EdgeInsets.only(top:2.h,bottom: 16.h)
|
|
|
|
),
|
|
|
|
textItem("所在地区","湖北省武汉市武昌区"),
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: 1.h,
|
|
|
|
color: Color(0xFFEBECEF),
|
|
|
|
margin: EdgeInsets.only(top:2.h,bottom: 16.h)
|
|
|
|
),
|
|
|
|
textItem("详细地址","武汉市武昌区221过道谢谢谢谢谢吾问无为谓无无寻"),
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: 1.h,
|
|
|
|
color: Color(0xFFEBECEF),
|
|
|
|
margin: EdgeInsets.only(top:2.h,bottom: 16.h)
|
|
|
|
),
|
|
|
|
textItem("负责人电话","1122334444"),
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: 1.h,
|
|
|
|
color: Color(0xFFEBECEF),
|
|
|
|
margin: EdgeInsets.only(top:2.h,bottom: 16.h)
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Expanded(child:Text(
|
|
|
|
"是否在平台展示",
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 14.sp,
|
|
|
|
color: Color(0xFF808080),
|
|
|
|
fontWeight: MyFontWeight.medium),)),
|
|
|
|
GestureDetector(
|
|
|
|
behavior: HitTestBehavior.opaque,
|
|
|
|
onTap: (){
|
|
|
|
setState((){
|
|
|
|
checkIndex = 0;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
checkIndex == 0?
|
|
|
|
"assets/image/bs_check.webp":"assets/image/bs_uncheck.webp",
|
|
|
|
width: 16,
|
|
|
|
height: 16,
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
),
|
|
|
|
SizedBox(width:5.w,),
|
|
|
|
Text(
|
|
|
|
"是",
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 14.sp,
|
|
|
|
color: Color(0xFF1A1A1A),
|
|
|
|
fontWeight: MyFontWeight.medium),),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(width: 36.w,),
|
|
|
|
GestureDetector(
|
|
|
|
behavior: HitTestBehavior.opaque,
|
|
|
|
onTap: (){
|
|
|
|
setState((){
|
|
|
|
checkIndex = 1;
|
|
|
|
});},
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
checkIndex == 1?
|
|
|
|
"assets/image/bs_check.webp":"assets/image/bs_uncheck.webp",
|
|
|
|
width: 16,
|
|
|
|
height: 16,
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
),
|
|
|
|
SizedBox(width:5.w,),
|
|
|
|
Text(
|
|
|
|
"否",
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 14.sp,
|
|
|
|
color: Color(0xFF1A1A1A),
|
|
|
|
fontWeight: MyFontWeight.medium),)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
margin: EdgeInsets.only(bottom:55.h,top: 125.h),
|
|
|
|
padding: EdgeInsets.symmetric(vertical:16.h),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(27),
|
|
|
|
color: Color(0xFF30415B)
|
|
|
|
),
|
|
|
|
child: Text(
|
|
|
|
"保存",
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: MyFontWeight.semi_bold,
|
|
|
|
fontSize: 16.sp,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget textItem(left,right){
|
|
|
|
return Container(
|
|
|
|
padding: EdgeInsets.only(bottom: 16.h),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(child:Text(
|
|
|
|
left,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 14.sp,
|
|
|
|
color: Color(0xFF808080),
|
|
|
|
fontWeight: MyFontWeight.medium),)),
|
|
|
|
Expanded(child:
|
|
|
|
Text(
|
|
|
|
right,
|
|
|
|
maxLines: 2,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
textAlign: TextAlign.right,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 14.sp,
|
|
|
|
color: Color(0xFF1A1A1A),
|
|
|
|
fontWeight: MyFontWeight.medium),),flex: 3,),
|
|
|
|
],
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|