|
|
@@ -6,7 +6,6 @@ import 'package:intl/intl.dart'; |
|
|
|
import 'package:pull_to_refresh/pull_to_refresh.dart'; |
|
|
|
import 'package:tab_indicator_styler/tab_indicator_styler.dart'; |
|
|
|
import 'package:zhiying_base_widget/dialog/select_date_ym_dialog/select_date_ym_dialog.dart'; |
|
|
|
import 'package:zhiying_base_widget/widgets/empty/empty_widget.dart'; |
|
|
|
import 'package:zhiying_base_widget/widgets/wallet/wallet_detail/wallet_detail_bloc.dart'; |
|
|
|
import 'package:zhiying_base_widget/widgets/wallet_bil_detail/wallet_bil_detail_widget_bloc.dart'; |
|
|
|
import 'package:zhiying_comm/util/base_bloc.dart'; |
|
|
@@ -27,8 +26,7 @@ class WalletBilDetail extends StatefulWidget { |
|
|
|
_WalletBilDetailState createState() => _WalletBilDetailState(); |
|
|
|
} |
|
|
|
|
|
|
|
class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
with TickerProviderStateMixin, AutomaticKeepAliveClientMixin { |
|
|
|
class _WalletBilDetailState extends State<WalletBilDetail> with TickerProviderStateMixin, AutomaticKeepAliveClientMixin { |
|
|
|
WalletBilDetailWidgetBloc _bloc; |
|
|
|
|
|
|
|
TabController _tabController; |
|
|
@@ -37,8 +35,7 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
void initState() { |
|
|
|
_bloc = WalletBilDetailWidgetBloc(); |
|
|
|
_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.loadOutputData(_bloc.outPutCurrentPage, _bloc.outputShowDate); |
|
|
|
|
|
|
@@ -54,8 +51,7 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
children: <Widget>[ |
|
|
|
AppBar( |
|
|
|
brightness: Brightness.light, |
|
|
|
backgroundColor: |
|
|
|
HexColor.fromHex(_bloc.styleData.appBarBgColor), |
|
|
|
backgroundColor: HexColor.fromHex(_bloc.styleData.appBarBgColor), |
|
|
|
centerTitle: true, |
|
|
|
leading: IconButton( |
|
|
|
icon: Icon( |
|
|
@@ -68,10 +64,7 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
}), |
|
|
|
title: Text( |
|
|
|
_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( |
|
|
@@ -88,22 +81,15 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
controller: _tabController, |
|
|
|
tabs: _buildTabBarItem(), |
|
|
|
indicatorWeight: 9.5, |
|
|
|
labelStyle: |
|
|
|
TextStyle(fontSize: 15, fontWeight: FontWeight.bold), |
|
|
|
unselectedLabelStyle: |
|
|
|
TextStyle(fontSize: 15, fontWeight: FontWeight.bold), |
|
|
|
labelStyle: TextStyle(fontSize: 15, fontWeight: FontWeight.bold), |
|
|
|
unselectedLabelStyle: TextStyle(fontSize: 15, fontWeight: FontWeight.bold), |
|
|
|
labelColor: HexColor.fromHex(_bloc.styleData.tabSeletedColor), |
|
|
|
unselectedLabelColor: |
|
|
|
HexColor.fromHex(_bloc.styleData.tabNoSeletedColor), |
|
|
|
indicatorColor: |
|
|
|
HexColor.fromHex(_bloc.styleData.tabLineColor), |
|
|
|
unselectedLabelColor: HexColor.fromHex(_bloc.styleData.tabNoSeletedColor), |
|
|
|
indicatorColor: HexColor.fromHex(_bloc.styleData.tabLineColor), |
|
|
|
indicatorSize: TabBarIndicatorSize.label, |
|
|
|
), |
|
|
|
), |
|
|
|
Expanded( |
|
|
|
child: TabBarView( |
|
|
|
controller: _tabController, |
|
|
|
children: _buildTabViewPage())) |
|
|
|
Expanded(child: TabBarView(controller: _tabController, children: _buildTabViewPage())) |
|
|
|
], |
|
|
|
), |
|
|
|
)); |
|
|
@@ -139,14 +125,8 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
}, |
|
|
|
child: Padding( |
|
|
|
padding: const EdgeInsets.only(top: 8, bottom: 8), |
|
|
|
child: Text( |
|
|
|
tabList.type == "input" |
|
|
|
? _bloc.inputShowDate |
|
|
|
: _bloc.outputShowDate, |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 28.sp, |
|
|
|
color: HexColor.fromHex(_bloc.styleData.timeSelectColor), |
|
|
|
fontWeight: FontWeight.bold))), |
|
|
|
child: Text(tabList.type == "input" ? _bloc.inputShowDate : _bloc.outputShowDate, |
|
|
|
style: TextStyle(fontSize: 28.sp, color: HexColor.fromHex(_bloc.styleData.timeSelectColor), fontWeight: FontWeight.bold))), |
|
|
|
), |
|
|
|
Icon( |
|
|
|
Icons.arrow_drop_down, |
|
|
@@ -166,15 +146,11 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
if (tabList.type == 'input') { |
|
|
|
_bloc.inputSelectType = tabViewBtns[index].type; |
|
|
|
_bloc.inPutCurrentPage = 1; |
|
|
|
_bloc.loadInputData( |
|
|
|
_bloc.inPutCurrentPage, _bloc.inputShowDate, |
|
|
|
type: _bloc.inputSelectType); |
|
|
|
_bloc.loadInputData(_bloc.inPutCurrentPage, _bloc.inputShowDate, type: _bloc.inputSelectType); |
|
|
|
} else { |
|
|
|
_bloc.outputSelectType = tabViewBtns[index].type; |
|
|
|
_bloc.outPutCurrentPage = 1; |
|
|
|
_bloc.loadOutputData( |
|
|
|
_bloc.outPutCurrentPage, _bloc.outputShowDate, |
|
|
|
type: _bloc.outputSelectType); |
|
|
|
_bloc.loadOutputData(_bloc.outPutCurrentPage, _bloc.outputShowDate, type: _bloc.outputSelectType); |
|
|
|
} |
|
|
|
_bloc.refresh(); |
|
|
|
}, |
|
|
@@ -182,24 +158,16 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
child: Container( |
|
|
|
alignment: Alignment.center, |
|
|
|
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( |
|
|
|
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)), |
|
|
|
child: Text( |
|
|
|
tabViewBtns[index].name ?? "", |
|
|
|
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)), |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
@@ -210,11 +178,9 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
} |
|
|
|
|
|
|
|
_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) { |
|
|
|
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") { |
|
|
|
_bloc.inputShowDate = dataTime; |
|
|
|
_bloc.loadInputData(_bloc.inPutCurrentPage, _bloc.inputShowDate); |
|
|
@@ -229,9 +195,7 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
_buildBottomItem(TabList tabList) { |
|
|
|
return ListView.builder( |
|
|
|
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) { |
|
|
|
return _buildItem(context, index, tabList); |
|
|
|
}); |
|
|
@@ -243,11 +207,8 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
var modelItem = _bloc.inputDataVM[index]; |
|
|
|
return Container( |
|
|
|
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), |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: HexColor.fromHex("#FFFFFF"), |
|
|
|
borderRadius: BorderRadius.circular(8)), |
|
|
|
padding: EdgeInsets.only(left: 25.w, right: 25.w, top: 20.h, bottom: 20.h), |
|
|
|
decoration: BoxDecoration(color: HexColor.fromHex("#FFFFFF"), borderRadius: BorderRadius.circular(8)), |
|
|
|
child: Column( |
|
|
|
children: <Widget>[ |
|
|
|
Row( |
|
|
@@ -257,21 +218,13 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
children: <Widget>[ |
|
|
|
Container( |
|
|
|
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( |
|
|
|
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: Text( |
|
|
|
modelItem['type'] ?? "", |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex( |
|
|
|
inputItemStyle.typeNameColor), |
|
|
|
fontSize: 20.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(inputItemStyle.typeNameColor), fontSize: 20.sp), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
@@ -291,16 +244,11 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
"+ ", |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex(inputItemStyle.amountColor)), |
|
|
|
style: TextStyle(color: HexColor.fromHex(inputItemStyle.amountColor)), |
|
|
|
), |
|
|
|
Text( |
|
|
|
"¥ " + 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: 30.sp, fontFamily: 'Din', package: 'zhiying_base_widget'), |
|
|
|
) |
|
|
|
], |
|
|
|
) |
|
|
@@ -315,44 +263,33 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
inputItemStyle.orderIdText, |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex(inputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(inputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
width: 4, |
|
|
|
), |
|
|
|
Text( |
|
|
|
modelItem['order_id'], |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex(inputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(inputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
width: 28.w, |
|
|
|
), |
|
|
|
GestureDetector( |
|
|
|
onTap: () { |
|
|
|
Clipboard.setData( |
|
|
|
ClipboardData(text: modelItem['order_id'])); |
|
|
|
Clipboard.setData(ClipboardData(text: modelItem['order_id'])); |
|
|
|
Fluttertoast.showToast(msg: "已复制"); |
|
|
|
}, |
|
|
|
child: Container( |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.circular(4), |
|
|
|
color: HexColor.fromHex(inputItemStyle.copyBtnBgColor), |
|
|
|
border: Border.all( |
|
|
|
color: |
|
|
|
HexColor.fromHex(inputItemStyle.contentColor))), |
|
|
|
border: Border.all(color: HexColor.fromHex(inputItemStyle.contentColor), width: 0.5)), |
|
|
|
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( |
|
|
|
inputItemStyle.copyBtnText, |
|
|
|
style: TextStyle( |
|
|
|
color: |
|
|
|
HexColor.fromHex(inputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(inputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
@@ -369,18 +306,14 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
inputItemStyle.orderTypeText, |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex(inputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(inputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
width: 4, |
|
|
|
), |
|
|
|
Text( |
|
|
|
modelItem['order_type'] ?? "", |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex("#FF999999"), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex("#FF999999"), fontSize: 22.sp), |
|
|
|
), |
|
|
|
], |
|
|
|
)), |
|
|
@@ -389,9 +322,7 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
inputItemStyle.amountText + " ¥" + modelItem['amount'], |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex(inputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(inputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
], |
|
|
|
)) |
|
|
@@ -407,18 +338,14 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
inputItemStyle.timeText, |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex(inputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(inputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
width: 4, |
|
|
|
), |
|
|
|
Text( |
|
|
|
modelItem['time'] ?? "", |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex("#FF999999"), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex("#FF999999"), fontSize: 22.sp), |
|
|
|
), |
|
|
|
], |
|
|
|
)), |
|
|
@@ -426,13 +353,8 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
child: Row( |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
inputItemStyle.settleTimeText + |
|
|
|
" " + |
|
|
|
modelItem['settle_time'] ?? |
|
|
|
"", |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex(inputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
inputItemStyle.settleTimeText + " " + modelItem['settle_time'] ?? "", |
|
|
|
style: TextStyle(color: HexColor.fromHex(inputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
], |
|
|
|
)) |
|
|
@@ -448,11 +370,8 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
///消费返回的Item |
|
|
|
return Container( |
|
|
|
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), |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: HexColor.fromHex("#FFFFFF"), |
|
|
|
borderRadius: BorderRadius.circular(8)), |
|
|
|
padding: EdgeInsets.only(left: 25.w, right: 25.w, top: 20.h, bottom: 20.h), |
|
|
|
decoration: BoxDecoration(color: HexColor.fromHex("#FFFFFF"), borderRadius: BorderRadius.circular(8)), |
|
|
|
child: Column( |
|
|
|
children: <Widget>[ |
|
|
|
Row( |
|
|
@@ -464,19 +383,13 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.circular(4), |
|
|
|
color: HexColor.fromHex("#FFFFF3F3"), |
|
|
|
border: Border.all( |
|
|
|
color: HexColor.fromHex( |
|
|
|
outputItemStyle.typeNameColor))), |
|
|
|
border: Border.all(color: HexColor.fromHex(outputItemStyle.typeNameColor))), |
|
|
|
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: Text( |
|
|
|
modelItem['type'] ?? "", |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex( |
|
|
|
outputItemStyle.typeNameColor), |
|
|
|
fontSize: 20.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.typeNameColor), fontSize: 20.sp), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
@@ -496,16 +409,11 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
"- ", |
|
|
|
style: TextStyle( |
|
|
|
color: |
|
|
|
HexColor.fromHex(outputItemStyle.amountColor)), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.amountColor)), |
|
|
|
), |
|
|
|
Text( |
|
|
|
"¥ " + modelItem['amount'], |
|
|
|
style: TextStyle( |
|
|
|
color: |
|
|
|
HexColor.fromHex(outputItemStyle.amountColor), |
|
|
|
fontSize: 30.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.amountColor), fontSize: 30.sp), |
|
|
|
) |
|
|
|
], |
|
|
|
) |
|
|
@@ -520,45 +428,33 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
outputItemStyle.orderIdText, |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex(outputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
width: 4, |
|
|
|
), |
|
|
|
Text( |
|
|
|
modelItem['order_id'], |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex(outputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
width: 28.w, |
|
|
|
), |
|
|
|
GestureDetector( |
|
|
|
onTap: () { |
|
|
|
Clipboard.setData( |
|
|
|
ClipboardData(text: modelItem['order_id'])); |
|
|
|
Clipboard.setData(ClipboardData(text: modelItem['order_id'])); |
|
|
|
Fluttertoast.showToast(msg: "已复制"); |
|
|
|
}, |
|
|
|
child: Container( |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.circular(4), |
|
|
|
color: |
|
|
|
HexColor.fromHex(outputItemStyle.copyBtnBgColor), |
|
|
|
border: Border.all( |
|
|
|
color: HexColor.fromHex( |
|
|
|
outputItemStyle.contentColor))), |
|
|
|
color: HexColor.fromHex(outputItemStyle.copyBtnBgColor), |
|
|
|
border: Border.all(color: HexColor.fromHex(outputItemStyle.contentColor),width: 0.5)), |
|
|
|
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( |
|
|
|
outputItemStyle.copyBtnText ?? "", |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex( |
|
|
|
outputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
@@ -575,19 +471,14 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
outputItemStyle.consumeOrderTypeText, |
|
|
|
style: TextStyle( |
|
|
|
color: |
|
|
|
HexColor.fromHex(outputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
width: 4, |
|
|
|
), |
|
|
|
Text( |
|
|
|
modelItem['order_type'] ?? "", |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex("#FF999999"), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex("#FF999999"), fontSize: 22.sp), |
|
|
|
), |
|
|
|
], |
|
|
|
)), |
|
|
@@ -595,13 +486,8 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
child: Row( |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
outputItemStyle.consumeAmountText + |
|
|
|
" ¥" + |
|
|
|
modelItem['amount'], |
|
|
|
style: TextStyle( |
|
|
|
color: |
|
|
|
HexColor.fromHex(outputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
outputItemStyle.consumeAmountText + " ¥" + modelItem['amount'], |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
], |
|
|
|
)) |
|
|
@@ -617,19 +503,14 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
outputItemStyle.consumeTimeText, |
|
|
|
style: TextStyle( |
|
|
|
color: |
|
|
|
HexColor.fromHex(outputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
width: 4, |
|
|
|
), |
|
|
|
Text( |
|
|
|
modelItem['time'] ?? "", |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex("#FF999999"), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex("#FF999999"), fontSize: 22.sp), |
|
|
|
), |
|
|
|
], |
|
|
|
)), |
|
|
@@ -655,11 +536,8 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
} else if (modelItem['type'] == '提现') { |
|
|
|
return Container( |
|
|
|
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), |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: HexColor.fromHex("#FFFFFF"), |
|
|
|
borderRadius: BorderRadius.circular(8)), |
|
|
|
padding: EdgeInsets.only(left: 25.w, right: 25.w, top: 20.h, bottom: 20.h), |
|
|
|
decoration: BoxDecoration(color: HexColor.fromHex("#FFFFFF"), borderRadius: BorderRadius.circular(8)), |
|
|
|
child: Column( |
|
|
|
children: <Widget>[ |
|
|
|
Row( |
|
|
@@ -671,19 +549,13 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.circular(4), |
|
|
|
color: HexColor.fromHex("#FFFFF3F3"), |
|
|
|
border: Border.all( |
|
|
|
color: HexColor.fromHex( |
|
|
|
outputItemStyle.typeNameColor))), |
|
|
|
border: Border.all(color: HexColor.fromHex(outputItemStyle.typeNameColor))), |
|
|
|
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: Text( |
|
|
|
modelItem['type'] ?? "", |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex( |
|
|
|
outputItemStyle.typeNameColor), |
|
|
|
fontSize: 20.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.typeNameColor), fontSize: 20.sp), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
@@ -703,16 +575,11 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
"- ", |
|
|
|
style: TextStyle( |
|
|
|
color: |
|
|
|
HexColor.fromHex(outputItemStyle.amountColor)), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.amountColor)), |
|
|
|
), |
|
|
|
Text( |
|
|
|
"¥ " + modelItem['amount'], |
|
|
|
style: TextStyle( |
|
|
|
color: |
|
|
|
HexColor.fromHex(outputItemStyle.amountColor), |
|
|
|
fontSize: 30.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.amountColor), fontSize: 30.sp), |
|
|
|
) |
|
|
|
], |
|
|
|
) |
|
|
@@ -727,45 +594,33 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
outputItemStyle.orderIdText, |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex(outputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
width: 4, |
|
|
|
), |
|
|
|
Text( |
|
|
|
modelItem['order_id'], |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex(outputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
width: 28.w, |
|
|
|
), |
|
|
|
GestureDetector( |
|
|
|
onTap: () { |
|
|
|
Clipboard.setData( |
|
|
|
ClipboardData(text: modelItem['order_id'])); |
|
|
|
Clipboard.setData(ClipboardData(text: modelItem['order_id'])); |
|
|
|
Fluttertoast.showToast(msg: "已复制"); |
|
|
|
}, |
|
|
|
child: Container( |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.circular(4), |
|
|
|
color: |
|
|
|
HexColor.fromHex(outputItemStyle.copyBtnBgColor), |
|
|
|
border: Border.all( |
|
|
|
color: HexColor.fromHex( |
|
|
|
outputItemStyle.contentColor))), |
|
|
|
color: HexColor.fromHex(outputItemStyle.copyBtnBgColor), |
|
|
|
border: Border.all(color: HexColor.fromHex(outputItemStyle.contentColor), width: 0.5)), |
|
|
|
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( |
|
|
|
outputItemStyle.copyBtnText ?? "", |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex( |
|
|
|
outputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
@@ -782,20 +637,14 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
outputItemStyle.withdrawAccountText, |
|
|
|
style: TextStyle( |
|
|
|
color: |
|
|
|
HexColor.fromHex(outputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
width: 4, |
|
|
|
), |
|
|
|
Text( |
|
|
|
modelItem['account'] ?? "", |
|
|
|
style: TextStyle( |
|
|
|
color: |
|
|
|
HexColor.fromHex(outputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
], |
|
|
|
)), |
|
|
@@ -803,21 +652,14 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
child: Row( |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
outputItemStyle.withdrawAmountText + |
|
|
|
" ¥" + |
|
|
|
modelItem['amount'], |
|
|
|
style: TextStyle( |
|
|
|
color: |
|
|
|
HexColor.fromHex(outputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
outputItemStyle.withdrawAmountText + " ¥" + modelItem['amount'], |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
], |
|
|
|
)) |
|
|
|
], |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
height: 4, |
|
|
|
), |
|
|
|
SizedBox(height: 4), |
|
|
|
Row( |
|
|
|
children: <Widget>[ |
|
|
|
Expanded( |
|
|
@@ -825,19 +667,14 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
outputItemStyle.withdrawTimeText, |
|
|
|
style: TextStyle( |
|
|
|
color: |
|
|
|
HexColor.fromHex(outputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
width: 4, |
|
|
|
), |
|
|
|
Text( |
|
|
|
modelItem['time'] ?? "", |
|
|
|
style: TextStyle( |
|
|
|
color: HexColor.fromHex("#FF999999"), |
|
|
|
fontSize: 22.sp), |
|
|
|
style: TextStyle(color: HexColor.fromHex("#FF999999"), fontSize: 22.sp), |
|
|
|
), |
|
|
|
], |
|
|
|
)), |
|
|
@@ -845,14 +682,8 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
child: Row( |
|
|
|
children: <Widget>[ |
|
|
|
Text( |
|
|
|
outputItemStyle.withdrawOrderStatusText + |
|
|
|
" " + |
|
|
|
modelItem['order_status'] ?? |
|
|
|
"", |
|
|
|
style: TextStyle( |
|
|
|
color: |
|
|
|
HexColor.fromHex(outputItemStyle.contentColor), |
|
|
|
fontSize: 22.sp), |
|
|
|
outputItemStyle.withdrawOrderStatusText + " " + modelItem['order_status'] ?? "", |
|
|
|
style: TextStyle(color: HexColor.fromHex(outputItemStyle.contentColor), fontSize: 22.sp), |
|
|
|
), |
|
|
|
], |
|
|
|
)) |
|
|
@@ -891,10 +722,7 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
onRefresh: () { |
|
|
|
_bloc.inputRefresh(); |
|
|
|
}, |
|
|
|
child: _bloc.inputDataVM == null || |
|
|
|
_bloc.inputDataVM.length == 0 |
|
|
|
? EmptyWidget() |
|
|
|
: _buildBottomItem(item)), |
|
|
|
child: EmptyUtil.isEmpty(_bloc.inputDataVM ) ? EmptyWidget() : _buildBottomItem(item)), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
@@ -922,10 +750,7 @@ class _WalletBilDetailState extends State<WalletBilDetail> |
|
|
|
onRefresh: () { |
|
|
|
_bloc.outputRefresh(); |
|
|
|
}, |
|
|
|
child: _bloc.outputDataVM == null || |
|
|
|
_bloc.outputDataVM.length == 0 |
|
|
|
? EmptyWidget() |
|
|
|
: _buildBottomItem(item)), |
|
|
|
child: EmptyUtil.isEmpty(_bloc.outputDataVM) ? EmptyWidget() : _buildBottomItem(item)), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|