|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:huixiang/mine/follow_page.dart';
|
|
|
|
import 'package:huixiang/mine/release_page.dart';
|
|
|
|
import 'package:huixiang/utils/font_weight.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 '../fans_page.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class CommunityFollow extends StatefulWidget {
|
|
|
|
@override
|
|
|
|
State<StatefulWidget> createState() {
|
|
|
|
return _CommunityFollow();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class _CommunityFollow extends State<CommunityFollow>
|
|
|
|
with SingleTickerProviderStateMixin {
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@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, //可滚动
|
|
|
|
indicatorColor: Color(0xff39B54A),
|
|
|
|
labelColor: Colors.black,
|
|
|
|
labelStyle: TextStyle(
|
|
|
|
fontSize: 17.sp,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
),
|
|
|
|
unselectedLabelStyle: TextStyle(
|
|
|
|
fontSize: 16.sp,
|
|
|
|
fontWeight: MyFontWeight.medium,
|
|
|
|
),
|
|
|
|
// controller: tabController,
|
|
|
|
//未选中文字颜色
|
|
|
|
unselectedLabelColor: Color(0xffA29E9E),
|
|
|
|
indicatorSize: TabBarIndicatorSize.label,
|
|
|
|
//指示器与文字等宽
|
|
|
|
tabs: <Widget>[
|
|
|
|
MyTab(text:"关注(0)",),
|
|
|
|
MyTab(text: "粉丝(0)"),
|
|
|
|
MyTab(text: "发布(0)"),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
body: TabBarView(
|
|
|
|
children: [FollowPage(),FansPage(),ReleasePage()],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|