@@ -7,7 +7,6 @@ import 'package:flutter/services.dart'; | |||||
import 'package:flutter_alibc/alibc_const_key.dart'; | import 'package:flutter_alibc/alibc_const_key.dart'; | ||||
import 'package:flutter_alibc/alibc_model.dart'; | import 'package:flutter_alibc/alibc_model.dart'; | ||||
import 'package:flutter_alibc/flutter_alibc.dart'; | import 'package:flutter_alibc/flutter_alibc.dart'; | ||||
import 'package:flutter_screenutil/flutter_screenutil.dart'; | |||||
import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/model/has_goods_dialog_style_model.dart'; | import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/model/has_goods_dialog_style_model.dart'; | ||||
import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/model/intellect_dialog_data_model.dart'; | import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/model/intellect_dialog_data_model.dart'; | ||||
import 'package:zhiying_comm/zhiying_comm.dart'; | import 'package:zhiying_comm/zhiying_comm.dart'; | ||||
@@ -48,27 +47,27 @@ class _IntellectSearchGoodsDialogState | |||||
child: Stack( | child: Stack( | ||||
children: <Widget>[ | children: <Widget>[ | ||||
Container( | Container( | ||||
margin: EdgeInsets.only(top: 38.h, left: 92.w, right: 92.w), | margin: EdgeInsets.only(top: 19, left: 48, right: 48), | ||||
padding: EdgeInsets.only( | padding: EdgeInsets.only( | ||||
top: (38 + 38).h, | top: 38, | ||||
left: 30.w, | left: 15, | ||||
right: 30.w, | right: 15, | ||||
bottom: 48.h), | bottom: 24), | ||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
color: | color: | ||||
HexColor.fromHex(_styleModel?.bgColor ?? "#FFFFFF"), | HexColor.fromHex(_styleModel?.bgColor ?? "#FFFFFF"), | ||||
borderRadius: BorderRadius.circular(16)), | borderRadius: BorderRadius.circular(16)), | ||||
width: double.infinity, | width: double.infinity, | ||||
child: Column( | child: Column( | ||||
children: <Widget>[_bulidTopItem(), _buildBottomItem()], | children: <Widget>[_buildTopItem(), _buildBottomItem()], | ||||
), | ), | ||||
), | ), | ||||
Container( | Container( | ||||
height: 76.h, | height: 38, | ||||
child: Center( | child: Center( | ||||
child: Container( | child: Container( | ||||
height: 76.h, | height: 38, | ||||
width: 216.w, | width: 108, | ||||
child: CachedNetworkImage( | child: CachedNetworkImage( | ||||
imageUrl: _styleModel?.titleImg ?? "", | imageUrl: _styleModel?.titleImg ?? "", | ||||
fit: BoxFit.fill, | fit: BoxFit.fill, | ||||
@@ -84,13 +83,13 @@ class _IntellectSearchGoodsDialogState | |||||
); | ); | ||||
} | } | ||||
_bulidTopItem() { | _buildTopItem() { | ||||
return Row( | return Row( | ||||
crossAxisAlignment: CrossAxisAlignment.start, | crossAxisAlignment: CrossAxisAlignment.start, | ||||
children: <Widget>[ | children: <Widget>[ | ||||
Container( | Container( | ||||
width: 160.w, | width: 80, | ||||
height: 160.w, | height: 80, | ||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
borderRadius: BorderRadius.circular(6), | borderRadius: BorderRadius.circular(6), | ||||
image: DecorationImage( | image: DecorationImage( | ||||
@@ -99,7 +98,7 @@ class _IntellectSearchGoodsDialogState | |||||
fit: BoxFit.fill)), | fit: BoxFit.fill)), | ||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
width: 19.w, | width: 9.5, | ||||
), | ), | ||||
Expanded( | Expanded( | ||||
child: Container( | child: Container( | ||||
@@ -113,10 +112,10 @@ class _IntellectSearchGoodsDialogState | |||||
widget.model?.title ?? "", | widget.model?.title ?? "", | ||||
maxLines: 2, | maxLines: 2, | ||||
overflow: TextOverflow.ellipsis, | overflow: TextOverflow.ellipsis, | ||||
style: TextStyle(color: Colors.black, fontSize: 24.sp), | style: TextStyle(color: Colors.black, fontSize: 12), | ||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
height: 5.h, | height: 5, | ||||
), | ), | ||||
Row( | Row( | ||||
children: <Widget>[ | children: <Widget>[ | ||||
@@ -132,8 +131,8 @@ class _IntellectSearchGoodsDialogState | |||||
mainAxisSize: MainAxisSize.min, | mainAxisSize: MainAxisSize.min, | ||||
children: <Widget>[ | children: <Widget>[ | ||||
Container( | Container( | ||||
width: 30.w, | width: 15, | ||||
height: 30.w, | height: 15, | ||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
color: HexColor.fromHex(_styleModel | color: HexColor.fromHex(_styleModel | ||||
?.moduleList?.coupon?.bgColor ?? | ?.moduleList?.coupon?.bgColor ?? | ||||
@@ -149,7 +148,7 @@ class _IntellectSearchGoodsDialogState | |||||
?.coupon | ?.coupon | ||||
?.fontColor ?? | ?.fontColor ?? | ||||
""), | ""), | ||||
fontSize: 20.sp), | fontSize: 10), | ||||
), | ), | ||||
), | ), | ||||
), | ), | ||||
@@ -163,7 +162,7 @@ class _IntellectSearchGoodsDialogState | |||||
?.moduleList | ?.moduleList | ||||
?.couponPrice | ?.couponPrice | ||||
?.fontColor), | ?.fontColor), | ||||
fontSize: 20.sp), | fontSize: 10), | ||||
), | ), | ||||
) | ) | ||||
], | ], | ||||
@@ -179,7 +178,7 @@ class _IntellectSearchGoodsDialogState | |||||
mainAxisSize: MainAxisSize.min, | mainAxisSize: MainAxisSize.min, | ||||
children: <Widget>[ | children: <Widget>[ | ||||
SizedBox( | SizedBox( | ||||
height: 30.w, | height: 15, | ||||
), | ), | ||||
Center( | Center( | ||||
child: Padding( | child: Padding( | ||||
@@ -197,7 +196,7 @@ class _IntellectSearchGoodsDialogState | |||||
?.commission | ?.commission | ||||
?.fontColor ?? | ?.fontColor ?? | ||||
""), | ""), | ||||
fontSize: 20.sp), | fontSize: 10), | ||||
), | ), | ||||
), | ), | ||||
) | ) | ||||
@@ -209,7 +208,7 @@ class _IntellectSearchGoodsDialogState | |||||
], | ], | ||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
height: 10.h, | height: 5, | ||||
), | ), | ||||
Row( | Row( | ||||
crossAxisAlignment: CrossAxisAlignment.end, | crossAxisAlignment: CrossAxisAlignment.end, | ||||
@@ -219,7 +218,7 @@ class _IntellectSearchGoodsDialogState | |||||
child: Text( | child: Text( | ||||
_styleModel?.moduleList?.couponAfter?.content ?? "", | _styleModel?.moduleList?.couponAfter?.content ?? "", | ||||
style: TextStyle( | style: TextStyle( | ||||
fontSize: 20.sp, | fontSize: 10, | ||||
color: HexColor.fromHex(_styleModel | color: HexColor.fromHex(_styleModel | ||||
?.moduleList?.couponAfterPrice?.fontColor ?? | ?.moduleList?.couponAfterPrice?.fontColor ?? | ||||
"")), | "")), | ||||
@@ -231,7 +230,7 @@ class _IntellectSearchGoodsDialogState | |||||
child: Text( | child: Text( | ||||
"¥", | "¥", | ||||
style: TextStyle( | style: TextStyle( | ||||
fontSize: 20.sp, | fontSize: 10, | ||||
color: HexColor.fromHex(_styleModel | color: HexColor.fromHex(_styleModel | ||||
?.moduleList?.couponAfterPrice?.fontColor ?? | ?.moduleList?.couponAfterPrice?.fontColor ?? | ||||
"")), | "")), | ||||
@@ -246,7 +245,7 @@ class _IntellectSearchGoodsDialogState | |||||
"", | "", | ||||
maxLines: 1, | maxLines: 1, | ||||
style: TextStyle( | style: TextStyle( | ||||
fontSize: 32.sp, | fontSize: 16, | ||||
color: HexColor.fromHex(_styleModel | color: HexColor.fromHex(_styleModel | ||||
?.moduleList?.couponAfterPrice?.fontColor), | ?.moduleList?.couponAfterPrice?.fontColor), | ||||
), | ), | ||||
@@ -272,7 +271,7 @@ class _IntellectSearchGoodsDialogState | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Expanded( | Expanded( | ||||
child: Container( | child: Container( | ||||
margin: EdgeInsets.only(left: 20.w, right: 20.w), | margin: EdgeInsets.only(left: 10, right: 10), | ||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
_styleModel?.moduleList?.saveBtn?.bgColor ?? ""), | _styleModel?.moduleList?.saveBtn?.bgColor ?? ""), | ||||
@@ -290,7 +289,7 @@ class _IntellectSearchGoodsDialogState | |||||
style: TextStyle( | style: TextStyle( | ||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
_styleModel?.moduleList?.saveBtn?.fontColor), | _styleModel?.moduleList?.saveBtn?.fontColor), | ||||
fontSize: 24.sp), | fontSize: 12), | ||||
), | ), | ||||
)), | )), | ||||
)) | )) | ||||
@@ -308,7 +307,7 @@ class _IntellectSearchGoodsDialogState | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Expanded( | Expanded( | ||||
child: Container( | child: Container( | ||||
margin: EdgeInsets.only(left: 20.w, right: 20.w), | margin: EdgeInsets.only(left: 10, right:10), | ||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
_styleModel?.moduleList?.viewGoodsBtn?.bgColor ?? ""), | _styleModel?.moduleList?.viewGoodsBtn?.bgColor ?? ""), | ||||
@@ -322,7 +321,7 @@ class _IntellectSearchGoodsDialogState | |||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
_styleModel?.moduleList?.viewGoodsBtn?.fontColor ?? | _styleModel?.moduleList?.viewGoodsBtn?.fontColor ?? | ||||
""), | ""), | ||||
fontSize: 24.sp), | fontSize: 12), | ||||
), | ), | ||||
)), | )), | ||||
)) | )) | ||||
@@ -1,10 +1,8 @@ | |||||
import 'dart:convert'; | import 'dart:convert'; | ||||
import 'package:flutter/material.dart'; | import 'package:flutter/material.dart'; | ||||
import 'package:flutter/services.dart'; | import 'package:flutter/services.dart'; | ||||
import 'package:flutter_screenutil/flutter_screenutil.dart'; | |||||
import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/model/intellect_dialog_data_model.dart'; | import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/model/intellect_dialog_data_model.dart'; | ||||
import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/model/no_goods_dialog_style_model.dart'; | import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/model/no_goods_dialog_style_model.dart'; | ||||
import 'package:zhiying_base_widget/widgets/home/home_quick_entry/cached_network_image_util.dart'; | |||||
import 'package:cached_network_image/cached_network_image.dart'; | import 'package:cached_network_image/cached_network_image.dart'; | ||||
import 'package:zhiying_comm/zhiying_comm.dart'; | import 'package:zhiying_comm/zhiying_comm.dart'; | ||||
@@ -64,12 +62,9 @@ class _IntellectSearchNoGoodsDialogState | |||||
Stack( | Stack( | ||||
children: <Widget>[ | children: <Widget>[ | ||||
Container( | Container( | ||||
margin: EdgeInsets.only(top: 38.h, left: 92.w, right: 92.w), | margin: EdgeInsets.only(top: 19, left: 42.5, right: 42.5), | ||||
padding: EdgeInsets.only( | padding: EdgeInsets.only( | ||||
top: (38 + 15).h, | top: 26, left: 15, right: 15, bottom: 24), | ||||
left: 30.w, | |||||
right: 30.w, | |||||
bottom: 48.h), | |||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
color: HexColor.fromHex(_styleModel?.bgColor ?? ""), | color: HexColor.fromHex(_styleModel?.bgColor ?? ""), | ||||
borderRadius: BorderRadius.circular(16)), | borderRadius: BorderRadius.circular(16)), | ||||
@@ -79,11 +74,11 @@ class _IntellectSearchNoGoodsDialogState | |||||
), | ), | ||||
), | ), | ||||
Container( | Container( | ||||
height: 76.h, | height: 38, | ||||
child: Center( | child: Center( | ||||
child: Container( | child: Container( | ||||
height: 76.h, | height: 38, | ||||
width: 216.w, | width: 108, | ||||
child: CachedNetworkImage( | child: CachedNetworkImage( | ||||
imageUrl: _styleModel?.titleImg ?? "", | imageUrl: _styleModel?.titleImg ?? "", | ||||
), | ), | ||||
@@ -106,7 +101,7 @@ class _IntellectSearchNoGoodsDialogState | |||||
style: TextStyle( | style: TextStyle( | ||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
_styleModel?.moduleList?.title?.textColor ?? ""), | _styleModel?.moduleList?.title?.textColor ?? ""), | ||||
fontSize: 30.sp), | fontSize: 15), | ||||
), | ), | ||||
Container( | Container( | ||||
margin: EdgeInsets.only(top: 12), | margin: EdgeInsets.only(top: 12), | ||||
@@ -120,7 +115,7 @@ class _IntellectSearchNoGoodsDialogState | |||||
style: TextStyle( | style: TextStyle( | ||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
_styleModel?.moduleList?.content?.textColor ?? ''), | _styleModel?.moduleList?.content?.textColor ?? ''), | ||||
fontSize: 22.sp), | fontSize: 11), | ||||
decoration: InputDecoration( | decoration: InputDecoration( | ||||
contentPadding: EdgeInsets.only(left: 10, top: 10, bottom: 4), | contentPadding: EdgeInsets.only(left: 10, top: 10, bottom: 4), | ||||
border: InputBorder.none, | border: InputBorder.none, | ||||
@@ -156,20 +151,21 @@ class _IntellectSearchNoGoodsDialogState | |||||
style: TextStyle( | style: TextStyle( | ||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
_styleModel?.moduleList?.btn?.textColor), | _styleModel?.moduleList?.btn?.textColor), | ||||
fontSize: 24.sp), | fontSize: 12), | ||||
), | ), | ||||
)), | )), | ||||
), | ), | ||||
onTap: () { | onTap: () { | ||||
RouterUtil.route( | RouterUtil.route( | ||||
SkipModel.fromJson( | SkipModel.fromJson( | ||||
_styleModel.moduleList.btn.skipInfo.toJson()), | _styleModel.moduleList.btn.skipInfo.toJson()), | ||||
{ | { | ||||
"keywords": searchText, | "keywords": searchText, | ||||
"type": _styleModel.moduleList.btn.skipInfo.pvd | "type": _styleModel.moduleList.btn.skipInfo.pvd | ||||
}, | }, | ||||
context).then((_){ | context) | ||||
Navigator.pop(context); | .then((_) { | ||||
Navigator.pop(context); | |||||
}); | }); | ||||
}, | }, | ||||
), | ), | ||||
@@ -184,7 +180,7 @@ class _IntellectSearchNoGoodsDialogState | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Container( | Container( | ||||
height: 1, | height: 1, | ||||
width: 137.w, | width: 68.5, | ||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
_styleModel?.moduleList?.segment?.textColor ?? ""), | _styleModel?.moduleList?.segment?.textColor ?? ""), | ||||
), | ), | ||||
@@ -196,7 +192,7 @@ class _IntellectSearchNoGoodsDialogState | |||||
), | ), | ||||
Container( | Container( | ||||
height: 1, | height: 1, | ||||
width: 137.w, | width: 68.5, | ||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
_styleModel?.moduleList?.segment?.textColor ?? ""), | _styleModel?.moduleList?.segment?.textColor ?? ""), | ||||
), | ), | ||||
@@ -206,7 +202,7 @@ class _IntellectSearchNoGoodsDialogState | |||||
height: 24, | height: 24, | ||||
), | ), | ||||
Container( | Container( | ||||
height: 100.w, | height: 50, | ||||
child: ListView.builder( | child: ListView.builder( | ||||
scrollDirection: Axis.horizontal, | scrollDirection: Axis.horizontal, | ||||
shrinkWrap: true, | shrinkWrap: true, | ||||
@@ -228,8 +224,8 @@ class _IntellectSearchNoGoodsDialogState | |||||
Container( | Container( | ||||
child: Image.network( | child: Image.network( | ||||
item.image ?? "", | item.image ?? "", | ||||
width: 60.w, | width: 30, | ||||
height: 60.w, | height: 30, | ||||
fit: BoxFit.fill, | fit: BoxFit.fill, | ||||
), | ), | ||||
), | ), | ||||
@@ -239,14 +235,17 @@ class _IntellectSearchNoGoodsDialogState | |||||
Text( | Text( | ||||
item.title ?? "", | item.title ?? "", | ||||
style: TextStyle( | style: TextStyle( | ||||
fontSize: 22.sp, | fontSize: 11, | ||||
color: HexColor.fromHex(item.textColor ?? "")), | color: HexColor.fromHex(item.textColor ?? "")), | ||||
) | ) | ||||
], | ], | ||||
), | ), | ||||
onTap: () { | onTap: () { | ||||
RouterUtil.route(SkipModel.fromJson(item.skipInfo.toJson()), | RouterUtil.route(SkipModel.fromJson(item.skipInfo.toJson()), | ||||
{"keywords": searchText, "type": item.pvd}, context); | {"keywords": searchText, "type": item.pvd}, context) | ||||
.then((value) { | |||||
Navigator.pop(context); | |||||
}); | |||||
}, | }, | ||||
)); | )); | ||||
} | } | ||||
@@ -94,7 +94,7 @@ class _SelectDateYMDialogState extends State<SelectDateYMDialog> | |||||
child: Row( | child: Row( | ||||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
children: <Widget>[ | children: <Widget>[ | ||||
GestureDetector( | InkWell( | ||||
child: Padding( | child: Padding( | ||||
padding: const EdgeInsets.only( | padding: const EdgeInsets.only( | ||||
left: 16, top: 8, bottom: 8, right: 16), | left: 16, top: 8, bottom: 8, right: 16), | ||||
@@ -102,7 +102,7 @@ class _SelectDateYMDialogState extends State<SelectDateYMDialog> | |||||
"取消", | "取消", | ||||
style: TextStyle( | style: TextStyle( | ||||
color: HexColor.fromHex("#FF999999"), | color: HexColor.fromHex("#FF999999"), | ||||
fontSize: 35.sp), | fontSize: 17.5), | ||||
), | ), | ||||
), | ), | ||||
onTap: () { | onTap: () { | ||||
@@ -110,7 +110,7 @@ class _SelectDateYMDialogState extends State<SelectDateYMDialog> | |||||
}, | }, | ||||
), | ), | ||||
Text("选择日期"), | Text("选择日期"), | ||||
GestureDetector( | InkWell( | ||||
child: Padding( | child: Padding( | ||||
padding: const EdgeInsets.only( | padding: const EdgeInsets.only( | ||||
right: 16, left: 16, bottom: 8, top: 8), | right: 16, left: 16, bottom: 8, top: 8), | ||||
@@ -118,7 +118,7 @@ class _SelectDateYMDialogState extends State<SelectDateYMDialog> | |||||
"确定", | "确定", | ||||
style: TextStyle( | style: TextStyle( | ||||
color: HexColor.fromHex("#FFFF4242"), | color: HexColor.fromHex("#FFFF4242"), | ||||
fontSize: 35.sp), | fontSize: 17.5), | ||||
), | ), | ||||
), | ), | ||||
onTap: () { | onTap: () { | ||||
@@ -181,7 +181,7 @@ class _SelectDateYMDialogState extends State<SelectDateYMDialog> | |||||
height: 40, | height: 40, | ||||
child: Center( | child: Center( | ||||
child: Text( | child: Text( | ||||
yearDate[index].toString() + "", | yearDate[index].toString() + "年", | ||||
style: TextStyle( | style: TextStyle( | ||||
color: | color: | ||||
index == selectYearIndex ? Colors.redAccent : Colors.black26), | index == selectYearIndex ? Colors.redAccent : Colors.black26), | ||||
@@ -22,7 +22,7 @@ class TipDialog extends StatelessWidget { | |||||
width: double.infinity, | width: double.infinity, | ||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
color: Colors.white, borderRadius: BorderRadius.circular(20)), | color: Colors.white, borderRadius: BorderRadius.circular(20)), | ||||
margin: EdgeInsets.only(left: 91.w, right: 91.w), | margin: EdgeInsets.only(left: 45, right: 45), | ||||
child: Column( | child: Column( | ||||
children: <Widget>[ | children: <Widget>[ | ||||
Row( | Row( | ||||
@@ -35,7 +35,7 @@ class TipDialog extends StatelessWidget { | |||||
Text( | Text( | ||||
title, | title, | ||||
style: TextStyle( | style: TextStyle( | ||||
fontSize: 30.sp, fontWeight: FontWeight.w400), | fontSize: 15, fontWeight: FontWeight.w500), | ||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
width: 48, | width: 48, | ||||
@@ -52,7 +52,7 @@ class TipDialog extends StatelessWidget { | |||||
constraints: BoxConstraints(minHeight: 100), | constraints: BoxConstraints(minHeight: 100), | ||||
child: Text( | child: Text( | ||||
content, | content, | ||||
style: TextStyle(fontSize: 26.sp), | style: TextStyle(fontSize: 13), | ||||
), | ), | ||||
), | ), | ||||
Row( | Row( | ||||
@@ -73,7 +73,7 @@ class TipDialog extends StatelessWidget { | |||||
btnText, | btnText, | ||||
style: TextStyle( | style: TextStyle( | ||||
color: HexColor.fromHex("#FFFFFF"), | color: HexColor.fromHex("#FFFFFF"), | ||||
fontSize: 26.sp), | fontSize: 13), | ||||
)), | )), | ||||
)) | )) | ||||
], | ], | ||||
@@ -0,0 +1,19 @@ | |||||
import 'dart:async'; | |||||
import 'package:zhiying_comm/util/base_bloc.dart'; | |||||
class BrandDetailBloc extends BlocBase { | |||||
List<Map<String, dynamic>> _pageData = List(); | |||||
StreamController<List<Map<String, dynamic>>> _dataController = | |||||
StreamController<List<Map<String, dynamic>>>.broadcast(); | |||||
Stream<List<Map<String, dynamic>>> get outData => _dataController.stream; | |||||
@override | |||||
void dispose() { | |||||
_dataController.close(); | |||||
} | |||||
} |
@@ -0,0 +1,41 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_base_widget/pages/brand_detail_page/brand_detail_page_skeleton.dart'; | |||||
import 'package:zhiying_comm/util/base_bloc.dart'; | |||||
import 'brand_detail_bloc.dart'; | |||||
class BrandDetailPage extends StatefulWidget { | |||||
@override | |||||
_BrandDetailPageState createState() => _BrandDetailPageState(); | |||||
} | |||||
class _BrandDetailPageState extends State<BrandDetailPage> { | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return BlocProvider(child: BrandDetailContainer(), bloc: BrandDetailBloc()); | |||||
} | |||||
} | |||||
class BrandDetailContainer extends StatefulWidget { | |||||
@override | |||||
_BrandDetailContainerState createState() => _BrandDetailContainerState(); | |||||
} | |||||
class _BrandDetailContainerState extends State<BrandDetailContainer> { | |||||
BrandDetailBloc _bloc; | |||||
@override | |||||
void initState() { | |||||
_bloc = BlocProvider.of<BrandDetailBloc>(context); | |||||
super.initState(); | |||||
} | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return StreamBuilder( | |||||
stream: _bloc.outData, | |||||
builder: (context, asny) { | |||||
return Scaffold(body: BrandDetailPageSkeleton()); | |||||
}); | |||||
} | |||||
} |
@@ -0,0 +1,37 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_base_widget/widgets/brand/brandDetailTabBarView/brand_detail_tab_bar_view.dart'; | |||||
import 'package:zhiying_base_widget/widgets/brand/brand_appbar/brand_appbar.dart'; | |||||
import 'package:zhiying_base_widget/widgets/brand/brand_detail_appbar/brand_detail_appbar.dart'; | |||||
import 'package:zhiying_base_widget/widgets/brand/brand_detail_recommend/brand_detail_recommend.dart'; | |||||
import 'package:zhiying_base_widget/widgets/brand/brand_detail_tab_bar/brand_detail_tab_bar.dart'; | |||||
import 'package:zhiying_base_widget/widgets/brand/brand_detail_top/brand_detail_top.dart'; | |||||
import 'package:zhiying_comm/util/custom_sliver_persistent_header_delegate.dart'; | |||||
class BrandDetailPageSkeleton extends StatelessWidget { | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return NestedScrollView( | |||||
headerSliverBuilder: (context, innerBoxIsScrolled) { | |||||
return headerBuild(); | |||||
}, | |||||
body: BrandTabBarView()); | |||||
} | |||||
List<Widget> headerBuild() { | |||||
List<Widget> listWidget = List(); | |||||
listWidget.add(BrandDetailAppBar()); | |||||
listWidget.add(SliverToBoxAdapter( | |||||
child: BrandDetailTop(), | |||||
)); | |||||
listWidget.add(SliverToBoxAdapter( | |||||
child: BrandDetailRecommend(), | |||||
)); | |||||
listWidget.add(SliverPersistentHeader( | |||||
pinned: true, | |||||
floating: false, | |||||
delegate: CustomSliverPersistentHeaderDelegate( | |||||
max: 48, min: 48, child: BrandDetailTabBar()), | |||||
)); | |||||
return listWidget; | |||||
} | |||||
} |
@@ -0,0 +1,87 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:provider/provider.dart'; | |||||
import 'package:zhiying_base_widget/pages/search_page/notifier/search_tag_notifier.dart'; | |||||
import 'package:zhiying_comm/util/base_bloc.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
import 'brand_page_bloc.dart'; | |||||
///品牌页面 | |||||
class BrandPage extends StatefulWidget { | |||||
@override | |||||
_BrandPageState createState() => _BrandPageState(); | |||||
} | |||||
class _BrandPageState extends State<BrandPage> { | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return MultiProvider( | |||||
providers: [ChangeNotifierProvider.value(value: SearchTagNotifier())], | |||||
child: BlocProvider(child: BrandPageContainer(), bloc: BrandBloc())); | |||||
} | |||||
} | |||||
class BrandPageContainer extends StatefulWidget { | |||||
@override | |||||
_BrandPageContainerState createState() => _BrandPageContainerState(); | |||||
} | |||||
class _BrandPageContainerState extends State<BrandPageContainer> { | |||||
@override | |||||
void initState() { | |||||
super.initState(); | |||||
} | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return StreamBuilder(builder: (context, asyn) { | |||||
var model=asyn.data; | |||||
if(model==null){ | |||||
return Container();///骨架图 | |||||
} | |||||
return Scaffold( | |||||
appBar: AppBar( | |||||
centerTitle: true, | |||||
title: Text("大牌秒杀",style: TextStyle(color: HexColor.fromHex("#FFFFFF"),fontSize: 17),), | |||||
), | |||||
body: Container( | |||||
child: Stack( | |||||
children: <Widget>[ | |||||
CustomScrollView( | |||||
slivers: _createContent(context, model), | |||||
) | |||||
], | |||||
), | |||||
), | |||||
); | |||||
}); | |||||
} | |||||
} | |||||
///构建子模块 | |||||
_createContent(BuildContext context, List<Map<String, dynamic>> model) { | |||||
List<Widget> list = List(); | |||||
if (model == null) { | |||||
///骨架图 | |||||
} else { | |||||
for (var item in model) { | |||||
WidgetModel widgetModel = | |||||
WidgetModel.fromJson(Map<String, dynamic>.from(item)); | |||||
if (item.containsKey("mod_name") && | |||||
item['mod_name'] == "hot_rank_tab_view") { | |||||
list.add(Expanded( | |||||
child: WidgetFactory.create(widgetModel.modName, | |||||
isSliver: false, model: item)[0])); | |||||
continue; | |||||
} | |||||
list.addAll(WidgetFactory.create(widgetModel.modName, | |||||
isSliver: false, model: item)); | |||||
} | |||||
} | |||||
return list; | |||||
} |
@@ -0,0 +1,18 @@ | |||||
import 'dart:async'; | |||||
import 'package:zhiying_comm/util/base_bloc.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
class BrandBloc extends BlocBase { | |||||
List<Map<String, dynamic>> _pageData = List(); | |||||
StreamController<List<Map<String, dynamic>>> _dataController = | |||||
StreamController<List<Map<String, dynamic>>>.broadcast(); | |||||
Stream<List<Map<String, dynamic>>> get outData => _dataController.stream; | |||||
@override | |||||
void dispose() { | |||||
_dataController.close(); | |||||
} | |||||
} |
@@ -0,0 +1,49 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_base_widget/widgets/brand/brand_appbar/brand_appbar.dart'; | |||||
import 'package:zhiying_base_widget/widgets/brand/brand_appbar/brand_appbar_sk.dart'; | |||||
import 'package:zhiying_base_widget/widgets/brand/brand_list/brand_list.dart'; | |||||
import 'package:zhiying_base_widget/widgets/brand/brand_list/brand_list_sk.dart'; | |||||
import 'package:zhiying_base_widget/widgets/brand/tabbar/brand_tab_bar.dart'; | |||||
class BrandPageSkeleton extends StatefulWidget { | |||||
@override | |||||
_BrandPageSkeletonState createState() => _BrandPageSkeletonState(); | |||||
} | |||||
class _BrandPageSkeletonState extends State<BrandPageSkeleton> | |||||
with TickerProviderStateMixin { | |||||
TabController tabController; | |||||
@override | |||||
void initState() { | |||||
tabController = TabController(length: 6, vsync: this); | |||||
super.initState(); | |||||
} | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return buildSkeleton(); | |||||
return Scaffold( | |||||
body: Column( | |||||
crossAxisAlignment: CrossAxisAlignment.start, | |||||
children: <Widget>[ | |||||
BrandAppBar(), | |||||
BrandTabBar(tabController), | |||||
Expanded(child: BrandList(tabController)) | |||||
], | |||||
), | |||||
); | |||||
} | |||||
@override | |||||
void dispose() { | |||||
tabController.dispose(); | |||||
super.dispose(); | |||||
} | |||||
Widget buildSkeleton() { | |||||
return Column( | |||||
children: <Widget>[BrandAppBarSkeleton(), BrandListSkeleton()], | |||||
); | |||||
} | |||||
} |
@@ -0,0 +1,106 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_base_widget/pages/brand_search_page/brand_search_page_bloc.dart'; | |||||
import 'package:zhiying_comm/util/base_bloc.dart'; | |||||
import 'package:zhiying_comm/util/extension/color.dart'; | |||||
class BrandSearchPage extends StatefulWidget { | |||||
@override | |||||
_BrandSearchPageState createState() => _BrandSearchPageState(); | |||||
} | |||||
class _BrandSearchPageState extends State<BrandSearchPage> { | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return BlocProvider( | |||||
child: BrandSearchContainer(), bloc: BrandSearchPageBloc()); | |||||
} | |||||
} | |||||
class BrandSearchContainer extends StatefulWidget { | |||||
@override | |||||
_BrandSearchContainerState createState() => _BrandSearchContainerState(); | |||||
} | |||||
class _BrandSearchContainerState extends State<BrandSearchContainer> { | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return StreamBuilder(builder: (context, asycn) { | |||||
return Scaffold( | |||||
appBar: AppBar( | |||||
leading: Navigator.canPop(context) | |||||
? IconButton(icon: Icon(Icons.arrow_back_ios), onPressed: () {}) | |||||
: null, | |||||
centerTitle: true, | |||||
title: _buildTopSearch(), | |||||
), | |||||
); | |||||
}); | |||||
} | |||||
_buildTopSearch() { | |||||
return Container( | |||||
height: 35, | |||||
child: Stack( | |||||
children: <Widget>[ | |||||
Row( | |||||
mainAxisSize: MainAxisSize.max, | |||||
children: <Widget>[ | |||||
Expanded( | |||||
child: Container( | |||||
height: 35, | |||||
margin: EdgeInsets.only(right: 35), | |||||
padding: EdgeInsets.only(left: 16), | |||||
decoration: BoxDecoration( | |||||
color: Colors.grey[100], | |||||
borderRadius: BorderRadius.circular(32)), | |||||
child: Row( | |||||
children: <Widget>[ | |||||
Icon( | |||||
Icons.search, | |||||
color: Colors.grey[400], | |||||
), | |||||
SizedBox( | |||||
width: 8, | |||||
), | |||||
Expanded( | |||||
child: TextField( | |||||
onSubmitted: (value) => toSearch(value), | |||||
style: TextStyle(fontSize: 16), | |||||
decoration: InputDecoration( | |||||
isDense: true, | |||||
border: InputBorder.none, | |||||
contentPadding: EdgeInsets.zero, | |||||
), | |||||
), | |||||
), | |||||
], | |||||
), | |||||
), | |||||
), | |||||
], | |||||
), | |||||
Align( | |||||
alignment: Alignment.centerRight, | |||||
child: Container( | |||||
width: 65, | |||||
child: FlatButton( | |||||
color: Colors.red, | |||||
padding: EdgeInsets.only(left: 0), | |||||
onPressed: () {}, | |||||
child: Text( | |||||
"搜索", | |||||
style: TextStyle(color: HexColor.fromHex("#FFFFFF")), | |||||
), | |||||
shape: RoundedRectangleBorder( | |||||
borderRadius: BorderRadius.circular(32)), | |||||
), | |||||
), | |||||
) | |||||
], | |||||
), | |||||
); | |||||
} | |||||
///搜索 | |||||
toSearch(String value) {} | |||||
} |
@@ -0,0 +1,18 @@ | |||||
import 'dart:async'; | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_comm/util/base_bloc.dart'; | |||||
class BrandSearchPageBloc extends BlocBase { | |||||
List<Map<String, dynamic>> _pageData = List(); | |||||
StreamController<List<Map<String, dynamic>>> _dataController = | |||||
StreamController<List<Map<String, dynamic>>>.broadcast(); | |||||
Stream<List<Map<String, dynamic>>> get outData => _dataController.stream; | |||||
@override | |||||
void dispose() { | |||||
_dataController.close(); | |||||
} | |||||
} |
@@ -106,7 +106,7 @@ class _WalletPageContainerState extends State<_WalletPageContainer> { | |||||
_refreshController.refreshCompleted(); | _refreshController.refreshCompleted(); | ||||
return Stack( | return Stack( | ||||
children: <Widget>[ | children: <Widget>[ | ||||
Container(height: 362.h, color: _pageBloc.backgroundColor), | Container(height: 181, color: _pageBloc.backgroundColor), | ||||
SmartRefresher( | SmartRefresher( | ||||
controller: _refreshController, | controller: _refreshController, | ||||
enablePullDown: true, | enablePullDown: true, | ||||
@@ -156,27 +156,27 @@ class _WalletPageContainerState extends State<_WalletPageContainer> { | |||||
} | } | ||||
} | } | ||||
class _SilverAppBarDelegate extends SliverPersistentHeaderDelegate { | // class _SilverAppBarDelegate extends SliverPersistentHeaderDelegate { | ||||
_SilverAppBarDelegate(BuildContext context, this.child) { | // _SilverAppBarDelegate(BuildContext context, this.child) { | ||||
this.context = context; | // this.context = context; | ||||
} | // } | ||||
// | |||||
BuildContext context; | // BuildContext context; | ||||
final Widget child; | // final Widget child; | ||||
// | |||||
@override | // @override | ||||
double get minExtent => MediaQuery.of(context).padding.top + 44; | // double get minExtent => MediaQuery.of(context).padding.top + 44; | ||||
// | |||||
@override | // @override | ||||
double get maxExtent => MediaQuery.of(context).padding.top + 44; | // double get maxExtent => MediaQuery.of(context).padding.top + 44; | ||||
// | |||||
@override | // @override | ||||
Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) { | // Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) { | ||||
return child; | // return child; | ||||
} | // } | ||||
// | |||||
@override | // @override | ||||
bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) { | // bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) { | ||||
return false; | // return false; | ||||
} | // } | ||||
} | // } |
@@ -6,6 +6,10 @@ import 'package:sharesdk_plugin/sharesdk_register.dart'; | |||||
import 'package:zhiying_base_widget/models/app_config_model.dart'; | import 'package:zhiying_base_widget/models/app_config_model.dart'; | ||||
import 'package:zhiying_base_widget/pages/about_us_page/about_us_page.dart'; | import 'package:zhiying_base_widget/pages/about_us_page/about_us_page.dart'; | ||||
import 'package:zhiying_base_widget/pages/bil_detail_page/bil_detail_page.dart'; | import 'package:zhiying_base_widget/pages/bil_detail_page/bil_detail_page.dart'; | ||||
import 'package:zhiying_base_widget/pages/brand_detail_page/brand_detail_page.dart'; | |||||
import 'package:zhiying_base_widget/pages/brand_detail_page/brand_detail_page_skeleton.dart'; | |||||
import 'package:zhiying_base_widget/pages/brand_page/brand_page_skeleton.dart'; | |||||
import 'package:zhiying_base_widget/pages/brand_search_page/brand_search_page.dart'; | |||||
import 'package:zhiying_base_widget/pages/feedback_page/feedback_page.dart'; | import 'package:zhiying_base_widget/pages/feedback_page/feedback_page.dart'; | ||||
import 'package:zhiying_base_widget/pages/feedback_page/feedback_record_page.dart'; | import 'package:zhiying_base_widget/pages/feedback_page/feedback_record_page.dart'; | ||||
import 'package:zhiying_base_widget/pages/goods_details_page/goods_details_page.dart'; | import 'package:zhiying_base_widget/pages/goods_details_page/goods_details_page.dart'; | ||||
@@ -0,0 +1,155 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
class BrandTabBarView extends StatefulWidget { | |||||
final TabController tabController; | |||||
const BrandTabBarView({Key key, this.tabController}) : super(key: key); | |||||
@override | |||||
_BrandTabBarViewState createState() => _BrandTabBarViewState(); | |||||
} | |||||
class _BrandTabBarViewState extends State<BrandTabBarView> { | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Container( | |||||
child: Column( | |||||
children: <Widget>[ | |||||
Container( | |||||
margin: EdgeInsets.only(left: 10, right: 10), | |||||
decoration: BoxDecoration( | |||||
color: Colors.white, | |||||
), | |||||
child: Padding( | |||||
padding: EdgeInsets.only(top: 8, bottom: 8), | |||||
child: Row( | |||||
mainAxisAlignment: MainAxisAlignment.spaceAround, | |||||
children: buildSelectItem(), | |||||
), | |||||
), | |||||
), | |||||
Divider( | |||||
height: 2, | |||||
endIndent: 32, | |||||
indent: 32, | |||||
), | |||||
Expanded( | |||||
child: ListView.builder( | |||||
padding: EdgeInsets.all(0), | |||||
itemCount: 10, | |||||
itemBuilder: _buildGoods)) | |||||
], | |||||
), | |||||
); | |||||
} | |||||
buildSelectItem() { | |||||
List<Widget> listWidget = List(); | |||||
for (var index = 0; index < 3; index++) { | |||||
listWidget.add(Text("价格")); | |||||
} | |||||
return listWidget; | |||||
} | |||||
Widget _buildGoods(BuildContext context, int index) { | |||||
return Container( | |||||
decoration: BoxDecoration(color: Colors.white), | |||||
margin: EdgeInsets.only(left: 10, right: 10, bottom: 10), | |||||
padding: EdgeInsets.all(10), | |||||
child: Row( | |||||
children: <Widget>[ | |||||
Container(), | |||||
Container( | |||||
width: 82, | |||||
height: 82, | |||||
decoration: BoxDecoration( | |||||
image: DecorationImage( | |||||
image: CachedNetworkImageProvider( | |||||
"https://alipic.lanhuapp.com/SketchPngd755e6f62dfaf7bae4da8bf384a5ef25bde99ae5e4f34424c5d404c805775bc1"))), | |||||
), | |||||
SizedBox( | |||||
width: 10, | |||||
), | |||||
Expanded( | |||||
child: Column( | |||||
mainAxisAlignment: MainAxisAlignment.start, | |||||
crossAxisAlignment: CrossAxisAlignment.start, | |||||
children: <Widget>[ | |||||
Text( | |||||
"王一博同款高露洁氨基酸精华漱口水双支装", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FF333333"), | |||||
fontSize: 13, | |||||
fontWeight: FontWeight.w500), | |||||
), | |||||
SizedBox( | |||||
height: 8, | |||||
), | |||||
Row( | |||||
crossAxisAlignment: CrossAxisAlignment.end, | |||||
children: <Widget>[ | |||||
Container( | |||||
color: Colors.red, | |||||
child: Text( | |||||
"到手价", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FFFFFF"), fontSize: 12), | |||||
), | |||||
), | |||||
SizedBox( | |||||
width: 4, | |||||
), | |||||
Padding( | |||||
padding: EdgeInsets.only(bottom: 1), | |||||
child: Text( | |||||
"¥", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FFFF4242"), fontSize: 11), | |||||
), | |||||
), | |||||
Text( | |||||
"89.98", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FFFF4242"), fontSize: 18), | |||||
), | |||||
SizedBox( | |||||
width: 4, | |||||
), | |||||
Text( | |||||
"¥89.98", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FFACACAC"), | |||||
fontSize: 10, | |||||
decoration: TextDecoration.lineThrough), | |||||
), | |||||
], | |||||
), | |||||
SizedBox( | |||||
height: 8, | |||||
), | |||||
Row( | |||||
children: buildCoupon(), | |||||
) | |||||
], | |||||
)) | |||||
], | |||||
), | |||||
); | |||||
} | |||||
buildCoupon() { | |||||
List<Widget> listWidget = List(); | |||||
for (var index = 0; index < 3; index++) { | |||||
listWidget.add(Container( | |||||
decoration: BoxDecoration(color: HexColor.fromHex("#FFFEEFEF")), | |||||
padding: EdgeInsets.only(left: 4, right: 4, bottom: 1, top: 1), | |||||
child: Text( | |||||
"50元", | |||||
style: TextStyle(color: HexColor.fromHex("#FFFF4242"), fontSize: 11), | |||||
), | |||||
)); | |||||
} | |||||
return listWidget; | |||||
} | |||||
} |
@@ -0,0 +1,29 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_comm/util/extension/color.dart'; | |||||
class BrandAppBar extends StatelessWidget { | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return SliverAppBar( | |||||
centerTitle: true, | |||||
elevation: 0, | |||||
floating: false, | |||||
snap: false, | |||||
pinned: true, | |||||
leading: Navigator.canPop(context) | |||||
? IconButton( | |||||
icon: Icon( | |||||
Icons.arrow_back_ios, | |||||
size: 12, | |||||
), | |||||
onPressed: () { | |||||
Navigator.pop(context); | |||||
}) | |||||
: Container(), | |||||
title: Text( | |||||
"大牌秒杀", | |||||
style: TextStyle(color: HexColor.fromHex("#FFFFFF")), | |||||
), | |||||
); | |||||
} | |||||
} |
@@ -0,0 +1,17 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
import 'package:shimmer/shimmer.dart'; | |||||
class BrandAppBarSkeleton extends StatelessWidget { | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Shimmer.fromColors( | |||||
baseColor: Colors.grey[300], | |||||
highlightColor: Colors.grey[100], | |||||
child: Container( | |||||
color: Colors.white, | |||||
height: MediaQuery.of(context).padding.top + 46, | |||||
width: double.infinity, | |||||
)); | |||||
} | |||||
} |
@@ -0,0 +1,30 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_comm/util/extension/color.dart'; | |||||
class BrandDetailAppBar extends StatelessWidget { | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return SliverAppBar( | |||||
backgroundColor: Colors.transparent, | |||||
centerTitle: true, | |||||
elevation: 0, | |||||
floating: false, | |||||
snap: false, | |||||
pinned: true, | |||||
leading: Navigator.canPop(context) | |||||
? IconButton( | |||||
icon: Icon( | |||||
Icons.arrow_back_ios, | |||||
size: 12, | |||||
), | |||||
onPressed: () { | |||||
Navigator.pop(context); | |||||
}) | |||||
: Container(), | |||||
title: Text( | |||||
"品牌详情", | |||||
style: TextStyle(color: HexColor.fromHex("#FFFFFF"), fontSize: 15), | |||||
), | |||||
); | |||||
} | |||||
} |
@@ -0,0 +1,114 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
class BrandDetailRecommend extends StatelessWidget { | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Container( | |||||
margin: EdgeInsets.only(left: 10, right: 10, top: 10,bottom: 8), | |||||
decoration: BoxDecoration( | |||||
color: HexColor.fromHex("#FFFFFF"), | |||||
borderRadius: BorderRadius.circular(8)), | |||||
padding: EdgeInsets.only(top: 12, bottom: 12), | |||||
child: Column( | |||||
children: <Widget>[ | |||||
Text( | |||||
"爆款推荐", | |||||
style: TextStyle(color: HexColor.fromHex("#FF1D1D1D")), | |||||
), | |||||
SizedBox( | |||||
height: 5, | |||||
), | |||||
Container( | |||||
width: 27, | |||||
height: 2.5, | |||||
color: HexColor.fromHex("#FFFF4242"), | |||||
), | |||||
SizedBox( | |||||
height: 9, | |||||
), | |||||
Row(children: buildItem()), | |||||
], | |||||
)); | |||||
} | |||||
///构建子项 | |||||
buildItem() { | |||||
List<Widget> listWidget = List(); | |||||
for (var index = 0; index < 3; index++) { | |||||
listWidget.add(Expanded( | |||||
flex: 1, | |||||
child: Container( | |||||
margin: EdgeInsets.only(left: 4, right: 4), | |||||
child: Stack(children: <Widget>[ | |||||
Column( | |||||
children: <Widget>[ | |||||
CachedNetworkImage( | |||||
imageUrl: | |||||
"https://alipic.lanhuapp.com/SketchPngd755e6f62dfaf7bae4da8bf384a5ef25bde99ae5e4f34424c5d404c805775bc1", | |||||
fit: BoxFit.fitWidth, | |||||
), | |||||
Container( | |||||
padding: | |||||
EdgeInsets.only(left: 0, right: 0, top: 0, bottom: 0), | |||||
margin: EdgeInsets.only(left: 10, right: 10, top: 10), | |||||
decoration: BoxDecoration( | |||||
image: DecorationImage( | |||||
fit: BoxFit.fill, | |||||
image: CachedNetworkImageProvider( | |||||
"https://alipic.lanhuapp.com/SketchPng4f1ab85a62b33508b27e51c317ffb4f19d7dd5dcc70fadf50169cbc68d046cfb"))), | |||||
child: Center( | |||||
child: Padding( | |||||
padding: EdgeInsets.only( | |||||
top: 1, bottom: 1, left: 16, right: 16), | |||||
child: Text( | |||||
"热卖3.5万", | |||||
style: TextStyle( | |||||
fontSize: 12, color: HexColor.fromHex("#FFFFFF")), | |||||
), | |||||
), | |||||
), | |||||
), | |||||
SizedBox( | |||||
height: 7, | |||||
), | |||||
Row( | |||||
crossAxisAlignment: CrossAxisAlignment.end, | |||||
mainAxisAlignment: MainAxisAlignment.center, | |||||
children: <Widget>[ | |||||
Padding( | |||||
padding: EdgeInsets.only(bottom: 1), | |||||
child: Text( | |||||
"¥", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FFFF4242"), fontSize: 10), | |||||
), | |||||
), | |||||
Text( | |||||
"23.9", | |||||
style: TextStyle( | |||||
fontWeight: FontWeight.bold, | |||||
color: HexColor.fromHex("#FFFF4242"), | |||||
fontSize: 15), | |||||
), | |||||
SizedBox( | |||||
width: 10, | |||||
), | |||||
Text( | |||||
"¥23.9", | |||||
style: TextStyle( | |||||
decoration: TextDecoration.lineThrough, | |||||
color: HexColor.fromHex("#FFACACAC"), | |||||
fontSize: 15), | |||||
) | |||||
], | |||||
) | |||||
], | |||||
), | |||||
]), | |||||
), | |||||
)); | |||||
} | |||||
return listWidget; | |||||
} | |||||
} |
@@ -0,0 +1,68 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_comm/util/extension/color.dart'; | |||||
///品牌详情的 | |||||
class BrandDetailTabBar extends StatefulWidget { | |||||
final TabController tabController; | |||||
const BrandDetailTabBar({Key key, this.tabController}) : super(key: key); | |||||
@override | |||||
_BrandDetailTabBarState createState() => _BrandDetailTabBarState(); | |||||
} | |||||
class _BrandDetailTabBarState extends State<BrandDetailTabBar> | |||||
with TickerProviderStateMixin { | |||||
int currentSelectIndex = 0; | |||||
TabController tabController; | |||||
@override | |||||
void initState() { | |||||
tabController = TabController(length: 3, vsync: this); | |||||
tabController.addListener(() { | |||||
currentSelectIndex = tabController.index; | |||||
setState(() {}); | |||||
}); | |||||
super.initState(); | |||||
} | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Container( | |||||
decoration: BoxDecoration(color: HexColor.fromHex("#FFFFFF")), | |||||
padding: EdgeInsets.only(left: 10, right: 10,top: 4,bottom: 4), | |||||
margin: EdgeInsets.only(top: 0, left: 10, right: 10), | |||||
child: TabBar( | |||||
isScrollable: true, | |||||
controller: tabController, | |||||
tabs: _buildTabs(), | |||||
indicatorWeight: 0.01, | |||||
), | |||||
); | |||||
} | |||||
_buildTabs() { | |||||
List<Widget> listWidget = List(); | |||||
for (var index = 0; index < 3; index++) { | |||||
listWidget.add(Container( | |||||
child: Column( | |||||
mainAxisAlignment: MainAxisAlignment.center, | |||||
children: <Widget>[ | |||||
Text( | |||||
"全部", | |||||
style: | |||||
TextStyle(color: HexColor.fromHex("#FFF84F45"), fontSize: 14), | |||||
), | |||||
Container( | |||||
width: 40, | |||||
height: 2, | |||||
color: | |||||
currentSelectIndex == index ? Colors.red : Colors.transparent, | |||||
) | |||||
], | |||||
), | |||||
)); | |||||
} | |||||
return listWidget; | |||||
} | |||||
} |
@@ -0,0 +1,146 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_comm/util/custom_sliver_persistent_header_delegate.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
class BrandDetailTop extends StatefulWidget { | |||||
@override | |||||
_BrandDetailTopState createState() => _BrandDetailTopState(); | |||||
} | |||||
class _BrandDetailTopState extends State<BrandDetailTop> { | |||||
bool isOpen = false; | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Stack( | |||||
children: <Widget>[ | |||||
Container( | |||||
margin: EdgeInsets.only(left: 10, right: 10, top: 30), | |||||
decoration: BoxDecoration( | |||||
color: HexColor.fromHex("#FFFFFF"), | |||||
borderRadius: BorderRadius.circular(8)), | |||||
padding: EdgeInsets.only(top: 45, bottom: 12), | |||||
width: double.infinity, | |||||
child: Column( | |||||
children: <Widget>[ | |||||
Text( | |||||
"高露洁", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FF1D1D1D"), fontSize: 15), | |||||
), | |||||
SizedBox( | |||||
height: 4, | |||||
), | |||||
Container( | |||||
decoration: BoxDecoration( | |||||
color: HexColor.fromHex("#FFFFECEC"), | |||||
borderRadius: BorderRadius.circular(40)), | |||||
child: Padding( | |||||
padding: EdgeInsets.only(left: 4, right: 4), | |||||
child: Text( | |||||
"拥有百年历史的口腔护理专家", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FFFF4242"), fontSize: 10), | |||||
), | |||||
), | |||||
), | |||||
SizedBox( | |||||
height: 14, | |||||
), | |||||
Row( | |||||
mainAxisAlignment: MainAxisAlignment.center, | |||||
children: <Widget>[ | |||||
Text( | |||||
"粉丝:", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FF343434"), fontSize: 10), | |||||
), | |||||
Text( | |||||
"888.8万", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FF343434"), fontSize: 10), | |||||
), | |||||
SizedBox( | |||||
width: 11.5, | |||||
), | |||||
Text( | |||||
"近期销量:", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FF343434"), fontSize: 10), | |||||
), | |||||
Text( | |||||
"22.2万", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FF343434"), fontSize: 10), | |||||
), | |||||
], | |||||
), | |||||
SizedBox( | |||||
height: 16, | |||||
), | |||||
Text( | |||||
"「个人护理用品已销售到全球200多个国家和地区」", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FFFF4242"), fontSize: 11), | |||||
), | |||||
SizedBox( | |||||
height: 16, | |||||
), | |||||
Container( | |||||
height: isOpen ? null : 46, | |||||
padding: EdgeInsets.all(4), | |||||
child: Text( | |||||
" 高露洁公司已有200年的历史,产品已经销售到世界20多个国家和地区,成为全球领先的日用消费品公司,在口腔护理…个人护理、家居护理等方面为大众提供高品质的消费品,是广大消费者耳熟能详的全球著名品牌。", | |||||
overflow: TextOverflow.ellipsis, | |||||
maxLines: isOpen ? 1000 : 2, | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FF767676"), fontSize: 12), | |||||
), | |||||
), | |||||
GestureDetector( | |||||
onTap: () { | |||||
///点击展开更多 | |||||
isOpen = !isOpen; | |||||
setState(() {}); | |||||
}, | |||||
child: Row( | |||||
mainAxisAlignment: MainAxisAlignment.center, | |||||
crossAxisAlignment: CrossAxisAlignment.center, | |||||
children: <Widget>[ | |||||
Text( | |||||
isOpen ? "收起" : "查看更多", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FF999999"), fontSize: 11), | |||||
), | |||||
Icon( | |||||
isOpen ? Icons.keyboard_arrow_down : Icons.chevron_right, | |||||
size: 20, | |||||
color: HexColor.fromHex("#FF999999"), | |||||
) | |||||
], | |||||
), | |||||
) | |||||
], | |||||
), | |||||
), | |||||
Align( | |||||
alignment: Alignment.topCenter, | |||||
child: Container( | |||||
child: CachedNetworkImage( | |||||
imageUrl: "", | |||||
width: 67, | |||||
height: 67, | |||||
placeholder: (context, url) { | |||||
return Container( | |||||
width: 67, | |||||
height: 67, | |||||
color: Colors.yellow, | |||||
); | |||||
}, | |||||
), | |||||
), | |||||
), | |||||
], | |||||
); | |||||
} | |||||
} |
@@ -0,0 +1,360 @@ | |||||
import 'package:flutter/cupertino.dart'; | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
class BrandList extends StatefulWidget { | |||||
final TabController tabController; | |||||
const BrandList(this.tabController, {Key key}) : super(key: key); | |||||
@override | |||||
_BrandListState createState() => _BrandListState(); | |||||
} | |||||
class _BrandListState extends State<BrandList> { | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Container( | |||||
child: TabBarView( | |||||
controller: widget.tabController, children: _buildTabView()), | |||||
); | |||||
} | |||||
_buildTabView() { | |||||
List<Widget> listWidget = List(); | |||||
for (var index = 0; index < 6; index++) { | |||||
listWidget.add(BrandListView()); | |||||
} | |||||
return listWidget; | |||||
} | |||||
} | |||||
///底部列表 | |||||
class BrandListView extends StatefulWidget { | |||||
final String type; | |||||
const BrandListView({Key key, this.type}) : super(key: key); | |||||
@override | |||||
_BrandListViewState createState() => _BrandListViewState(); | |||||
} | |||||
class _BrandListViewState extends State<BrandListView> { | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Container( | |||||
child: ListView.builder( | |||||
shrinkWrap: false, itemCount: 2, itemBuilder: _buildItem)); | |||||
} | |||||
Widget _buildItem(BuildContext context, int index) { | |||||
if (index == 0) { | |||||
return ListView.builder( | |||||
physics: NeverScrollableScrollPhysics(), | |||||
shrinkWrap: true, | |||||
itemCount: 2, | |||||
itemBuilder: _buildListItem1); | |||||
} else { | |||||
return ListView.builder( | |||||
physics: NeverScrollableScrollPhysics(), | |||||
shrinkWrap: true, | |||||
itemCount: 2, | |||||
itemBuilder: _buildListItem2); | |||||
} | |||||
} | |||||
///构建某个品牌1 | |||||
Widget _buildListItem1(BuildContext context, int index) { | |||||
if (index == 0) { | |||||
return Container( | |||||
color: Colors.amber, | |||||
height: 40, | |||||
child: Center( | |||||
child: CachedNetworkImage( | |||||
imageUrl: "", | |||||
)), | |||||
); | |||||
} else { | |||||
return Container( | |||||
margin: EdgeInsets.only(left: 10, right: 10, top: 8), | |||||
padding: EdgeInsets.all(7), | |||||
decoration: BoxDecoration( | |||||
color: HexColor.fromHex("#FFFFFF"), | |||||
borderRadius: BorderRadius.circular(8)), | |||||
child: Column( | |||||
children: <Widget>[ | |||||
Row( | |||||
children: <Widget>[ | |||||
CachedNetworkImage( | |||||
imageUrl: "", | |||||
width: 40, | |||||
height: 40, | |||||
), | |||||
Expanded( | |||||
child: Container( | |||||
height: 40, | |||||
child: Column( | |||||
crossAxisAlignment: CrossAxisAlignment.start, | |||||
mainAxisAlignment: MainAxisAlignment.center, | |||||
children: <Widget>[ | |||||
Text( | |||||
"百草味", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#333333"), | |||||
fontSize: 15, | |||||
fontWeight: FontWeight.w600), | |||||
), | |||||
Expanded( | |||||
child: Container( | |||||
height: 20, | |||||
margin: EdgeInsets.only(top: 4), | |||||
child: ListView.builder( | |||||
scrollDirection: Axis.horizontal, | |||||
padding: EdgeInsets.all(0), | |||||
shrinkWrap: true, | |||||
itemCount: 4, | |||||
itemBuilder: _buildDiscounts))) | |||||
], | |||||
), | |||||
), | |||||
), | |||||
Row( | |||||
children: <Widget>[ | |||||
Text( | |||||
"加载更多", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FF333333"), fontSize: 12), | |||||
), | |||||
Icon(Icons.keyboard_arrow_right) | |||||
], | |||||
) | |||||
], | |||||
), | |||||
Row( | |||||
children: <Widget>[ | |||||
Expanded( | |||||
child: Container( | |||||
height: 180, | |||||
child: ListView.builder( | |||||
itemCount: 4, | |||||
shrinkWrap: true, | |||||
itemBuilder: _buildGoodsItem, | |||||
scrollDirection: Axis.horizontal, | |||||
), | |||||
)) | |||||
], | |||||
) | |||||
], | |||||
), | |||||
); | |||||
} | |||||
} | |||||
///构建某个品牌2 | |||||
Widget _buildListItem2(BuildContext context, int index) { | |||||
if (index == 0) { | |||||
return Container( | |||||
color: Colors.amber, | |||||
height: 40, | |||||
child: Center( | |||||
child: CachedNetworkImage( | |||||
imageUrl: "", | |||||
)), | |||||
); | |||||
} else { | |||||
return Container( | |||||
margin: EdgeInsets.only(left: 10, right: 10, top: 8), | |||||
padding: EdgeInsets.all(7), | |||||
decoration: BoxDecoration( | |||||
color: HexColor.fromHex("#FFFFFF"), | |||||
borderRadius: BorderRadius.circular(8)), | |||||
child: Column( | |||||
children: <Widget>[ | |||||
Row( | |||||
children: <Widget>[ | |||||
CachedNetworkImage( | |||||
imageUrl: "", | |||||
width: 40, | |||||
height: 40, | |||||
), | |||||
Expanded( | |||||
child: Container( | |||||
height: 40, | |||||
child: Column( | |||||
crossAxisAlignment: CrossAxisAlignment.start, | |||||
mainAxisAlignment: MainAxisAlignment.center, | |||||
children: <Widget>[ | |||||
Text( | |||||
"百草味", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#333333"), | |||||
fontSize: 15, | |||||
fontWeight: FontWeight.w600), | |||||
), | |||||
Expanded( | |||||
child: Container( | |||||
height: 20, | |||||
margin: EdgeInsets.only(top: 4), | |||||
child: ListView.builder( | |||||
scrollDirection: Axis.horizontal, | |||||
padding: EdgeInsets.all(0), | |||||
shrinkWrap: true, | |||||
itemCount: 4, | |||||
itemBuilder: _buildDiscounts))) | |||||
], | |||||
), | |||||
), | |||||
), | |||||
Row( | |||||
children: <Widget>[ | |||||
Text( | |||||
"已售", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FF333333"), fontSize: 12), | |||||
), | |||||
Text( | |||||
"10.6", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FFFF4242"), fontSize: 12), | |||||
), | |||||
Text( | |||||
"万件", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FF333333"), fontSize: 12), | |||||
), | |||||
Icon(Icons.keyboard_arrow_right) | |||||
], | |||||
) | |||||
], | |||||
), | |||||
Row( | |||||
children: <Widget>[ | |||||
Expanded( | |||||
child: Container( | |||||
height: 180, | |||||
child: ListView.builder( | |||||
itemCount: 4, | |||||
shrinkWrap: true, | |||||
itemBuilder: _buildGoodsItem, | |||||
scrollDirection: Axis.horizontal, | |||||
), | |||||
)) | |||||
], | |||||
) | |||||
], | |||||
), | |||||
); | |||||
} | |||||
} | |||||
///构建优惠项 | |||||
Widget _buildDiscounts(BuildContext context, int index) { | |||||
return Container( | |||||
margin: EdgeInsets.only(right: 6), | |||||
child: Padding( | |||||
padding: EdgeInsets.only(left: 4, right: 4), | |||||
child: Center( | |||||
child: Text( | |||||
"ddd", | |||||
style: | |||||
TextStyle(color: HexColor.fromHex("#FFFF6500"), fontSize: 10), | |||||
), | |||||
), | |||||
), | |||||
decoration: BoxDecoration( | |||||
color: HexColor.fromHex("#FFFFF1E8"), | |||||
borderRadius: BorderRadius.circular(4)), | |||||
); | |||||
} | |||||
Widget _buildGoodsItem(BuildContext context, int index) { | |||||
return Container( | |||||
width: 101, | |||||
margin: EdgeInsets.only(right: 10, top: 10), | |||||
child: Column( | |||||
mainAxisSize: MainAxisSize.min, | |||||
crossAxisAlignment: CrossAxisAlignment.start, | |||||
children: <Widget>[ | |||||
Container( | |||||
width: 101, | |||||
height: 101, | |||||
color: HexColor.fromHex("#424242"), | |||||
), | |||||
///商品名称 | |||||
Container( | |||||
width: 101, | |||||
child: Text( | |||||
"商品名称短发的说法发大水方法", | |||||
style: TextStyle(color: HexColor.fromHex("#333333")), | |||||
maxLines: 1, | |||||
overflow: TextOverflow.ellipsis, | |||||
)), | |||||
Row( | |||||
crossAxisAlignment: CrossAxisAlignment.end, | |||||
mainAxisAlignment: MainAxisAlignment.start, | |||||
children: <Widget>[ | |||||
Padding( | |||||
padding: EdgeInsets.only(bottom: 1), | |||||
child: Text( | |||||
"¥", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#333333"), fontSize: 10), | |||||
), | |||||
), | |||||
SizedBox( | |||||
width: 2, | |||||
), | |||||
Text( | |||||
"118", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex("#FFFF4242"), fontSize: 15), | |||||
), | |||||
SizedBox( | |||||
width: 10, | |||||
), | |||||
Padding( | |||||
padding: EdgeInsets.only(bottom: 1), | |||||
child: Text( | |||||
"¥200", | |||||
style: TextStyle( | |||||
decoration: TextDecoration.lineThrough, | |||||
color: HexColor.fromHex("#FFACACAC"), | |||||
fontSize: 10), | |||||
), | |||||
), | |||||
], | |||||
), | |||||
Row( | |||||
children: buildCoupon(), | |||||
) | |||||
], | |||||
), | |||||
); | |||||
} | |||||
///构建优惠券 | |||||
buildCoupon() { | |||||
List<Widget> listWidget = List(); | |||||
for (var index = 0; index < 2; index++) { | |||||
listWidget.add(Expanded( | |||||
child: Container( | |||||
decoration: BoxDecoration( | |||||
color: HexColor.fromHex("#FFFFF1F1"), | |||||
borderRadius: BorderRadius.circular(4)), | |||||
child: Padding( | |||||
padding: EdgeInsets.all(4.0), | |||||
child: Text( | |||||
"券¥26.00", | |||||
maxLines: 1, | |||||
overflow: TextOverflow.ellipsis, | |||||
style: | |||||
TextStyle(color: HexColor.fromHex("#FFFF4242"), fontSize: 10), | |||||
), | |||||
), | |||||
), | |||||
)); | |||||
} | |||||
return listWidget; | |||||
} | |||||
} |
@@ -0,0 +1,130 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:shimmer/shimmer.dart'; | |||||
class BrandListSkeleton extends StatelessWidget { | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Shimmer.fromColors( | |||||
baseColor: Colors.grey[300], | |||||
highlightColor: Colors.grey[100], | |||||
child: Column( | |||||
children: <Widget>[ | |||||
Container( | |||||
margin: EdgeInsets.only(top: 10), | |||||
color: Colors.white, | |||||
height: MediaQuery.of(context).padding.top + 46, | |||||
width: 200, | |||||
), | |||||
Row( | |||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | |||||
children: <Widget>[ | |||||
Container( | |||||
margin: EdgeInsets.only(top: 10), | |||||
color: Colors.white, | |||||
height: 40, | |||||
width: 60, | |||||
), | |||||
Container( | |||||
margin: EdgeInsets.only(top: 10), | |||||
color: Colors.white, | |||||
height: 40, | |||||
width: 60, | |||||
), | |||||
Container( | |||||
margin: EdgeInsets.only(top: 10), | |||||
color: Colors.white, | |||||
height: 40, | |||||
width: 60, | |||||
), | |||||
Container( | |||||
margin: EdgeInsets.only(top: 10), | |||||
color: Colors.white, | |||||
height: 40, | |||||
width: 60, | |||||
), | |||||
Container( | |||||
margin: EdgeInsets.only(top: 10), | |||||
color: Colors.white, | |||||
height: 40, | |||||
width: 60, | |||||
), | |||||
], | |||||
), | |||||
Container( | |||||
margin: EdgeInsets.only(top: 10), | |||||
color: Colors.white, | |||||
height: MediaQuery.of(context).padding.top + 46, | |||||
width: 200, | |||||
), | |||||
_buildItem(), | |||||
_buildItem(), | |||||
_buildItem() | |||||
], | |||||
)); | |||||
} | |||||
Widget _buildItem() { | |||||
return Container( | |||||
margin: EdgeInsets.only(top: 16, left: 16, right: 16), | |||||
child: Column( | |||||
mainAxisSize: MainAxisSize.min, | |||||
children: <Widget>[ | |||||
Row( | |||||
children: <Widget>[ | |||||
Container( | |||||
width: 40, | |||||
height: 40, | |||||
color: Colors.white, | |||||
), | |||||
SizedBox( | |||||
width: 16, | |||||
), | |||||
Expanded( | |||||
child: Column( | |||||
crossAxisAlignment: CrossAxisAlignment.start, | |||||
children: <Widget>[ | |||||
Container( | |||||
width: 80, | |||||
height: 16, | |||||
color: Colors.white, | |||||
), | |||||
SizedBox( | |||||
height: 8, | |||||
), | |||||
Container( | |||||
width: 80, | |||||
height: 16, | |||||
color: Colors.white, | |||||
), | |||||
], | |||||
)) | |||||
], | |||||
), | |||||
Row( | |||||
children: <Widget>[ | |||||
Container( | |||||
margin: EdgeInsets.only(right: 10, top: 10), | |||||
width: 101, | |||||
height: 101, | |||||
color: Colors.white, | |||||
), | |||||
Container( | |||||
margin: EdgeInsets.only(right: 10, top: 10), | |||||
width: 101, | |||||
height: 101, | |||||
color: Colors.white, | |||||
), | |||||
Container( | |||||
margin: EdgeInsets.only(right: 10, top: 10), | |||||
width: 101, | |||||
height: 101, | |||||
color: Colors.white, | |||||
), | |||||
], | |||||
), | |||||
], | |||||
), | |||||
); | |||||
} | |||||
} |
@@ -0,0 +1,69 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_comm/util/extension/color.dart'; | |||||
class BrandTabBar extends StatefulWidget { | |||||
final TabController tabController; | |||||
const BrandTabBar(this.tabController, {Key key}) : super(key: key); | |||||
@override | |||||
_BrandTabBarState createState() => _BrandTabBarState(); | |||||
} | |||||
class _BrandTabBarState extends State<BrandTabBar> { | |||||
var currentIndex = 0; | |||||
@override | |||||
void initState() { | |||||
widget.tabController.addListener(() { | |||||
currentIndex = widget.tabController.index; | |||||
setState(() {}); | |||||
}); | |||||
super.initState(); | |||||
} | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return TabBar( | |||||
indicatorWeight: 0.01, | |||||
isScrollable: true, | |||||
controller: widget.tabController, | |||||
tabs: _buildTabs(), | |||||
// onTap: (index) { | |||||
// currentIndex = index; | |||||
// setState(() {}); | |||||
// }, | |||||
); | |||||
} | |||||
///构建 | |||||
_buildTabs() { | |||||
List<Widget> listWidget = List(); | |||||
for (var index = 0; index < 6; index++) { | |||||
listWidget.add(Container( | |||||
height: 48, | |||||
child: Column( | |||||
mainAxisAlignment: MainAxisAlignment.center, | |||||
mainAxisSize: MainAxisSize.max, | |||||
children: <Widget>[ | |||||
Text( | |||||
index.toString(), | |||||
style: TextStyle( | |||||
color: index == currentIndex | |||||
? Colors.red | |||||
: HexColor.fromHex("#000000")), | |||||
), | |||||
Container( | |||||
width: 13.67, | |||||
height: 4.6, | |||||
color: index == currentIndex | |||||
? Colors.red | |||||
: HexColor.fromHex("#000000"), | |||||
) | |||||
], | |||||
), | |||||
)); | |||||
} | |||||
return listWidget; | |||||
} | |||||
} |
@@ -109,10 +109,12 @@ class _GoodsDetailsSlideBannerContainerState | |||||
String items = datas.image_list[index]; | String items = datas.image_list[index]; | ||||
return Container( | return Container( | ||||
width: double.infinity, | width: double.infinity, | ||||
child: Hero( | child: (datas.image_list.length ?? 1) == 1 | ||||
tag: items + "top", | ? CachedNetworkImage(imageUrl: items ?? '', fit: BoxFit.cover) | ||||
child: CachedNetworkImage( | : Hero( | ||||
imageUrl: items ?? '', fit: BoxFit.cover)), | tag: items + "top", | ||||
child: CachedNetworkImage( | |||||
imageUrl: items ?? '', fit: BoxFit.cover)), | |||||
); | ); | ||||
}, | }, | ||||
itemCount: datas?.image_list?.length ?? 0, | itemCount: datas?.image_list?.length ?? 0, | ||||
@@ -38,8 +38,8 @@ class HotRankingAppBar extends StatelessWidget { | |||||
color: HexColor.fromHex(model?.appBarNameColor ?? "")), | color: HexColor.fromHex(model?.appBarNameColor ?? "")), | ||||
), | ), | ||||
CachedNetworkImage( | CachedNetworkImage( | ||||
height: 40.w, | height: 20, | ||||
width: 144.w, | width: 72, | ||||
imageUrl: model.appBarNameImg ?? "", | imageUrl: model.appBarNameImg ?? "", | ||||
fit: BoxFit.fill, | fit: BoxFit.fill, | ||||
) | ) | ||||
@@ -32,25 +32,22 @@ class HotRankingGoods extends StatelessWidget { | |||||
child: Stack( | child: Stack( | ||||
children: <Widget>[ | children: <Widget>[ | ||||
Container( | Container( | ||||
padding: EdgeInsets.all(15.w), | padding: EdgeInsets.all(12.5), | ||||
margin: | margin: | ||||
EdgeInsets.only(top: 8.w, bottom: 8.w, left: 25.w, right: 25.w), | EdgeInsets.only(top: 4, bottom: 4, left: 12.5, right: 12.5), | ||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
color: Colors.white, borderRadius: BorderRadius.circular(15.w)), | color: Colors.white, borderRadius: BorderRadius.circular(12.5)), | ||||
child: Row( | child: Row( | ||||
crossAxisAlignment: CrossAxisAlignment.start, | crossAxisAlignment: CrossAxisAlignment.start, | ||||
children: <Widget>[ | children: <Widget>[ | ||||
/// 商品图片 | /// 商品图片 | ||||
Container( | Container( | ||||
width: 254.w, | width:127, | ||||
height: 254.w, | height: 127, | ||||
child: ClipRRect( | child: ClipRRect( | ||||
borderRadius: BorderRadius.circular(6), | borderRadius: BorderRadius.circular(6), | ||||
child: Hero( | child: CachedNetworkImage( | ||||
tag: (good?.goodImage ?? "") + "top", | imageUrl: good?.goodImage ?? '', | ||||
child: CachedNetworkImage( | |||||
imageUrl: good?.goodImage ?? '', | |||||
), | |||||
), | ), | ||||
), | ), | ||||
decoration: | decoration: | ||||
@@ -60,10 +57,11 @@ class HotRankingGoods extends StatelessWidget { | |||||
/// 商品图片右边视图 | /// 商品图片右边视图 | ||||
Expanded( | Expanded( | ||||
child: Container( | child: Container( | ||||
margin: EdgeInsets.only(left: 20.w), | margin: EdgeInsets.only(left: 10), | ||||
child: Column( | child: Column( | ||||
// mainAxisSize: MainAxisSize.max, | // mainAxisSize: MainAxisSize.max, | ||||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
crossAxisAlignment: CrossAxisAlignment.start, | |||||
children: <Widget>[ | children: <Widget>[ | ||||
/// 商品标题 | /// 商品标题 | ||||
RichText( | RichText( | ||||
@@ -75,7 +73,7 @@ class HotRankingGoods extends StatelessWidget { | |||||
alignment: ui.PlaceholderAlignment.middle, | alignment: ui.PlaceholderAlignment.middle, | ||||
child: Container( | child: Container( | ||||
padding: EdgeInsets.only( | padding: EdgeInsets.only( | ||||
left: 4.w, right: 4.w, top: 1, bottom: 1), | left: 2, right: 2, top: 1, bottom: 1), | ||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
providers.providerBgColor), | providers.providerBgColor), | ||||
@@ -86,19 +84,19 @@ class HotRankingGoods extends StatelessWidget { | |||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
providers.providerNameColor, | providers.providerNameColor, | ||||
), | ), | ||||
fontSize: 18.sp), | fontSize: 9), | ||||
), | ), | ||||
)), | )), | ||||
WidgetSpan( | WidgetSpan( | ||||
child: SizedBox( | child: SizedBox( | ||||
width: 4.h, | width: 2, | ||||
)), | )), | ||||
TextSpan( | TextSpan( | ||||
text: good.goodTitle, | text: good.goodTitle, | ||||
style: TextStyle( | style: TextStyle( | ||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
styleModel.titleColor ?? ""), | styleModel.titleColor ?? ""), | ||||
fontSize: 30.sp)) | fontSize: 15)) | ||||
])), | ])), | ||||
/// 优惠券 | /// 优惠券 | ||||
@@ -108,7 +106,7 @@ class HotRankingGoods extends StatelessWidget { | |||||
? Container() | ? Container() | ||||
: Container( | : Container( | ||||
margin: EdgeInsets.only( | margin: EdgeInsets.only( | ||||
top: 4, bottom: 4, right: 15.w), | top: 4, bottom: 4, right: 7.5), | ||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
borderRadius: BorderRadius.circular(2.5), | borderRadius: BorderRadius.circular(2.5), | ||||
color: HexColor.fromHex(styleModel | color: HexColor.fromHex(styleModel | ||||
@@ -130,7 +128,7 @@ class HotRankingGoods extends StatelessWidget { | |||||
.couponCommission | .couponCommission | ||||
.left | .left | ||||
.couponFontColor), | .couponFontColor), | ||||
fontSize: 22.sp, | fontSize: 11, | ||||
fontFamily: 'Din', | fontFamily: 'Din', | ||||
package: 'zhiying_base_widget'), | package: 'zhiying_base_widget'), | ||||
), | ), | ||||
@@ -165,7 +163,7 @@ class HotRankingGoods extends StatelessWidget { | |||||
.couponCommission | .couponCommission | ||||
.right | .right | ||||
.commissionFontColor), | .commissionFontColor), | ||||
fontSize: 22.sp, | fontSize: 11, | ||||
fontFamily: 'Din', | fontFamily: 'Din', | ||||
package: 'zhiying_base_widget'), | package: 'zhiying_base_widget'), | ||||
), | ), | ||||
@@ -181,13 +179,13 @@ class HotRankingGoods extends StatelessWidget { | |||||
crossAxisAlignment: CrossAxisAlignment.end, | crossAxisAlignment: CrossAxisAlignment.end, | ||||
children: <Widget>[ | children: <Widget>[ | ||||
Padding( | Padding( | ||||
padding: EdgeInsets.only(bottom: 6.sp), | padding: EdgeInsets.only(bottom: 3), | ||||
child: Text( | child: Text( | ||||
"¥", | "¥", | ||||
style: TextStyle( | style: TextStyle( | ||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
styleModel.currentPriceColor ?? ""), | styleModel.currentPriceColor ?? ""), | ||||
fontSize: 20.sp), | fontSize: 10), | ||||
), | ), | ||||
), | ), | ||||
Text( | Text( | ||||
@@ -195,7 +193,7 @@ class HotRankingGoods extends StatelessWidget { | |||||
style: TextStyle( | style: TextStyle( | ||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
styleModel.currentPriceColor ?? ""), | styleModel.currentPriceColor ?? ""), | ||||
fontSize: 40.sp, | fontSize: 20, | ||||
fontWeight: FontWeight.bold, | fontWeight: FontWeight.bold, | ||||
fontFamily: 'Din', | fontFamily: 'Din', | ||||
package: 'zhiying_base_widget'), | package: 'zhiying_base_widget'), | ||||
@@ -204,13 +202,13 @@ class HotRankingGoods extends StatelessWidget { | |||||
width: 6, | width: 6, | ||||
), | ), | ||||
Padding( | Padding( | ||||
padding: EdgeInsets.only(bottom: 4.sp), | padding: EdgeInsets.only(bottom: 2), | ||||
child: Text( | child: Text( | ||||
"¥" + good.marketPrice ?? "", | "¥" + good.marketPrice ?? "", | ||||
style: TextStyle( | style: TextStyle( | ||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
styleModel.marketPriceColor ?? ""), | styleModel.marketPriceColor ?? ""), | ||||
fontSize: 22.sp, | fontSize: 11, | ||||
decoration: TextDecoration.lineThrough, | decoration: TextDecoration.lineThrough, | ||||
fontFamily: 'Din', | fontFamily: 'Din', | ||||
package: 'zhiying_base_widget'), | package: 'zhiying_base_widget'), | ||||
@@ -232,19 +230,19 @@ class HotRankingGoods extends StatelessWidget { | |||||
Expanded( | Expanded( | ||||
child: Container( | child: Container( | ||||
alignment: Alignment.centerLeft, | alignment: Alignment.centerLeft, | ||||
height: 40.w, | height: 20, | ||||
padding: EdgeInsets.only( | padding: EdgeInsets.only( | ||||
left: 40.w, | left: 20, | ||||
), | ), | ||||
margin: | margin: | ||||
EdgeInsets.only(right: 20, left: 20.w), | EdgeInsets.only(right: 20, left: 10), | ||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
styleModel.hotRank.bgColor ?? ""), | styleModel.hotRank.bgColor ?? ""), | ||||
child: Text( | child: Text( | ||||
"热销" + good.inorderCount + "件", | "热销" + (good.inorderCount??"") + "件", | ||||
style: TextStyle( | style: TextStyle( | ||||
color: Colors.white, | color: Colors.white, | ||||
fontSize: 22.sp, | fontSize: 11, | ||||
fontFamily: 'Din', | fontFamily: 'Din', | ||||
package: 'zhiying_base_widget'), | package: 'zhiying_base_widget'), | ||||
), | ), | ||||
@@ -252,13 +250,13 @@ class HotRankingGoods extends StatelessWidget { | |||||
], | ], | ||||
), | ), | ||||
Container( | Container( | ||||
width: 48.w, | width: 24, | ||||
height: 48.w, | height: 24, | ||||
child: CachedNetworkImage( | child: CachedNetworkImage( | ||||
imageUrl: | imageUrl: | ||||
styleModel?.hotRank?.hotSaleImg ?? "", | styleModel?.hotRank?.hotSaleImg ?? "", | ||||
width: 48.w, | width: 24, | ||||
height: 48.w, | height: 24, | ||||
placeholder: (context, _) => | placeholder: (context, _) => | ||||
Container(color: Colors.yellow), | Container(color: Colors.yellow), | ||||
fit: BoxFit.fill, | fit: BoxFit.fill, | ||||
@@ -267,8 +265,8 @@ class HotRankingGoods extends StatelessWidget { | |||||
Align( | Align( | ||||
alignment: Alignment.centerRight, | alignment: Alignment.centerRight, | ||||
child: Container( | child: Container( | ||||
height: 48.h, | height: 24, | ||||
width: 127.w, | width: 63.5, | ||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
image: DecorationImage( | image: DecorationImage( | ||||
image: CachedNetworkImageProvider( | image: CachedNetworkImageProvider( | ||||
@@ -295,9 +293,9 @@ class HotRankingGoods extends StatelessWidget { | |||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
image: DecorationImage( | image: DecorationImage( | ||||
image: CachedNetworkImageProvider(indexImage ?? ""))), | image: CachedNetworkImageProvider(indexImage ?? ""))), | ||||
margin: EdgeInsets.only(left: 40.w, top: 8.h), | margin: EdgeInsets.only(left: 20, top: 4), | ||||
height: 60.w, | height: 30, | ||||
width: 60.w, | width: 30, | ||||
), | ), | ||||
) | ) | ||||
], | ], | ||||
@@ -54,36 +54,42 @@ class _HotRankTableBarState extends State<HotRankTableBar> | |||||
Widget build(BuildContext context) { | Widget build(BuildContext context) { | ||||
return Container( | return Container( | ||||
margin: EdgeInsets.only(bottom: 10), | margin: EdgeInsets.only(bottom: 10), | ||||
child: TabBar( | child: Row( | ||||
// indicatorPadding: EdgeInsets.only(bottom: 0, top: 10), | children: <Widget>[ | ||||
// indicatorWeight: 3, | Expanded( | ||||
indicatorWeight: 6, | child: TabBar( | ||||
indicatorSize: TabBarIndicatorSize.label, | // indicatorPadding: EdgeInsets.only(bottom: 0, top: 10), | ||||
controller: _tabController, | // indicatorWeight: 3, | ||||
indicatorColor: HexColor.fromHex( | indicatorWeight: 6, | ||||
_barModel.tabList[_tabController.index].nameSelectColor), | indicatorSize: TabBarIndicatorSize.label, | ||||
unselectedLabelColor: HexColor.fromHex( | controller: _tabController, | ||||
_barModel.tabList[_tabController.index].nameNoSelectColor), | indicatorColor: HexColor.fromHex( | ||||
labelColor: HexColor.fromHex( | _barModel.tabList[_tabController.index].nameSelectColor), | ||||
_barModel.tabList[_tabController.index].nameSelectColor), | unselectedLabelColor: HexColor.fromHex( | ||||
indicator: MaterialIndicator( | _barModel.tabList[_tabController.index].nameNoSelectColor), | ||||
height: 2.5, | labelColor: HexColor.fromHex( | ||||
horizontalPadding: 8, | _barModel.tabList[_tabController.index].nameSelectColor), | ||||
bottomRightRadius: 1.25, | indicator: MaterialIndicator( | ||||
bottomLeftRadius: 1.25, | height: 2.5, | ||||
topRightRadius: 1.25, | horizontalPadding: 8, | ||||
topLeftRadius: 1.25, | bottomRightRadius: 1.25, | ||||
color: HexColor.fromHex(_barModel.tabList[_tabController.index].nameSelectColor), | bottomLeftRadius: 1.25, | ||||
), | topRightRadius: 1.25, | ||||
isScrollable: true, | topLeftRadius: 1.25, | ||||
tabs: _buildTabs(), | color: HexColor.fromHex(_barModel.tabList[_tabController.index].nameSelectColor), | ||||
onTap: (index) { | ), | ||||
var params = { | isScrollable: true, | ||||
"type": "loadData", | tabs: _buildTabs(), | ||||
"type_id": _barModel.tabList[_tabController.index].typeId | onTap: (index) { | ||||
}; | var params = { | ||||
_pageBloc.sendEvent(params); | "type": "loadData", | ||||
}, | "type_id": _barModel.tabList[_tabController.index].typeId | ||||
}; | |||||
_pageBloc.sendEvent(params); | |||||
}, | |||||
), | |||||
), | |||||
], | |||||
), | ), | ||||
); | ); | ||||
} | } | ||||
@@ -101,7 +107,7 @@ class _HotRankTableBarState extends State<HotRankTableBar> | |||||
), | ), | ||||
child: Text( | child: Text( | ||||
item.name, | item.name, | ||||
style: TextStyle(fontSize: 26.sp), | style: TextStyle(fontSize: 13), | ||||
), | ), | ||||
), | ), | ||||
)); | )); | ||||
@@ -39,16 +39,16 @@ class WalletBil extends StatelessWidget { | |||||
children: <Widget>[ | children: <Widget>[ | ||||
CachedNetworkImage( | CachedNetworkImage( | ||||
imageUrl: model.bilIcon, | imageUrl: model.bilIcon, | ||||
width: 36.w, | width: 18, | ||||
height: 36.w, | height: 18, | ||||
fit: BoxFit.fill, | fit: BoxFit.fill, | ||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
width: 15.w, | width: 7.5, | ||||
), | ), | ||||
Text( | Text( | ||||
model.bilText, | model.bilText, | ||||
style: TextStyle(fontSize: 24.sp), | style: TextStyle(fontSize: 12), | ||||
), | ), | ||||
], | ], | ||||
), | ), | ||||
@@ -1,4 +1,4 @@ | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | import 'package:zhiying_comm/models/base/skip_model.dart'; | ||||
class WalletHeaderModel extends SkipModel { | class WalletHeaderModel extends SkipModel { | ||||
String headerImg; | String headerImg; | ||||
@@ -6,26 +6,40 @@ class WalletHeaderModel extends SkipModel { | |||||
String headerCashOutText; | String headerCashOutText; | ||||
String headerCashOutTextColor; | String headerCashOutTextColor; | ||||
String headerCashOutKey; | String headerCashOutKey; | ||||
String headerCashOutBtnText; | |||||
String headerCashOutBtnTextColor; | |||||
String headerCashOutBtnImg; | String headerCashOutBtnImg; | ||||
String skipIdentifier; | |||||
String requiredLogin; | |||||
String requiredTaobaoAuth; | |||||
List<HeaderBottomList> headerBottomList; | List<HeaderBottomList> headerBottomList; | ||||
WalletHeaderModel( | WalletHeaderModel( | ||||
{this.headerImg, | {this.headerImg, | ||||
this.headerAvatar, | this.headerAvatar, | ||||
this.headerCashOutText, | this.headerCashOutText, | ||||
this.headerCashOutTextColor, | this.headerCashOutTextColor, | ||||
this.headerCashOutKey, | this.headerCashOutKey, | ||||
this.headerCashOutBtnImg, | this.headerCashOutBtnText, | ||||
this.headerBottomList}); | this.headerCashOutBtnTextColor, | ||||
this.headerCashOutBtnImg, | |||||
this.skipIdentifier, | |||||
this.requiredLogin, | |||||
this.requiredTaobaoAuth, | |||||
this.headerBottomList}); | |||||
WalletHeaderModel.fromJson(Map<String, dynamic> json) { | WalletHeaderModel.fromJson(Map<String, dynamic> json) { | ||||
super.fromJson(json); | |||||
headerImg = json['header_img']; | headerImg = json['header_img']; | ||||
headerAvatar = json['header_avatar']; | headerAvatar = json['header_avatar']; | ||||
headerCashOutText = json['header_cash_out_text']; | headerCashOutText = json['header_cash_out_text']; | ||||
headerCashOutTextColor = json['header_cash_out_text_color']; | headerCashOutTextColor = json['header_cash_out_text_color']; | ||||
headerCashOutKey = json['header_cash_out_key']; | headerCashOutKey = json['header_cash_out_key']; | ||||
headerCashOutBtnText = json['header_cash_out_btn_text']; | |||||
headerCashOutBtnTextColor = json['header_cash_out_btn_text_color']; | |||||
headerCashOutBtnImg = json['header_cash_out_btn_img']; | headerCashOutBtnImg = json['header_cash_out_btn_img']; | ||||
skipIdentifier = json['skip_identifier']; | |||||
requiredLogin = json['required_login']; | |||||
requiredTaobaoAuth = json['required_taobao_auth']; | |||||
if (json['header_bottom_list'] != null) { | if (json['header_bottom_list'] != null) { | ||||
headerBottomList = new List<HeaderBottomList>(); | headerBottomList = new List<HeaderBottomList>(); | ||||
json['header_bottom_list'].forEach((v) { | json['header_bottom_list'].forEach((v) { | ||||
@@ -35,13 +49,18 @@ class WalletHeaderModel extends SkipModel { | |||||
} | } | ||||
Map<String, dynamic> toJson() { | Map<String, dynamic> toJson() { | ||||
final Map<String, dynamic> data = super.toJson(); | final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
data['header_img'] = this.headerImg; | data['header_img'] = this.headerImg; | ||||
data['header_avatar'] = this.headerAvatar; | data['header_avatar'] = this.headerAvatar; | ||||
data['header_cash_out_text'] = this.headerCashOutText; | data['header_cash_out_text'] = this.headerCashOutText; | ||||
data['header_cash_out_text_color'] = this.headerCashOutTextColor; | data['header_cash_out_text_color'] = this.headerCashOutTextColor; | ||||
data['header_cash_out_key'] = this.headerCashOutKey; | data['header_cash_out_key'] = this.headerCashOutKey; | ||||
data['header_cash_out_btn_text'] = this.headerCashOutBtnText; | |||||
data['header_cash_out_btn_text_color'] = this.headerCashOutBtnTextColor; | |||||
data['header_cash_out_btn_img'] = this.headerCashOutBtnImg; | data['header_cash_out_btn_img'] = this.headerCashOutBtnImg; | ||||
data['skip_identifier'] = this.skipIdentifier; | |||||
data['required_login'] = this.requiredLogin; | |||||
data['required_taobao_auth'] = this.requiredTaobaoAuth; | |||||
if (this.headerBottomList != null) { | if (this.headerBottomList != null) { | ||||
data['header_bottom_list'] = | data['header_bottom_list'] = | ||||
this.headerBottomList.map((v) => v.toJson()).toList(); | this.headerBottomList.map((v) => v.toJson()).toList(); | ||||
@@ -52,13 +52,13 @@ class _WalletDataState extends State<WalletData> { | |||||
? WalletDataSkeleton() | ? WalletDataSkeleton() | ||||
: Container( | : Container( | ||||
margin: EdgeInsets.only(left: 12.5, right: 12.5, top: 10), | margin: EdgeInsets.only(left: 12.5, right: 12.5, top: 10), | ||||
padding: EdgeInsets.only(left: 36.w, right: 26.w), | padding: EdgeInsets.only(left: 18, right: 13), | ||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
image: DecorationImage( | image: DecorationImage( | ||||
image: CachedNetworkImageProvider( | image: CachedNetworkImageProvider( | ||||
model?.headerImg ?? ""), | model?.headerImg ?? ""), | ||||
fit: BoxFit.fill)), | fit: BoxFit.fill)), | ||||
height: 290.h, | height: 145, | ||||
child: Column( | child: Column( | ||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||||
children: <Widget>[ | children: <Widget>[ | ||||
@@ -69,8 +69,8 @@ class _WalletDataState extends State<WalletData> { | |||||
children: <Widget>[ | children: <Widget>[ | ||||
CachedNetworkImage( | CachedNetworkImage( | ||||
imageUrl: model?.headerAvatar ?? "", | imageUrl: model?.headerAvatar ?? "", | ||||
height: 66.h, | height: 33, | ||||
width: 52.h, | width: 26, | ||||
fit: BoxFit.fill, | fit: BoxFit.fill, | ||||
), | ), | ||||
Padding( | Padding( | ||||
@@ -82,7 +82,7 @@ class _WalletDataState extends State<WalletData> { | |||||
Text( | Text( | ||||
model?.headerCashOutText ?? "", | model?.headerCashOutText ?? "", | ||||
style: TextStyle( | style: TextStyle( | ||||
fontSize: 25.sp, | fontSize: 12.5, | ||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
model?.headerCashOutTextColor ?? | model?.headerCashOutTextColor ?? | ||||
"")), | "")), | ||||
@@ -93,7 +93,7 @@ class _WalletDataState extends State<WalletData> { | |||||
? dataModel[model.headerCashOutKey] | ? dataModel[model.headerCashOutKey] | ||||
: "", | : "", | ||||
style: TextStyle( | style: TextStyle( | ||||
fontSize: 40.sp, | fontSize: 20, | ||||
color: HexColor.fromHex( | color: HexColor.fromHex( | ||||
model.headerCashOutTextColor), | model.headerCashOutTextColor), | ||||
fontFamily: 'Din-Bold', | fontFamily: 'Din-Bold', | ||||
@@ -120,13 +120,15 @@ class _WalletDataState extends State<WalletData> { | |||||
), | ), | ||||
child: Padding( | child: Padding( | ||||
padding: EdgeInsets.only( | padding: EdgeInsets.only( | ||||
left: 29.w, | left: 14.5, | ||||
right: 29.w, | right: 14.5, | ||||
top: 20.w, | top: 10, | ||||
bottom: 20.w), | bottom: 10), | ||||
child: Text( | child: Text( | ||||
"提现", | model.headerCashOutBtnText, | ||||
style: TextStyle(color: Colors.white), | style: TextStyle( | ||||
color: HexColor.fromHex( | |||||
model.headerCashOutBtnTextColor)), | |||||
), | ), | ||||
), | ), | ||||
), | ), | ||||
@@ -159,14 +161,14 @@ class _WalletDataState extends State<WalletData> { | |||||
: "", | : "", | ||||
style: TextStyle( | style: TextStyle( | ||||
color: HexColor.fromHex(item.valueColor), | color: HexColor.fromHex(item.valueColor), | ||||
fontSize: 30.sp, | fontSize: 15, | ||||
fontFamily: 'Din-Bold', | fontFamily: 'Din-Bold', | ||||
package: 'zhiying_base_widget'), | package: 'zhiying_base_widget'), | ||||
), | ), | ||||
Text( | Text( | ||||
item.text, | item.text, | ||||
style: TextStyle( | style: TextStyle( | ||||
color: HexColor.fromHex(item.textColor), fontSize: 22.sp), | color: HexColor.fromHex(item.textColor), fontSize: 11), | ||||
), | ), | ||||
], | ], | ||||
)); | )); | ||||
@@ -4,13 +4,9 @@ import 'package:flutter/cupertino.dart'; | |||||
import 'package:flutter/material.dart'; | import 'package:flutter/material.dart'; | ||||
import 'package:tab_indicator_styler/tab_indicator_styler.dart'; | import 'package:tab_indicator_styler/tab_indicator_styler.dart'; | ||||
import 'package:zhiying_base_widget/dialog/tip_dialog/tip_dialog.dart'; | import 'package:zhiying_base_widget/dialog/tip_dialog/tip_dialog.dart'; | ||||
import 'package:zhiying_base_widget/pages/withdraw_page/withdraw_page.dart'; | |||||
import 'package:zhiying_base_widget/widgets/home/home_quick_entry/cached_network_image_util.dart'; | |||||
import 'package:zhiying_base_widget/widgets/wallet/wallet_detail/model/wallet_detail_data_model.dart'; | |||||
import 'package:zhiying_base_widget/widgets/wallet/wallet_detail/model/wallet_detail_model.dart'; | import 'package:zhiying_base_widget/widgets/wallet/wallet_detail/model/wallet_detail_model.dart'; | ||||
import 'package:zhiying_base_widget/widgets/wallet/wallet_detail/wallet_detail_bloc.dart'; | import 'package:zhiying_base_widget/widgets/wallet/wallet_detail/wallet_detail_bloc.dart'; | ||||
import 'package:zhiying_base_widget/widgets/wallet/wallet_detail/wallet_detail_sk.dart'; | import 'package:zhiying_base_widget/widgets/wallet/wallet_detail/wallet_detail_sk.dart'; | ||||
import 'package:flutter_screenutil/flutter_screenutil.dart'; | |||||
import 'package:cached_network_image/cached_network_image.dart'; | import 'package:cached_network_image/cached_network_image.dart'; | ||||
import 'package:zhiying_comm/zhiying_comm.dart'; | import 'package:zhiying_comm/zhiying_comm.dart'; | ||||
@@ -55,9 +51,10 @@ class _WalletDetailState extends State<WalletDetail> with TickerProviderStateMix | |||||
} | } | ||||
return Container( | return Container( | ||||
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)), | decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)), | ||||
margin: EdgeInsets.only(left: 12.5, right: 12.5, top: 15.h, bottom: 15.h), | margin: EdgeInsets.only(left: 12.5, right: 12.5, top: 7.5, bottom: 7.5), | ||||
padding: const EdgeInsets.only(bottom: 13), | padding: const EdgeInsets.only(bottom: 13), | ||||
child: Column( | child: Column( | ||||
crossAxisAlignment: CrossAxisAlignment.start, | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Container( | Container( | ||||
padding: EdgeInsets.only(top: 12), | padding: EdgeInsets.only(top: 12), | ||||
@@ -87,10 +84,10 @@ class _WalletDetailState extends State<WalletDetail> with TickerProviderStateMix | |||||
///日期选择 | ///日期选择 | ||||
Container( | Container( | ||||
height: 100.h, | height: 50, | ||||
alignment: Alignment.center, | alignment: Alignment.center, | ||||
child: ListView.builder( | child: ListView.builder( | ||||
padding: EdgeInsets.only( left: 16.w), | padding: EdgeInsets.only( left: 8), | ||||
itemCount: _model.dateList.length, | itemCount: _model.dateList.length, | ||||
scrollDirection: Axis.horizontal, | scrollDirection: Axis.horizontal, | ||||
itemBuilder: _buildTimeItem, | itemBuilder: _buildTimeItem, | ||||
@@ -99,8 +96,8 @@ class _WalletDetailState extends State<WalletDetail> with TickerProviderStateMix | |||||
/// 数据 | /// 数据 | ||||
Container( | Container( | ||||
height: 126.h, | height: 63, | ||||
margin: EdgeInsets.only(top: 16, left: 30.w, right: 30.w), | margin: EdgeInsets.only(top: 16, left: 15, right: 15), | ||||
width: double.infinity, | width: double.infinity, | ||||
decoration: BoxDecoration(image: DecorationImage(image: CachedNetworkImageProvider(_model.providerDashbord.finish.bgImg), fit: BoxFit.fill)), | decoration: BoxDecoration(image: DecorationImage(image: CachedNetworkImageProvider(_model.providerDashbord.finish.bgImg), fit: BoxFit.fill)), | ||||
child: Column( | child: Column( | ||||
@@ -112,7 +109,7 @@ class _WalletDetailState extends State<WalletDetail> with TickerProviderStateMix | |||||
padding: const EdgeInsets.all(8.0), | padding: const EdgeInsets.all(8.0), | ||||
child: Text( | child: Text( | ||||
_model.providerDashbord.finish.text, | _model.providerDashbord.finish.text, | ||||
style: TextStyle(fontSize: 28.sp, color: HexColor.fromHex(_model.providerDashbord.finish.textColor)), | style: TextStyle(fontSize: 14, color: HexColor.fromHex(_model.providerDashbord.finish.textColor)), | ||||
), | ), | ||||
), | ), | ||||
Row( | Row( | ||||
@@ -120,15 +117,15 @@ class _WalletDetailState extends State<WalletDetail> with TickerProviderStateMix | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
_model.providerDashbord.finish.text ?? "", | _model.providerDashbord.finish.text ?? "", | ||||
style: TextStyle(color: Colors.black, fontSize: 22.sp), | style: TextStyle(color: Colors.black, fontSize: 11), | ||||
), | ), | ||||
InkWell( | InkWell( | ||||
child: Padding( | child: Padding( | ||||
padding: const EdgeInsets.all(8.0), | padding: const EdgeInsets.all(8.0), | ||||
child: CachedNetworkImage( | child: CachedNetworkImage( | ||||
imageUrl: _model.providerDashbord.finish.tipIcon ?? "", | imageUrl: _model.providerDashbord.finish.tipIcon ?? "", | ||||
width: 20.h, | width: 10, | ||||
height: 20.h, | height: 10, | ||||
fit: BoxFit.fill, | fit: BoxFit.fill, | ||||
), | ), | ||||
), | ), | ||||
@@ -140,7 +137,7 @@ class _WalletDetailState extends State<WalletDetail> with TickerProviderStateMix | |||||
), | ), | ||||
Text( | Text( | ||||
_bloc.selectDateData.finish ?? "", | _bloc.selectDateData.finish ?? "", | ||||
style: TextStyle(color: Colors.red, fontSize: 40.sp, fontFamily: 'Din', package: 'zhiying_base_widget', fontWeight: FontWeight.bold), | style: TextStyle(color: Colors.red, fontSize: 20, fontFamily: 'Din', package: 'zhiying_base_widget', fontWeight: FontWeight.bold), | ||||
) | ) | ||||
], | ], | ||||
), | ), | ||||
@@ -187,7 +184,7 @@ class _WalletDetailState extends State<WalletDetail> with TickerProviderStateMix | |||||
child: Center( | child: Center( | ||||
child: Text( | child: Text( | ||||
item.text, | item.text, | ||||
style: TextStyle(fontSize: 22.sp, color: HexColor.fromHex(item.type == _bloc.selectDateData.type ? item.textSelectColor : item.textUnselectColor)), | style: TextStyle(fontSize: 11, color: HexColor.fromHex(item.type == _bloc.selectDateData.type ? item.textSelectColor : item.textUnselectColor)), | ||||
)), | )), | ||||
), | ), | ||||
), | ), | ||||
@@ -220,25 +217,25 @@ class _WalletDetailState extends State<WalletDetail> with TickerProviderStateMix | |||||
child: Column( | child: Column( | ||||
children: <Widget>[ | children: <Widget>[ | ||||
SizedBox( | SizedBox( | ||||
height: 15.h, | height: 7.5, | ||||
), | ), | ||||
item.isShow == "0" | item.isShow == "0" | ||||
? Container() | ? Container() | ||||
: Text( | : Text( | ||||
item.title, | item.title, | ||||
style: TextStyle(color: HexColor.fromHex(item.titleColor), fontSize: 28.sp), | style: TextStyle(color: HexColor.fromHex(item.titleColor), fontSize: 14), | ||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
height: 15.h, | height: 7.5, | ||||
), | ), | ||||
Row( | Row( | ||||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
children: <Widget>[ | children: <Widget>[ | ||||
Expanded( | Expanded( | ||||
child: Container( | child: Container( | ||||
height: 123.h, | height: 61.5, | ||||
margin: EdgeInsets.only(right: 8, left: 30.w), | margin: EdgeInsets.only(right: 8, left: 15), | ||||
padding: EdgeInsets.only(left: 20.w), | padding: EdgeInsets.only(left: 10), | ||||
decoration: BoxDecoration(image: DecorationImage(image: CachedNetworkImageProvider(item.itemList[0].bgImg ?? ""), fit: BoxFit.fill)), | decoration: BoxDecoration(image: DecorationImage(image: CachedNetworkImageProvider(item.itemList[0].bgImg ?? ""), fit: BoxFit.fill)), | ||||
child: Column( | child: Column( | ||||
mainAxisAlignment: MainAxisAlignment.center, | mainAxisAlignment: MainAxisAlignment.center, | ||||
@@ -248,15 +245,15 @@ class _WalletDetailState extends State<WalletDetail> with TickerProviderStateMix | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
item.itemList[0].text ?? "", | item.itemList[0].text ?? "", | ||||
style: TextStyle(fontSize: 22.sp, color: HexColor.fromHex(item.itemList[0].textColor)), | style: TextStyle(fontSize: 11, color: HexColor.fromHex(item.itemList[0].textColor)), | ||||
), | ), | ||||
InkWell( | InkWell( | ||||
child: Padding( | child: Padding( | ||||
padding: const EdgeInsets.all(8.0), | padding: const EdgeInsets.all(8.0), | ||||
child: CachedNetworkImage( | child: CachedNetworkImage( | ||||
imageUrl: item.itemList[0].tipIcon, | imageUrl: item.itemList[0].tipIcon, | ||||
width: 20.h, | width: 10, | ||||
height: 20.h, | height: 10, | ||||
fit: BoxFit.fill, | fit: BoxFit.fill, | ||||
), | ), | ||||
), | ), | ||||
@@ -272,7 +269,7 @@ class _WalletDetailState extends State<WalletDetail> with TickerProviderStateMix | |||||
fontFamily: 'Din', | fontFamily: 'Din', | ||||
package: 'zhiying_base_widget', | package: 'zhiying_base_widget', | ||||
fontWeight: FontWeight.bold, | fontWeight: FontWeight.bold, | ||||
fontSize: 34.sp, | fontSize: 17, | ||||
color: HexColor.fromHex(item.itemList[1].valueColor), | color: HexColor.fromHex(item.itemList[1].valueColor), | ||||
)) | )) | ||||
], | ], | ||||
@@ -280,9 +277,9 @@ class _WalletDetailState extends State<WalletDetail> with TickerProviderStateMix | |||||
), | ), | ||||
Expanded( | Expanded( | ||||
child: Container( | child: Container( | ||||
height: 123.h, | height: 61.5, | ||||
margin: EdgeInsets.only(left: 8, right: 30.w), | margin: EdgeInsets.only(left: 8, right: 15,), | ||||
padding: EdgeInsets.only(left: 20.w), | padding: EdgeInsets.only(left: 10), | ||||
decoration: BoxDecoration(image: DecorationImage(image: CachedNetworkImageProvider(item.itemList[1].bgImg ?? ""), fit: BoxFit.fill)), | decoration: BoxDecoration(image: DecorationImage(image: CachedNetworkImageProvider(item.itemList[1].bgImg ?? ""), fit: BoxFit.fill)), | ||||
child: Column( | child: Column( | ||||
mainAxisAlignment: MainAxisAlignment.center, | mainAxisAlignment: MainAxisAlignment.center, | ||||
@@ -292,15 +289,15 @@ class _WalletDetailState extends State<WalletDetail> with TickerProviderStateMix | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
item.itemList[1].text ?? "", | item.itemList[1].text ?? "", | ||||
style: TextStyle(fontSize: 22.sp, color: HexColor.fromHex(item.itemList[1].textColor)), | style: TextStyle(fontSize: 11, color: HexColor.fromHex(item.itemList[1].textColor)), | ||||
), | ), | ||||
InkWell( | InkWell( | ||||
child: Padding( | child: Padding( | ||||
padding: const EdgeInsets.all(8.0), | padding: const EdgeInsets.all(8.0), | ||||
child: CachedNetworkImage( | child: CachedNetworkImage( | ||||
imageUrl: item.itemList[1].tipIcon, | imageUrl: item.itemList[1].tipIcon, | ||||
width: 20.h, | width: 10, | ||||
height: 20.h, | height: 10, | ||||
fit: BoxFit.fill, | fit: BoxFit.fill, | ||||
), | ), | ||||
), | ), | ||||
@@ -314,7 +311,7 @@ class _WalletDetailState extends State<WalletDetail> with TickerProviderStateMix | |||||
Text( | Text( | ||||
dataMap[item.itemList[1].vauleKey], | dataMap[item.itemList[1].vauleKey], | ||||
style: TextStyle( | style: TextStyle( | ||||
fontSize: 34.sp, color: HexColor.fromHex(item.itemList[1].valueColor), fontFamily: 'Din', package: 'zhiying_base_widget', fontWeight: FontWeight.bold), | fontSize: 17, color: HexColor.fromHex(item.itemList[1].valueColor), fontFamily: 'Din', package: 'zhiying_base_widget', fontWeight: FontWeight.bold), | ||||
) | ) | ||||
], | ], | ||||
), | ), | ||||
@@ -27,7 +27,8 @@ class WalletBilDetail extends StatefulWidget { | |||||
_WalletBilDetailState createState() => _WalletBilDetailState(); | _WalletBilDetailState createState() => _WalletBilDetailState(); | ||||
} | } | ||||
class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderStateMixin, AutomaticKeepAliveClientMixin { | class _WalletBilDetailState extends State<WalletBilDetail> | ||||
with TickerProviderStateMixin, AutomaticKeepAliveClientMixin { | |||||
WalletBilDetailWidgetBloc _bloc; | WalletBilDetailWidgetBloc _bloc; | ||||
TabController _tabController; | TabController _tabController; | ||||
@@ -36,7 +37,8 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
void initState() { | void initState() { | ||||
_bloc = WalletBilDetailWidgetBloc(); | _bloc = WalletBilDetailWidgetBloc(); | ||||
_bloc.initStyleData(json.decode(widget.data['data'])); | _bloc.initStyleData(json.decode(widget.data['data'])); | ||||
_tabController = TabController(length: _bloc.styleData.tabList.length, vsync: this); | _tabController = | ||||
TabController(length: _bloc.styleData.tabList.length, vsync: this); | |||||
_bloc.loadInputData(_bloc.inPutCurrentPage, _bloc.inputShowDate); | _bloc.loadInputData(_bloc.inPutCurrentPage, _bloc.inputShowDate); | ||||
_bloc.loadOutputData(_bloc.outPutCurrentPage, _bloc.outputShowDate); | _bloc.loadOutputData(_bloc.outPutCurrentPage, _bloc.outputShowDate); | ||||
@@ -52,7 +54,8 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
children: <Widget>[ | children: <Widget>[ | ||||
AppBar( | AppBar( | ||||
brightness: Brightness.light, | brightness: Brightness.light, | ||||
backgroundColor: HexColor.fromHex(_bloc.styleData.appBarBgColor), | backgroundColor: | ||||
HexColor.fromHex(_bloc.styleData.appBarBgColor), | |||||
centerTitle: true, | centerTitle: true, | ||||
leading: IconButton( | leading: IconButton( | ||||
icon: Icon( | icon: Icon( | ||||
@@ -65,7 +68,10 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
}), | }), | ||||
title: Text( | title: Text( | ||||
_bloc.styleData.appBarName ?? "", | _bloc.styleData.appBarName ?? "", | ||||
style: TextStyle(color: HexColor.fromHex(_bloc.styleData.appBarNameColor), fontWeight: FontWeight.bold, fontSize: 18), | style: TextStyle( | ||||
color: HexColor.fromHex(_bloc.styleData.appBarNameColor), | |||||
fontWeight: FontWeight.bold, | |||||
fontSize: 18), | |||||
), | ), | ||||
), | ), | ||||
Container( | Container( | ||||
@@ -82,15 +88,22 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
controller: _tabController, | controller: _tabController, | ||||
tabs: _buildTabBarItem(), | tabs: _buildTabBarItem(), | ||||
indicatorWeight: 9.5, | indicatorWeight: 9.5, | ||||
labelStyle: TextStyle(fontSize: 15, fontWeight: FontWeight.bold), | labelStyle: | ||||
unselectedLabelStyle: TextStyle(fontSize: 15, fontWeight: FontWeight.bold), | TextStyle(fontSize: 15, fontWeight: FontWeight.bold), | ||||
unselectedLabelStyle: | |||||
TextStyle(fontSize: 15, fontWeight: FontWeight.bold), | |||||
labelColor: HexColor.fromHex(_bloc.styleData.tabSeletedColor), | labelColor: HexColor.fromHex(_bloc.styleData.tabSeletedColor), | ||||
unselectedLabelColor: HexColor.fromHex(_bloc.styleData.tabNoSeletedColor), | unselectedLabelColor: | ||||
indicatorColor: HexColor.fromHex(_bloc.styleData.tabLineColor), | HexColor.fromHex(_bloc.styleData.tabNoSeletedColor), | ||||
indicatorColor: | |||||
HexColor.fromHex(_bloc.styleData.tabLineColor), | |||||
indicatorSize: TabBarIndicatorSize.label, | indicatorSize: TabBarIndicatorSize.label, | ||||
), | ), | ||||
), | ), | ||||
Expanded(child: TabBarView(controller: _tabController, children: _buildTabViewPage())) | Expanded( | ||||
child: TabBarView( | |||||
controller: _tabController, | |||||
children: _buildTabViewPage())) | |||||
], | ], | ||||
), | ), | ||||
)); | )); | ||||
@@ -126,8 +139,14 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
}, | }, | ||||
child: Padding( | child: Padding( | ||||
padding: const EdgeInsets.only(top: 8, bottom: 8), | padding: const EdgeInsets.only(top: 8, bottom: 8), | ||||
child: Text(tabList.type == "input" ? _bloc.inputShowDate : _bloc.outputShowDate, | child: Text( | ||||
style: TextStyle(fontSize: 28.sp, color: HexColor.fromHex(_bloc.styleData.timeSelectColor), fontWeight: FontWeight.bold))), | tabList.type == "input" | ||||
? _bloc.inputShowDate | |||||
: _bloc.outputShowDate, | |||||
style: TextStyle( | |||||
fontSize: 14, | |||||
color: HexColor.fromHex(_bloc.styleData.timeSelectColor), | |||||
fontWeight: FontWeight.bold))), | |||||
), | ), | ||||
Icon( | Icon( | ||||
Icons.arrow_drop_down, | Icons.arrow_drop_down, | ||||
@@ -147,11 +166,15 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
if (tabList.type == 'input') { | if (tabList.type == 'input') { | ||||
_bloc.inputSelectType = tabViewBtns[index].type; | _bloc.inputSelectType = tabViewBtns[index].type; | ||||
_bloc.inPutCurrentPage = 1; | _bloc.inPutCurrentPage = 1; | ||||
_bloc.loadInputData(_bloc.inPutCurrentPage, _bloc.inputShowDate, type: _bloc.inputSelectType); | _bloc.loadInputData( | ||||
_bloc.inPutCurrentPage, _bloc.inputShowDate, | |||||
type: _bloc.inputSelectType); | |||||
} else { | } else { | ||||
_bloc.outputSelectType = tabViewBtns[index].type; | _bloc.outputSelectType = tabViewBtns[index].type; | ||||
_bloc.outPutCurrentPage = 1; | _bloc.outPutCurrentPage = 1; | ||||
_bloc.loadOutputData(_bloc.outPutCurrentPage, _bloc.outputShowDate, type: _bloc.outputSelectType); | _bloc.loadOutputData( | ||||
_bloc.outPutCurrentPage, _bloc.outputShowDate, | |||||
type: _bloc.outputSelectType); | |||||
} | } | ||||
_bloc.refresh(); | _bloc.refresh(); | ||||
}, | }, | ||||
@@ -159,16 +182,24 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
child: Container( | child: Container( | ||||
alignment: Alignment.center, | alignment: Alignment.center, | ||||
margin: EdgeInsets.only(right: 12.5), | margin: EdgeInsets.only(right: 12.5), | ||||
padding: EdgeInsets.only(left: 16, right: 16, top: 2.5, bottom: 2.5), | padding: EdgeInsets.only( | ||||
left: 16, right: 16, top: 2.5, bottom: 2.5), | |||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
border: Border.all( | border: Border.all( | ||||
color: HexColor.fromHex(selectType == tabViewBtns[index].type ? _bloc.styleData.btnSelectedColor : _bloc.styleData.btnNoSelectedColor), | color: HexColor.fromHex( | ||||
selectType == tabViewBtns[index].type | |||||
? _bloc.styleData.btnSelectedColor | |||||
: _bloc.styleData.btnNoSelectedColor), | |||||
), | ), | ||||
borderRadius: BorderRadius.circular(50)), | borderRadius: BorderRadius.circular(50)), | ||||
child: Text( | child: Text( | ||||
tabViewBtns[index].name ?? "", | tabViewBtns[index].name ?? "", | ||||
style: TextStyle( | style: TextStyle( | ||||
fontSize: 11, color: HexColor.fromHex(selectType == tabViewBtns[index].type ? _bloc.styleData.btnSelectedColor : _bloc.styleData.btnNoSelectedColor)), | fontSize: 11, | ||||
color: HexColor.fromHex( | |||||
selectType == tabViewBtns[index].type | |||||
? _bloc.styleData.btnSelectedColor | |||||
: _bloc.styleData.btnNoSelectedColor)), | |||||
), | ), | ||||
), | ), | ||||
); | ); | ||||
@@ -179,9 +210,11 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
} | } | ||||
_selectDate(TabList tabList) async { | _selectDate(TabList tabList) async { | ||||
var result = await showDialog(context: context, builder: (context) => SelectDateYMDialog()); | var result = await showDialog( | ||||
context: context, builder: (context) => SelectDateYMDialog()); | |||||
if (result != null) { | if (result != null) { | ||||
var dataTime = DateFormat('yyyy-MM').format(DateTime(int.parse(result['year']), int.parse(result['month']))); | var dataTime = DateFormat('yyyy-MM').format( | ||||
DateTime(int.parse(result['year']), int.parse(result['month']))); | |||||
if (tabList.type == "input") { | if (tabList.type == "input") { | ||||
_bloc.inputShowDate = dataTime; | _bloc.inputShowDate = dataTime; | ||||
_bloc.loadInputData(_bloc.inPutCurrentPage, _bloc.inputShowDate); | _bloc.loadInputData(_bloc.inPutCurrentPage, _bloc.inputShowDate); | ||||
@@ -196,7 +229,9 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
_buildBottomItem(TabList tabList) { | _buildBottomItem(TabList tabList) { | ||||
return ListView.builder( | return ListView.builder( | ||||
shrinkWrap: true, | shrinkWrap: true, | ||||
itemCount: tabList.type == 'input' ? _bloc.inputDataVM.length : _bloc.outputDataVM.length, | itemCount: tabList.type == 'input' | ||||
? _bloc.inputDataVM.length | |||||
: _bloc.outputDataVM.length, | |||||
itemBuilder: (context, index) { | itemBuilder: (context, index) { | ||||
return _buildItem(context, index, tabList); | return _buildItem(context, index, tabList); | ||||
}); | }); | ||||
@@ -208,8 +243,10 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
var modelItem = _bloc.inputDataVM[index]; | var modelItem = _bloc.inputDataVM[index]; | ||||
return Container( | return Container( | ||||
margin: EdgeInsets.only(left: 12.5, right: 12.5, bottom: 4, top: 4), | margin: EdgeInsets.only(left: 12.5, right: 12.5, bottom: 4, top: 4), | ||||
padding: EdgeInsets.only(left: 25.w, right: 25.w, top: 20.h, bottom: 20.h), | padding: EdgeInsets.only(left: 12.5, right: 12.5, top: 10, bottom: 10), | ||||
decoration: BoxDecoration(color: HexColor.fromHex("#FFFFFF"), borderRadius: BorderRadius.circular(8)), | decoration: BoxDecoration( | ||||
color: HexColor.fromHex("#FFFFFF"), | |||||
borderRadius: BorderRadius.circular(8)), | |||||
child: Column( | child: Column( | ||||
children: <Widget>[ | children: <Widget>[ | ||||
Row( | Row( | ||||
@@ -219,25 +256,33 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Container( | Container( | ||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
borderRadius: BorderRadius.circular(4), color: HexColor.fromHex("#FFFFF3F3"), border: Border.all(color: HexColor.fromHex(inputItemStyle.typeNameColor))), | borderRadius: BorderRadius.circular(4), | ||||
color: HexColor.fromHex("#FFFFF3F3"), | |||||
border: Border.all( | |||||
color: HexColor.fromHex( | |||||
inputItemStyle.typeNameColor))), | |||||
child: Padding( | child: Padding( | ||||
padding: const EdgeInsets.only(left: 4, right: 4, top: 2, bottom: 2), | padding: const EdgeInsets.only( | ||||
left: 4, right: 4, top: 2, bottom: 2), | |||||
child: Center( | child: Center( | ||||
child: Text( | child: Text( | ||||
modelItem['type'] ?? "", | modelItem['type'] ?? "", | ||||
style: TextStyle(color: HexColor.fromHex(inputItemStyle.typeNameColor), fontSize: 20.sp), | style: TextStyle( | ||||
color: HexColor.fromHex( | |||||
inputItemStyle.typeNameColor), | |||||
fontSize: 10), | |||||
), | ), | ||||
), | ), | ||||
), | ), | ||||
), | ), | ||||
Container( | Container( | ||||
width: 353.w, | width: 176.5, | ||||
margin: EdgeInsets.only(left: 15.w), | margin: EdgeInsets.only(left: 7.5), | ||||
child: Text( | child: Text( | ||||
modelItem['title'] ?? "", | modelItem['title'] ?? "", | ||||
maxLines: 1, | maxLines: 1, | ||||
overflow: TextOverflow.ellipsis, | overflow: TextOverflow.ellipsis, | ||||
style: TextStyle(fontSize: 28.sp), | style: TextStyle(fontSize: 14), | ||||
)) | )) | ||||
], | ], | ||||
), | ), | ||||
@@ -245,11 +290,16 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
"+ ", | "+ ", | ||||
style: TextStyle(color: HexColor.fromHex(inputItemStyle.amountColor)), | style: TextStyle( | ||||
color: HexColor.fromHex(inputItemStyle.amountColor)), | |||||
), | ), | ||||
Text( | Text( | ||||
"¥ " + modelItem['amount'], | "¥ " + modelItem['amount'], | ||||
style: TextStyle(color: HexColor.fromHex(inputItemStyle.amountColor), fontSize: 30.sp, fontFamily: 'Din', package: 'zhiying_base_widget'), | style: TextStyle( | ||||
color: HexColor.fromHex(inputItemStyle.amountColor), | |||||
fontSize: 15, | |||||
fontFamily: 'Din', | |||||
package: 'zhiying_base_widget'), | |||||
) | ) | ||||
], | ], | ||||
) | ) | ||||
@@ -264,33 +314,45 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
inputItemStyle.orderIdText, | inputItemStyle.orderIdText, | ||||
style: TextStyle(color: HexColor.fromHex(inputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex(inputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
width: 4, | width: 4, | ||||
), | ), | ||||
Text( | Text( | ||||
modelItem['order_id'], | modelItem['order_id'], | ||||
style: TextStyle(color: HexColor.fromHex(inputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex(inputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
width: 28.w, | width: 14, | ||||
), | ), | ||||
GestureDetector( | GestureDetector( | ||||
onTap: () { | onTap: () { | ||||
Clipboard.setData(ClipboardData(text: modelItem['order_id'])); | Clipboard.setData( | ||||
ClipboardData(text: modelItem['order_id'])); | |||||
Fluttertoast.showToast(msg: "已复制"); | Fluttertoast.showToast(msg: "已复制"); | ||||
}, | }, | ||||
child: Container( | child: Container( | ||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
borderRadius: BorderRadius.circular(4), | borderRadius: BorderRadius.circular(4), | ||||
color: HexColor.fromHex(inputItemStyle.copyBtnBgColor), | color: HexColor.fromHex(inputItemStyle.copyBtnBgColor), | ||||
border: Border.all(color: HexColor.fromHex(inputItemStyle.contentColor), width: 0.5)), | border: Border.all( | ||||
color: | |||||
HexColor.fromHex(inputItemStyle.contentColor), | |||||
width: 0.5)), | |||||
child: Padding( | child: Padding( | ||||
padding: EdgeInsets.only(left: 16, right: 16, top: 1, bottom: 1), | padding: EdgeInsets.only( | ||||
left: 16, right: 16, top: 1, bottom: 1), | |||||
child: Text( | child: Text( | ||||
inputItemStyle.copyBtnText, | inputItemStyle.copyBtnText, | ||||
style: TextStyle(color: HexColor.fromHex(inputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex( | |||||
inputItemStyle.copyBtnTextColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
), | ), | ||||
), | ), | ||||
@@ -307,14 +369,17 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
inputItemStyle.orderTypeText, | inputItemStyle.orderTypeText, | ||||
style: TextStyle(color: HexColor.fromHex(inputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex(inputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
width: 4, | width: 4, | ||||
), | ), | ||||
Text( | Text( | ||||
modelItem['order_type'] ?? "", | modelItem['order_type'] ?? "", | ||||
style: TextStyle(color: HexColor.fromHex("#FF999999"), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex("#FF999999"), fontSize: 11), | |||||
), | ), | ||||
], | ], | ||||
)), | )), | ||||
@@ -323,7 +388,9 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
inputItemStyle.amountText + " ¥" + modelItem['amount'], | inputItemStyle.amountText + " ¥" + modelItem['amount'], | ||||
style: TextStyle(color: HexColor.fromHex(inputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex(inputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
], | ], | ||||
)) | )) | ||||
@@ -339,14 +406,17 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
inputItemStyle.timeText, | inputItemStyle.timeText, | ||||
style: TextStyle(color: HexColor.fromHex(inputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex(inputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
width: 4, | width: 4, | ||||
), | ), | ||||
Text( | Text( | ||||
modelItem['time'] ?? "", | modelItem['time'] ?? "", | ||||
style: TextStyle(color: HexColor.fromHex("#FF999999"), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex("#FF999999"), fontSize: 11), | |||||
), | ), | ||||
], | ], | ||||
)), | )), | ||||
@@ -354,8 +424,13 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
child: Row( | child: Row( | ||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
inputItemStyle.settleTimeText + " " + modelItem['settle_time'] ?? "", | inputItemStyle.settleTimeText + | ||||
style: TextStyle(color: HexColor.fromHex(inputItemStyle.contentColor), fontSize: 22.sp), | " " + | ||||
modelItem['settle_time'] ?? | |||||
"", | |||||
style: TextStyle( | |||||
color: HexColor.fromHex(inputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
], | ], | ||||
)) | )) | ||||
@@ -371,8 +446,11 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
///消费返回的Item | ///消费返回的Item | ||||
return Container( | return Container( | ||||
margin: EdgeInsets.only(left: 12.5, right: 12.5, bottom: 4, top: 4), | margin: EdgeInsets.only(left: 12.5, right: 12.5, bottom: 4, top: 4), | ||||
padding: EdgeInsets.only(left: 25.w, right: 25.w, top: 20.h, bottom: 20.h), | padding: | ||||
decoration: BoxDecoration(color: HexColor.fromHex("#FFFFFF"), borderRadius: BorderRadius.circular(8)), | EdgeInsets.only(left: 12.5, right: 12.5, top: 10, bottom: 10), | ||||
decoration: BoxDecoration( | |||||
color: HexColor.fromHex("#FFFFFF"), | |||||
borderRadius: BorderRadius.circular(8)), | |||||
child: Column( | child: Column( | ||||
children: <Widget>[ | children: <Widget>[ | ||||
Row( | Row( | ||||
@@ -384,25 +462,31 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
borderRadius: BorderRadius.circular(4), | borderRadius: BorderRadius.circular(4), | ||||
color: HexColor.fromHex("#FFFFF3F3"), | color: HexColor.fromHex("#FFFFF3F3"), | ||||
border: Border.all(color: HexColor.fromHex(outputItemStyle.typeNameColor))), | border: Border.all( | ||||
color: HexColor.fromHex( | |||||
outputItemStyle.typeNameColor))), | |||||
child: Padding( | child: Padding( | ||||
padding: const EdgeInsets.only(left: 4, right: 4, top: 2, bottom: 2), | padding: const EdgeInsets.only( | ||||
left: 4, right: 4, top: 2, bottom: 2), | |||||
child: Center( | child: Center( | ||||
child: Text( | child: Text( | ||||
modelItem['type'] ?? "", | modelItem['type'] ?? "", | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.typeNameColor), fontSize: 20.sp), | style: TextStyle( | ||||
color: HexColor.fromHex( | |||||
outputItemStyle.typeNameColor), | |||||
fontSize: 10), | |||||
), | ), | ||||
), | ), | ||||
), | ), | ||||
), | ), | ||||
Container( | Container( | ||||
width: 353.w, | width: 176.5, | ||||
margin: EdgeInsets.only(left: 15.w), | margin: EdgeInsets.only(left: 7.5), | ||||
child: Text( | child: Text( | ||||
modelItem['title'] ?? "", | modelItem['title'] ?? "", | ||||
maxLines: 1, | maxLines: 1, | ||||
overflow: TextOverflow.ellipsis, | overflow: TextOverflow.ellipsis, | ||||
style: TextStyle(fontSize: 28.sp), | style: TextStyle(fontSize: 14), | ||||
)) | )) | ||||
], | ], | ||||
), | ), | ||||
@@ -410,11 +494,16 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
"- ", | "- ", | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.amountColor)), | style: TextStyle( | ||||
color: | |||||
HexColor.fromHex(outputItemStyle.amountColor)), | |||||
), | ), | ||||
Text( | Text( | ||||
"¥ " + modelItem['amount'], | "¥ " + modelItem['amount'], | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.amountColor), fontSize: 30.sp), | style: TextStyle( | ||||
color: | |||||
HexColor.fromHex(outputItemStyle.amountColor), | |||||
fontSize: 15), | |||||
) | ) | ||||
], | ], | ||||
) | ) | ||||
@@ -429,33 +518,46 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
outputItemStyle.orderIdText, | outputItemStyle.orderIdText, | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex(outputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
width: 4, | width: 4, | ||||
), | ), | ||||
Text( | Text( | ||||
modelItem['order_id'], | modelItem['order_id'], | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex(outputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
width: 28.w, | width: 14, | ||||
), | ), | ||||
GestureDetector( | GestureDetector( | ||||
onTap: () { | onTap: () { | ||||
Clipboard.setData(ClipboardData(text: modelItem['order_id'])); | Clipboard.setData( | ||||
ClipboardData(text: modelItem['order_id'])); | |||||
Fluttertoast.showToast(msg: "已复制"); | Fluttertoast.showToast(msg: "已复制"); | ||||
}, | }, | ||||
child: Container( | child: Container( | ||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
borderRadius: BorderRadius.circular(4), | borderRadius: BorderRadius.circular(4), | ||||
color: HexColor.fromHex(outputItemStyle.copyBtnBgColor), | color: | ||||
border: Border.all(color: HexColor.fromHex(outputItemStyle.contentColor),width: 0.5)), | HexColor.fromHex(outputItemStyle.copyBtnBgColor), | ||||
border: Border.all( | |||||
color: HexColor.fromHex( | |||||
outputItemStyle.contentColor), | |||||
width: 0.5)), | |||||
child: Padding( | child: Padding( | ||||
padding: EdgeInsets.only(left: 16, right: 16, top: 1, bottom: 1), | padding: EdgeInsets.only( | ||||
left: 16, right: 16, top: 1, bottom: 1), | |||||
child: Text( | child: Text( | ||||
outputItemStyle.copyBtnText ?? "", | outputItemStyle.copyBtnText ?? "", | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex( | |||||
outputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
), | ), | ||||
), | ), | ||||
@@ -472,14 +574,18 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
outputItemStyle.consumeOrderTypeText, | outputItemStyle.consumeOrderTypeText, | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: | |||||
HexColor.fromHex(outputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
width: 4, | width: 4, | ||||
), | ), | ||||
Text( | Text( | ||||
modelItem['order_type'] ?? "", | modelItem['order_type'] ?? "", | ||||
style: TextStyle(color: HexColor.fromHex("#FF999999"), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex("#FF999999"), fontSize: 11), | |||||
), | ), | ||||
], | ], | ||||
)), | )), | ||||
@@ -487,8 +593,13 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
child: Row( | child: Row( | ||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
outputItemStyle.consumeAmountText + " ¥" + modelItem['amount'], | outputItemStyle.consumeAmountText + | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), | " ¥" + | ||||
modelItem['amount'], | |||||
style: TextStyle( | |||||
color: | |||||
HexColor.fromHex(outputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
], | ], | ||||
)) | )) | ||||
@@ -504,14 +615,18 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
outputItemStyle.consumeTimeText, | outputItemStyle.consumeTimeText, | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: | |||||
HexColor.fromHex(outputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
width: 4, | width: 4, | ||||
), | ), | ||||
Text( | Text( | ||||
modelItem['time'] ?? "", | modelItem['time'] ?? "", | ||||
style: TextStyle(color: HexColor.fromHex("#FF999999"), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex("#FF999999"), fontSize: 11), | |||||
), | ), | ||||
], | ], | ||||
)), | )), | ||||
@@ -537,8 +652,11 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
} else if (modelItem['type'] == '提现') { | } else if (modelItem['type'] == '提现') { | ||||
return Container( | return Container( | ||||
margin: EdgeInsets.only(left: 12.5, right: 12.5, bottom: 4, top: 4), | margin: EdgeInsets.only(left: 12.5, right: 12.5, bottom: 4, top: 4), | ||||
padding: EdgeInsets.only(left: 25.w, right: 25.w, top: 20.h, bottom: 20.h), | padding: | ||||
decoration: BoxDecoration(color: HexColor.fromHex("#FFFFFF"), borderRadius: BorderRadius.circular(8)), | EdgeInsets.only(left: 12.5, right: 12.5, top: 10, bottom: 10), | ||||
decoration: BoxDecoration( | |||||
color: HexColor.fromHex("#FFFFFF"), | |||||
borderRadius: BorderRadius.circular(8)), | |||||
child: Column( | child: Column( | ||||
children: <Widget>[ | children: <Widget>[ | ||||
Row( | Row( | ||||
@@ -550,25 +668,31 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
borderRadius: BorderRadius.circular(4), | borderRadius: BorderRadius.circular(4), | ||||
color: HexColor.fromHex("#FFFFF3F3"), | color: HexColor.fromHex("#FFFFF3F3"), | ||||
border: Border.all(color: HexColor.fromHex(outputItemStyle.typeNameColor))), | border: Border.all( | ||||
color: HexColor.fromHex( | |||||
outputItemStyle.typeNameColor))), | |||||
child: Padding( | child: Padding( | ||||
padding: const EdgeInsets.only(left: 4, right: 4, top: 2, bottom: 2), | padding: const EdgeInsets.only( | ||||
left: 4, right: 4, top: 2, bottom: 2), | |||||
child: Center( | child: Center( | ||||
child: Text( | child: Text( | ||||
modelItem['type'] ?? "", | modelItem['type'] ?? "", | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.typeNameColor), fontSize: 20.sp), | style: TextStyle( | ||||
color: HexColor.fromHex( | |||||
outputItemStyle.typeNameColor), | |||||
fontSize: 10), | |||||
), | ), | ||||
), | ), | ||||
), | ), | ||||
), | ), | ||||
Container( | Container( | ||||
width: 353.w, | width: 176.5, | ||||
margin: EdgeInsets.only(left: 15.w), | margin: EdgeInsets.only(left: 12.5), | ||||
child: Text( | child: Text( | ||||
modelItem['title'] ?? "", | modelItem['title'] ?? "", | ||||
maxLines: 1, | maxLines: 1, | ||||
overflow: TextOverflow.ellipsis, | overflow: TextOverflow.ellipsis, | ||||
style: TextStyle(fontSize: 28.sp), | style: TextStyle(fontSize: 14), | ||||
)) | )) | ||||
], | ], | ||||
), | ), | ||||
@@ -576,11 +700,16 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
"- ", | "- ", | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.amountColor)), | style: TextStyle( | ||||
color: | |||||
HexColor.fromHex(outputItemStyle.amountColor)), | |||||
), | ), | ||||
Text( | Text( | ||||
"¥ " + modelItem['amount'], | "¥ " + modelItem['amount'], | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.amountColor), fontSize: 30.sp), | style: TextStyle( | ||||
color: | |||||
HexColor.fromHex(outputItemStyle.amountColor), | |||||
fontSize: 15), | |||||
) | ) | ||||
], | ], | ||||
) | ) | ||||
@@ -595,33 +724,46 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
outputItemStyle.orderIdText, | outputItemStyle.orderIdText, | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex(outputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
width: 4, | width: 4, | ||||
), | ), | ||||
Text( | Text( | ||||
modelItem['order_id'], | modelItem['order_id'], | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex(outputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
width: 28.w, | width: 14, | ||||
), | ), | ||||
GestureDetector( | GestureDetector( | ||||
onTap: () { | onTap: () { | ||||
Clipboard.setData(ClipboardData(text: modelItem['order_id'])); | Clipboard.setData( | ||||
ClipboardData(text: modelItem['order_id'])); | |||||
Fluttertoast.showToast(msg: "已复制"); | Fluttertoast.showToast(msg: "已复制"); | ||||
}, | }, | ||||
child: Container( | child: Container( | ||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
borderRadius: BorderRadius.circular(4), | borderRadius: BorderRadius.circular(4), | ||||
color: HexColor.fromHex(outputItemStyle.copyBtnBgColor), | color: | ||||
border: Border.all(color: HexColor.fromHex(outputItemStyle.contentColor), width: 0.5)), | HexColor.fromHex(outputItemStyle.copyBtnBgColor), | ||||
border: Border.all( | |||||
color: HexColor.fromHex( | |||||
outputItemStyle.contentColor), | |||||
width: 0.5)), | |||||
child: Padding( | child: Padding( | ||||
padding: EdgeInsets.only(left: 16, right: 16, top: 1, bottom: 1), | padding: EdgeInsets.only( | ||||
left: 16, right: 16, top: 1, bottom: 1), | |||||
child: Text( | child: Text( | ||||
outputItemStyle.copyBtnText ?? "", | outputItemStyle.copyBtnText ?? "", | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex( | |||||
outputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
), | ), | ||||
), | ), | ||||
@@ -638,14 +780,20 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
outputItemStyle.withdrawAccountText, | outputItemStyle.withdrawAccountText, | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: | |||||
HexColor.fromHex(outputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
width: 4, | width: 4, | ||||
), | ), | ||||
Text( | Text( | ||||
modelItem['account'] ?? "", | modelItem['account'] ?? "", | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: | |||||
HexColor.fromHex(outputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
], | ], | ||||
)), | )), | ||||
@@ -653,8 +801,13 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
child: Row( | child: Row( | ||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
outputItemStyle.withdrawAmountText + " ¥" + modelItem['amount'], | outputItemStyle.withdrawAmountText + | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), | " ¥" + | ||||
modelItem['amount'], | |||||
style: TextStyle( | |||||
color: | |||||
HexColor.fromHex(outputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
], | ], | ||||
)) | )) | ||||
@@ -668,14 +821,18 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
outputItemStyle.withdrawTimeText, | outputItemStyle.withdrawTimeText, | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), | style: TextStyle( | ||||
color: | |||||
HexColor.fromHex(outputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
SizedBox( | SizedBox( | ||||
width: 4, | width: 4, | ||||
), | ), | ||||
Text( | Text( | ||||
modelItem['time'] ?? "", | modelItem['time'] ?? "", | ||||
style: TextStyle(color: HexColor.fromHex("#FF999999"), fontSize: 22.sp), | style: TextStyle( | ||||
color: HexColor.fromHex("#FF999999"), fontSize: 11), | |||||
), | ), | ||||
], | ], | ||||
)), | )), | ||||
@@ -683,8 +840,14 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
child: Row( | child: Row( | ||||
children: <Widget>[ | children: <Widget>[ | ||||
Text( | Text( | ||||
outputItemStyle.withdrawOrderStatusText + " " + modelItem['order_status'] ?? "", | outputItemStyle.withdrawOrderStatusText + | ||||
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), | " " + | ||||
modelItem['order_status'] ?? | |||||
"", | |||||
style: TextStyle( | |||||
color: | |||||
HexColor.fromHex(outputItemStyle.contentColor), | |||||
fontSize: 11), | |||||
), | ), | ||||
], | ], | ||||
)) | )) | ||||
@@ -723,7 +886,9 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
onRefresh: () { | onRefresh: () { | ||||
_bloc.inputRefresh(); | _bloc.inputRefresh(); | ||||
}, | }, | ||||
child: EmptyUtil.isEmpty(_bloc.inputDataVM ) ? EmptyWidget() : _buildBottomItem(item)), | child: EmptyUtil.isEmpty(_bloc.inputDataVM) | ||||
? EmptyWidget() | |||||
: _buildBottomItem(item)), | |||||
) | ) | ||||
], | ], | ||||
), | ), | ||||
@@ -751,7 +916,9 @@ class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderSt | |||||
onRefresh: () { | onRefresh: () { | ||||
_bloc.outputRefresh(); | _bloc.outputRefresh(); | ||||
}, | }, | ||||
child: EmptyUtil.isEmpty(_bloc.outputDataVM) ? EmptyWidget() : _buildBottomItem(item)), | child: EmptyUtil.isEmpty(_bloc.outputDataVM) | ||||
? EmptyWidget() | |||||
: _buildBottomItem(item)), | |||||
) | ) | ||||
], | ], | ||||
), | ), | ||||