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.
80 lines
2.4 KiB
80 lines
2.4 KiB
import 'package:flutter/material.dart'; |
|
import 'package:huixiang/business_system/home/overview/trade_goods.dart'; |
|
import 'package:huixiang/business_system/home/overview/trade_order.dart'; |
|
import 'package:huixiang/business_system/home/overview/trade_summary.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 '../../../generated/l10n.dart'; |
|
import '../../../view_widget/my_tab.dart'; |
|
|
|
class TradeOverviewPage extends StatefulWidget { |
|
final arguments; |
|
|
|
TradeOverviewPage({this.arguments}); |
|
|
|
@override |
|
State<StatefulWidget> createState() { |
|
return _TradeOverviewPage(); |
|
} |
|
} |
|
|
|
class _TradeOverviewPage extends State<TradeOverviewPage> with SingleTickerProviderStateMixin{ |
|
final RefreshController refreshController = RefreshController(); |
|
String storeId; |
|
|
|
@override |
|
void initState() { |
|
super.initState(); |
|
storeId = widget?.arguments["storeId"] ??""; |
|
} |
|
|
|
@override |
|
Widget build(BuildContext context) { |
|
return DefaultTabController( |
|
length: 3, |
|
child: Scaffold( |
|
appBar: MyAppBar( |
|
title:"", |
|
titleColor: Colors.black, |
|
background: Colors.white, |
|
leadingColor: Colors.black, |
|
toolbarHeight: kToolbarHeight + MediaQuery.of(context).padding.top, |
|
bottom: TabBar( |
|
// isScrollable: true, //可滚动 |
|
overlayColor: MaterialStateProperty.all(Colors.white), |
|
indicatorColor: Color(0xFF30415B), |
|
labelColor: Colors.black, |
|
labelStyle: TextStyle( |
|
fontSize: 15.sp, |
|
fontWeight: FontWeight.bold, |
|
), |
|
unselectedLabelStyle: TextStyle( |
|
fontSize: 15.sp, |
|
fontWeight: FontWeight.normal, |
|
color: Color(0xFF666666) |
|
), |
|
// controller: tabController, |
|
//未选中文字颜色 |
|
unselectedLabelColor: Color(0xffA29E9E), |
|
indicatorSize: TabBarIndicatorSize.label, |
|
//指示器与文字等宽 |
|
tabs: <Widget>[ |
|
MyTab(text:"总览"), |
|
MyTab(text: S.of(context).dingdan), |
|
MyTab(text: "商品"), |
|
], |
|
), |
|
), |
|
body: TabBarView( |
|
children: [ |
|
TradeSummary(storeId), |
|
TradeOrder(storeId), |
|
TradeGoods(storeId),], |
|
), |
|
), |
|
); |
|
} |
|
|
|
}
|
|
|