import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:sport/pages/game/game_info.dart'; import 'package:sport/pages/game/rank_info.dart'; import 'package:sport/pages/home/home_info_page.dart'; class GamePage extends StatefulWidget { @override State createState() { return _GamePageState(); } } class _GamePageState extends State with AutomaticKeepAliveClientMixin, SingleTickerProviderStateMixin { @override bool get wantKeepAlive => true; @override void didChangeDependencies() { super.didChangeDependencies(); } @override Widget build(BuildContext context) { super.build(context); return Scaffold( appBar: AppBar( backgroundColor: Theme.of(context).scaffoldBackgroundColor, elevation: 0, // 去掉AppBar下面的阴影 title: Text("运动项目", style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.w600, height: 1.2, color: const Color(0xff333333)),), ), body: GameInfoView(),); // return DefaultTabController( // length: 2, // child: Scaffold( // appBar: AppBar( // backgroundColor: Theme.of(context).scaffoldBackgroundColor, // elevation: 0, // 去掉AppBar下面的阴影 // title: indexTabBar(["运动项目", "运动榜单"]), // ), // body: Container( // child: TabBarView( // physics: const NeverScrollableScrollPhysics(), // children: [ // // 运动的View // GameInfoView(), // // 榜单的View // RankInfo(), // ], // ), // )), // ); } }