You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
236 lines
6.7 KiB
236 lines
6.7 KiB
import 'package:flutter/material.dart'; |
|
import 'package:huixiang/retrofit/retrofit_api.dart'; |
|
import 'package:huixiang/utils/font_weight.dart'; |
|
import 'package:huixiang/view_widget/my_appbar.dart'; |
|
import 'package:pull_to_refresh/pull_to_refresh.dart'; |
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import '../../view_widget/classic_header.dart'; |
|
import '../../view_widget/my_footer.dart'; |
|
|
|
class FlowPage extends StatefulWidget { |
|
@override |
|
State<StatefulWidget> createState() { |
|
return _FlowPage(); |
|
} |
|
} |
|
|
|
class _FlowPage extends State<FlowPage> { |
|
ApiService apiService; |
|
final RefreshController refreshController = RefreshController(); |
|
var isShowMore = false; |
|
|
|
@override |
|
void initState() { |
|
super.initState(); |
|
} |
|
|
|
@override |
|
Widget build(BuildContext context) { |
|
return |
|
Scaffold( |
|
backgroundColor: Color(0xFFF8F8FA), |
|
appBar: MyAppBar( |
|
title: "海峡姐妹茶", |
|
titleColor: Colors.black, |
|
background: Colors.white, |
|
leadingColor: Colors.black, |
|
brightness: Brightness.dark, |
|
), |
|
body: SmartRefresher( |
|
controller: refreshController, |
|
enablePullDown: true, |
|
enablePullUp: false, |
|
header: MyHeader( |
|
color: Colors.white, |
|
), |
|
footer: CustomFooter( |
|
builder: (context, mode) { |
|
return MyFooter(mode); |
|
}, |
|
), |
|
onRefresh: () { |
|
}, |
|
physics: BouncingScrollPhysics(), |
|
scrollController: ScrollController(), |
|
child: SingleChildScrollView( |
|
physics: BouncingScrollPhysics(), |
|
child:Container( |
|
margin: EdgeInsets.only(top: 24.h,left: 16.w,right: 16.w), |
|
child:Column( |
|
children: [ |
|
Row( |
|
children: [ |
|
Text( |
|
"2023年6月", |
|
style: TextStyle( |
|
fontSize: 15.sp, |
|
fontWeight: MyFontWeight.semi_bold, |
|
color: Color(0xFF0D0D0D), |
|
), |
|
), |
|
Icon( |
|
Icons.keyboard_arrow_down, |
|
color: Color(0xFF0D0D0D), |
|
size: 24, |
|
), |
|
], |
|
), |
|
SizedBox(height: 16.h,), |
|
ListView.builder( |
|
padding: EdgeInsets.zero, |
|
itemCount:5, |
|
scrollDirection: Axis.vertical, |
|
shrinkWrap: true, |
|
physics: BouncingScrollPhysics(), |
|
itemBuilder: (context, position) { |
|
return GestureDetector( |
|
onTap: () { |
|
}, |
|
child: billItem(), |
|
); |
|
}, |
|
) |
|
], |
|
), |
|
), |
|
), |
|
), |
|
); |
|
} |
|
|
|
///月份账单大概 |
|
Widget billItem(){ |
|
return Container( |
|
padding: EdgeInsets.all(12.h), |
|
margin: EdgeInsets.only(bottom:12.h), |
|
decoration: BoxDecoration( |
|
color: Colors.white, |
|
borderRadius: BorderRadius.circular(8.w), |
|
), |
|
child:Column( |
|
children: [ |
|
GestureDetector( |
|
onTap: (){ |
|
setState((){ |
|
isShowMore = !isShowMore; |
|
}); |
|
}, |
|
child: Row( |
|
children: [ |
|
Expanded(child: Text( |
|
"06/10", |
|
style: TextStyle( |
|
fontSize: 18.sp, |
|
fontWeight: MyFontWeight.medium, |
|
color: Color(0xFF0D0D0D), |
|
), |
|
)), |
|
Icon( |
|
isShowMore ? Icons.keyboard_arrow_up :Icons.keyboard_arrow_down, |
|
color: Color(0xFF0D0D0D), |
|
size: 24, |
|
), |
|
], |
|
), |
|
), |
|
SizedBox(height:15.h,), |
|
Row( |
|
children: [ |
|
Expanded(child: Text( |
|
"交易金额 76555.22元", |
|
style: TextStyle( |
|
fontSize: 12.sp, |
|
fontWeight: MyFontWeight.regular, |
|
color: Color(0xFF1A1A1A), |
|
), |
|
)), |
|
Text( |
|
"共76笔", |
|
style: TextStyle( |
|
fontSize: 12.sp, |
|
fontWeight: MyFontWeight.regular, |
|
color: Color(0xFF1A1A1A), |
|
), |
|
) |
|
], |
|
), |
|
SizedBox(height:20.h,), |
|
if(isShowMore) |
|
ListView.builder( |
|
padding: EdgeInsets.zero, |
|
itemCount:5, |
|
scrollDirection: Axis.vertical, |
|
shrinkWrap: true, |
|
physics: BouncingScrollPhysics(), |
|
itemBuilder: (context, position) { |
|
return GestureDetector( |
|
onTap: () { |
|
|
|
}, |
|
child: billIDetailsItem(), |
|
); |
|
}, |
|
) |
|
], |
|
), |
|
); |
|
} |
|
|
|
///月份账单明细 |
|
Widget billIDetailsItem(){ |
|
return Container( |
|
margin: EdgeInsets.only(bottom:20.h), |
|
child: Row( |
|
children: [ |
|
Expanded(child: |
|
Column( |
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
children: [ |
|
Padding(padding:EdgeInsets.only(bottom:15.h), |
|
child:Text( |
|
"11:20:12", |
|
style: TextStyle( |
|
fontSize: 14.sp, |
|
fontWeight: MyFontWeight.regular, |
|
color: Color(0xFF1A1A1A), |
|
), |
|
),), |
|
Text( |
|
"JJJJ", |
|
style: TextStyle( |
|
fontSize: 14.sp, |
|
fontWeight: MyFontWeight.regular, |
|
color: Color(0xFF1A1A1A), |
|
), |
|
), |
|
], |
|
),), |
|
Text.rich( |
|
TextSpan( |
|
children: [ |
|
TextSpan( |
|
text:"+", |
|
style: TextStyle( |
|
fontSize: 18.sp, |
|
fontWeight: MyFontWeight.medium, |
|
color: Color(0xFF0D0D0D), |
|
), |
|
), |
|
TextSpan( |
|
text: "22.33", |
|
style: TextStyle( |
|
fontSize: 18.sp, |
|
fontWeight: MyFontWeight.medium, |
|
color: Color(0xFF0D0D0D), |
|
), |
|
), |
|
], |
|
), |
|
), |
|
], |
|
) |
|
); |
|
} |
|
|
|
}
|
|
|