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 createState() => _DiscoverState(); } class _DiscoverState extends State 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: [ 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 [ Tab(text: 'Ranking'), // Tab(text: 'Chart'), Tab(text: 'Trends'), //Tab(text: 'Referral'), Tab(text: 'Rising Stars '), ], ), Expanded( child: TabBarView( controller: _tabController, children: [ Ranking(), // const Chart1(), const Trends(), //const Referral(), const RisingStar(), ], ), ), ], ); } }