|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:huixiang/business_system/goods/off_shelf/off_shelf_page.dart';
|
|
|
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
|
|
|
|
import '../../view_widget/my_appbar.dart';
|
|
|
|
import '../../view_widget/my_tab.dart';
|
|
|
|
import 'on_sale/on_sale_page.dart';
|
|
|
|
|
|
|
|
class BusinessGoodsPage extends StatefulWidget {
|
|
|
|
|
|
|
|
@override
|
|
|
|
State<StatefulWidget> createState() {
|
|
|
|
return _BusinessGoodsPage();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class _BusinessGoodsPage extends State<BusinessGoodsPage>
|
|
|
|
with AutomaticKeepAliveClientMixin {
|
|
|
|
final RefreshController refreshController = RefreshController();
|
|
|
|
final ScrollController scrollController = ScrollController();
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
super.build(context);
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
Expanded(child:
|
|
|
|
DefaultTabController(
|
|
|
|
length: 2,
|
|
|
|
child: Scaffold(
|
|
|
|
appBar: MyAppBar(
|
|
|
|
title:"",
|
|
|
|
leading: false,
|
|
|
|
background: Colors.white,
|
|
|
|
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:"在售中(19)"),
|
|
|
|
MyTab(text: "已下架(2)"),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
body: TabBarView(
|
|
|
|
children: [
|
|
|
|
OnSalePage(),
|
|
|
|
OffShelfPage(),],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),),
|
|
|
|
SizedBox(
|
|
|
|
height: 76.h,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
bool get wantKeepAlive => true;
|
|
|
|
}
|