After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 628 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 213 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 788 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 396 B |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 475 B |
After Width: | Height: | Size: 540 B |
After Width: | Height: | Size: 573 B |
After Width: | Height: | Size: 631 B |
After Width: | Height: | Size: 296 B |
After Width: | Height: | Size: 529 B |
After Width: | Height: | Size: 160 B |
After Width: | Height: | Size: 718 B |
After Width: | Height: | Size: 757 B |
After Width: | Height: | Size: 356 B |
After Width: | Height: | Size: 780 B |
After Width: | Height: | Size: 612 B |
After Width: | Height: | Size: 580 B |
After Width: | Height: | Size: 638 B |
@ -0,0 +1,149 @@
|
||||
import 'package:flutter/cupertino.dart'; |
||||
import 'package:flutter/material.dart'; |
||||
import 'package:huixiang/generated/l10n.dart'; |
||||
import 'package:huixiang/view_widget/coupon_widget.dart'; |
||||
import 'package:huixiang/view_widget/item_title.dart'; |
||||
import 'package:huixiang/view_widget/my_tab.dart'; |
||||
import 'package:pull_to_refresh/pull_to_refresh.dart'; |
||||
|
||||
class RollCenterPage extends StatefulWidget { |
||||
@override |
||||
State<StatefulWidget> createState() { |
||||
return _RollCenterPage(); |
||||
} |
||||
} |
||||
|
||||
class _RollCenterPage extends State<RollCenterPage> |
||||
with SingleTickerProviderStateMixin { |
||||
|
||||
RefreshController _refreshController; |
||||
|
||||
@override |
||||
void initState() { |
||||
super.initState(); |
||||
tabController = TabController(length: 3, vsync: this); |
||||
_refreshController = RefreshController(initialRefresh: false); |
||||
} |
||||
|
||||
List<String> items = ["1", "2", "3", "4", "5", "6", "7", "8"]; |
||||
|
||||
void _onRefresh() async { |
||||
// monitor network fetch |
||||
await Future.delayed(Duration(milliseconds: 1000)); |
||||
// if failed,use refreshFailed() |
||||
_refreshController.refreshCompleted(); |
||||
} |
||||
|
||||
void _onLoading() async { |
||||
// monitor network fetch |
||||
await Future.delayed(Duration(milliseconds: 1000)); |
||||
// if failed,use loadFailed(),if no data return,use LoadNodata() |
||||
items.add((items.length + 1).toString()); |
||||
if (mounted) setState(() {}); |
||||
_refreshController.loadComplete(); |
||||
} |
||||
|
||||
TabController tabController; |
||||
|
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return DefaultTabController( |
||||
length: 3, |
||||
child: Scaffold( |
||||
appBar: AppBar( |
||||
title: Text( |
||||
"领卷中心", |
||||
style: TextStyle( |
||||
color: Colors.black, |
||||
fontWeight: FontWeight.bold, |
||||
), |
||||
), |
||||
centerTitle: false, |
||||
backgroundColor: Color(0xFFF7F7F7), |
||||
elevation: 0, |
||||
leading: GestureDetector( |
||||
onTap: () { |
||||
Navigator.of(context).pop(); |
||||
}, |
||||
child: Container( |
||||
alignment: Alignment.centerRight, |
||||
margin: EdgeInsets.only(left: 10), |
||||
padding: EdgeInsets.all(6), |
||||
child: Icon( |
||||
Icons.arrow_back_ios, |
||||
color: Colors.black, |
||||
size: 24, |
||||
), |
||||
), |
||||
), |
||||
titleSpacing: 2, |
||||
leadingWidth: 56, |
||||
), |
||||
body: Container( |
||||
child: Column( |
||||
children: [ |
||||
ItemTitle( |
||||
text: S |
||||
.of(context) |
||||
.keyongyouhuiquan, |
||||
imgPath: "assets/image/icon_card_coupon.png", |
||||
moreText: S |
||||
.of(context) |
||||
.chakanshixiaoquan, |
||||
onTap: () { |
||||
Navigator.of(context).pushNamed( |
||||
'/router/mine_card_invalid'); |
||||
}, |
||||
), |
||||
Expanded( |
||||
flex: 1, |
||||
child: Container( |
||||
child: SmartRefresher( |
||||
enablePullDown: true, |
||||
enablePullUp: true, |
||||
header: ClassicHeader(), |
||||
footer: CustomFooter( |
||||
builder: (context, mode) { |
||||
Widget body; |
||||
if (mode == LoadStatus.idle) { |
||||
body = Text("pull up load"); |
||||
} else if (mode == LoadStatus.loading) { |
||||
body = CupertinoActivityIndicator(); |
||||
} else if (mode == LoadStatus.failed) { |
||||
body = Text("Load Failed!Click retry!"); |
||||
} else if (mode == LoadStatus.canLoading) { |
||||
body = Text("release to load more"); |
||||
} else { |
||||
body = Text(S |
||||
.of(context) |
||||
.meiyougengduoyouhuiquan); |
||||
} |
||||
return Container( |
||||
height: 55.0, |
||||
child: Center(child: body), |
||||
); |
||||
}, |
||||
), |
||||
controller: _refreshController, |
||||
onRefresh: _onRefresh, |
||||
onLoading: _onLoading, |
||||
child: ListView.builder( |
||||
itemBuilder: (c, i) { |
||||
return CouponWidget(true, true, () { |
||||
tabController.index = 1; |
||||
}); |
||||
}, |
||||
itemCount: items.length, |
||||
), |
||||
), |
||||
), |
||||
) |
||||
], |
||||
), |
||||
), |
||||
), |
||||
); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,232 @@
|
||||
import 'package:flutter/cupertino.dart'; |
||||
import 'package:flutter/material.dart'; |
||||
import 'package:huixiang/generated/l10n.dart'; |
||||
import 'package:huixiang/view_widget/round_button.dart'; |
||||
|
||||
class LogisticsInformationPage extends StatefulWidget { |
||||
@override |
||||
State<StatefulWidget> createState() { |
||||
return _LogisticsInformationPage(); |
||||
} |
||||
} |
||||
|
||||
class _LogisticsInformationPage extends State<LogisticsInformationPage> { |
||||
var controller = new ScrollController(); |
||||
|
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return Scaffold( |
||||
appBar: AppBar( |
||||
backgroundColor: Color(0xFFF7F7F7), |
||||
elevation: 0, |
||||
centerTitle: false, |
||||
leading: GestureDetector( |
||||
onTap: () { |
||||
Navigator.of(context).pop(); |
||||
}, |
||||
child: Container( |
||||
alignment: Alignment.centerRight, |
||||
margin: EdgeInsets.only(left: 10), |
||||
padding: EdgeInsets.all(6), |
||||
child: Icon( |
||||
Icons.arrow_back_ios, |
||||
color: Colors.black, |
||||
size: 24, |
||||
), |
||||
), |
||||
), |
||||
titleSpacing: 2, |
||||
leadingWidth: 56, |
||||
title: Text( |
||||
S.of(context).wuliuxinxi, |
||||
style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold), |
||||
), |
||||
), |
||||
body: Container( |
||||
child: SingleChildScrollView( |
||||
physics: BouncingScrollPhysics(), |
||||
child: Column( |
||||
children: [ |
||||
_orderInformation(), |
||||
SizedBox( |
||||
height: 16, |
||||
), |
||||
Container( |
||||
alignment: Alignment.bottomCenter, |
||||
margin: EdgeInsets.only(left: 16,right: 16), |
||||
padding: EdgeInsets.all(16), |
||||
decoration: BoxDecoration( |
||||
color: Colors.white, |
||||
borderRadius: BorderRadius.only( |
||||
topLeft: Radius.circular(8), |
||||
bottomLeft: Radius.circular(4), |
||||
topRight: Radius.circular(8), |
||||
bottomRight: Radius.circular(4), |
||||
), |
||||
boxShadow: [ |
||||
BoxShadow( |
||||
color: Colors.black.withAlpha(12), |
||||
offset: Offset(0, 2), |
||||
blurRadius: 14, |
||||
spreadRadius: 0) |
||||
], |
||||
), |
||||
child: Column( |
||||
mainAxisAlignment: MainAxisAlignment.spaceAround, |
||||
crossAxisAlignment: CrossAxisAlignment.start, |
||||
children: [ |
||||
Text("订单跟踪",style: TextStyle(fontSize:16,fontWeight: FontWeight.bold,color: Color(0xff353535)),), |
||||
SizedBox( |
||||
height: 32, |
||||
), |
||||
Row( |
||||
children: [ |
||||
], |
||||
), |
||||
], |
||||
), |
||||
), |
||||
], |
||||
), |
||||
), |
||||
), |
||||
); |
||||
} |
||||
|
||||
Widget _orderInformation() { |
||||
return Container( |
||||
margin: EdgeInsets.only(left: 16,right: 16), |
||||
padding: EdgeInsets.all(16), |
||||
decoration: BoxDecoration( |
||||
color: Colors.white, |
||||
borderRadius: BorderRadius.circular(4), |
||||
boxShadow: [ |
||||
BoxShadow( |
||||
color: Colors.black.withAlpha(12), |
||||
offset: Offset(0, 2), |
||||
blurRadius: 14, |
||||
spreadRadius: 0) |
||||
], |
||||
), |
||||
child: Column( |
||||
children: [ |
||||
Row( |
||||
mainAxisAlignment: MainAxisAlignment.start, |
||||
crossAxisAlignment: CrossAxisAlignment.start, |
||||
children: [ |
||||
Stack( |
||||
children: [ |
||||
Image.network( |
||||
"https://t7.baidu.com/it/u=810585695,3039658333&fm=193&f=GIF", |
||||
width: 95, |
||||
height: 95, |
||||
fit: BoxFit.cover, |
||||
), |
||||
Container( |
||||
padding: EdgeInsets.only(left: 31,right: 31,top: 5,bottom:5), |
||||
alignment: Alignment.bottomCenter, |
||||
decoration:BoxDecoration( |
||||
borderRadius: BorderRadius.only( |
||||
topLeft: Radius.circular(0), |
||||
bottomLeft: Radius.circular(4), |
||||
topRight: Radius.circular(0), |
||||
bottomRight: Radius.circular(4), |
||||
), |
||||
color: Color(0x53000000), |
||||
), |
||||
child:Text( |
||||
"共3件", |
||||
style:TextStyle( |
||||
fontSize: 12, |
||||
color: Colors.white, |
||||
), |
||||
), |
||||
), |
||||
], |
||||
), |
||||
SizedBox( |
||||
width: 12, |
||||
), |
||||
Expanded( |
||||
flex: 1, |
||||
child: Container( |
||||
height: 95, |
||||
child: Column( |
||||
mainAxisAlignment: MainAxisAlignment.spaceAround, |
||||
crossAxisAlignment: CrossAxisAlignment.start, |
||||
children: [ |
||||
Row( |
||||
children: [ |
||||
Text( |
||||
"物流状态:", |
||||
style: TextStyle( |
||||
color: Color(0xff353535), |
||||
fontSize: 14, |
||||
), |
||||
), |
||||
Text( |
||||
"已发货", |
||||
style: TextStyle( |
||||
color: Color(0xFF32A060), |
||||
fontSize: 14, |
||||
fontWeight: FontWeight.bold |
||||
), |
||||
) |
||||
], |
||||
), |
||||
SizedBox( |
||||
height: 8, |
||||
), |
||||
Row( |
||||
children: [ |
||||
Text( |
||||
"物流公司:", |
||||
style: TextStyle( |
||||
color: Color(0xff353535), |
||||
fontSize: 14, |
||||
), |
||||
), |
||||
Text( |
||||
"圆通快递", |
||||
style: TextStyle( |
||||
color: Colors.black, |
||||
fontSize: 14, |
||||
), |
||||
) |
||||
], |
||||
), |
||||
SizedBox( |
||||
height: 8, |
||||
), |
||||
Row( |
||||
children: [ |
||||
Text( |
||||
"物流单号:", |
||||
style: TextStyle( |
||||
color: Color(0xff353535), |
||||
fontSize: 14, |
||||
), |
||||
), |
||||
Text( |
||||
"1234567890412", |
||||
style: TextStyle( |
||||
color: Colors.black, |
||||
fontSize: 14, |
||||
), |
||||
) |
||||
], |
||||
), |
||||
], |
||||
), |
||||
), |
||||
) |
||||
], |
||||
), |
||||
], |
||||
), |
||||
); |
||||
} |
||||
|
||||
|
||||
|
||||
} |