|
|
|
|
|
|
|
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 'coupons_page.dart';
|
|
|
|
|
|
|
|
class MineCardPage extends StatefulWidget {
|
|
|
|
@override
|
|
|
|
State<StatefulWidget> createState() {
|
|
|
|
return _MineCardPage();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class _MineCardPage extends State<MineCardPage>
|
|
|
|
with SingleTickerProviderStateMixin {
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return DefaultTabController(
|
|
|
|
length: 2,
|
|
|
|
child: Scaffold(
|
|
|
|
appBar: AppBar(
|
|
|
|
title: Text(
|
|
|
|
S.of(context).kaquan,
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.black,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
centerTitle: false,
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
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,
|
|
|
|
bottom: TabBar(
|
|
|
|
// isScrollable: true, //可滚动
|
|
|
|
indicatorColor: Color(0xff39B54A),
|
|
|
|
labelColor: Colors.black,
|
|
|
|
labelStyle: TextStyle(fontSize: 17, fontWeight: FontWeight.bold),
|
|
|
|
unselectedLabelStyle: TextStyle(
|
|
|
|
fontSize: 16,
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
),
|
|
|
|
// controller: tabController,
|
|
|
|
//未选中文字颜色
|
|
|
|
unselectedLabelColor: Color(0xffA29E9E),
|
|
|
|
indicatorSize: TabBarIndicatorSize.label,
|
|
|
|
//指示器与文字等宽
|
|
|
|
tabs: <Widget>[
|
|
|
|
Tab(text: "会员卡"),
|
|
|
|
Tab(text: "券包"),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
body: TabBarView(
|
|
|
|
children: [VipCardPage(), CouponsPage()],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|