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.

61 lines
1.9 KiB

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