65 lines
1.7 KiB
Dart
65 lines
1.7 KiB
Dart
|
import 'package:discover_module/ui_screen/ranking.dart';
|
||
|
import 'package:discover_module/ui_screen/rising_stars.dart';
|
||
|
import 'package:discover_module/ui_screen/trends.dart';
|
||
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
class Discover extends StatefulWidget {
|
||
|
const Discover(this.outerTab, {super.key});
|
||
|
|
||
|
final String outerTab;
|
||
|
|
||
|
@override
|
||
|
State<Discover> createState() => _DiscoverState();
|
||
|
}
|
||
|
|
||
|
class _DiscoverState extends State<Discover> with TickerProviderStateMixin {
|
||
|
late final TabController _tabController;
|
||
|
|
||
|
@override
|
||
|
void initState() {
|
||
|
super.initState();
|
||
|
_tabController = TabController(length: 3, vsync: this);
|
||
|
}
|
||
|
|
||
|
@override
|
||
|
void dispose() {
|
||
|
_tabController.dispose();
|
||
|
super.dispose();
|
||
|
}
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Column(
|
||
|
children: <Widget>[
|
||
|
TabBar.secondary(
|
||
|
controller: _tabController,
|
||
|
labelStyle:
|
||
|
const TextStyle(fontSize: 12.0, fontWeight: FontWeight.bold),
|
||
|
indicatorWeight: 1.0,
|
||
|
indicatorColor: const Color.fromARGB(255, 0, 71, 135),
|
||
|
labelPadding: EdgeInsets.all(0.0),
|
||
|
tabs: const <Widget>[
|
||
|
Tab(text: 'Ranking'),
|
||
|
// Tab(text: 'Chart'),
|
||
|
Tab(text: 'Trends'),
|
||
|
//Tab(text: 'Referral'),
|
||
|
Tab(text: 'Rising Stars '),
|
||
|
],
|
||
|
),
|
||
|
Expanded(
|
||
|
child: TabBarView(
|
||
|
controller: _tabController,
|
||
|
children: <Widget>[
|
||
|
Ranking(),
|
||
|
// const Chart1(),
|
||
|
const Trends(),
|
||
|
//const Referral(),
|
||
|
const RisingStar(),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
);
|
||
|
}
|
||
|
}
|