import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/mine/vip_card_page.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/my_tab.dart'; import 'coupons_page.dart'; class MineCardPage extends StatefulWidget { @override State createState() { return _MineCardPage(); } } class _MineCardPage extends State with SingleTickerProviderStateMixin { @override Widget build(BuildContext context) { return DefaultTabController( length: 2, child: Scaffold( appBar: MyAppBar( title: S.of(context).kaquan, titleColor: Colors.black, background: Colors.white, leadingColor: Colors.black, toolbarHeight: kToolbarHeight + MediaQuery.of(context).padding.top, bottom: TabBar( // isScrollable: true, //可滚动 indicatorColor: Color(0xff39B54A), labelColor: Colors.black, labelStyle: TextStyle( fontSize: 17.sp, fontWeight: FontWeight.bold, ), unselectedLabelStyle: TextStyle( fontSize: 16.sp, fontWeight: FontWeight.normal, ), // controller: tabController, //未选中文字颜色 unselectedLabelColor: Color(0xffA29E9E), indicatorSize: TabBarIndicatorSize.label, //指示器与文字等宽 tabs: [ MyTab(text: S.of(context).huiyuanka), MyTab(text: S.of(context).quanbao), ], ), ), body: TabBarView( children: [VipCardPage(), CouponsPage()], ), ), ); } }