@@ -5,7 +5,6 @@ import 'package:flutter/material.dart';
55import 'package:flutter_bloc/flutter_bloc.dart' ;
66import 'package:flutter_markdown/flutter_markdown.dart' ;
77import 'package:flutter_svg/flutter_svg.dart' ;
8- import 'package:navigation_rail/navigation_rail.dart' ;
98
109import 'package:ccxgui/bloc/process_bloc/process_bloc.dart' ;
1110import 'package:ccxgui/bloc/updater_bloc/updater_bloc.dart' ;
@@ -75,66 +74,71 @@ class _HomeState extends State<Home> {
7574 context, 'You are already on the latest version' );
7675 }
7776 },
78- child: NavRail (
79- desktopBreakpoint: 1150 ,
80- hideTitleBar: true ,
81- drawerHeaderBuilder: (context) {
82- return Column (
83- mainAxisAlignment: MainAxisAlignment .center,
84- children: < Widget > [
85- DrawerHeader (
86- child: SvgPicture .asset (
77+ child: Row (
78+ children: < Widget > [
79+ NavigationRail (
80+ extended: true ,
81+ selectedIndex: _currentIndex,
82+ onDestinationSelected: (int index) {
83+ setState (() {
84+ _currentIndex = index;
85+ });
86+ },
87+ selectedLabelTextStyle: TextStyle (
88+ color: Theme .of (context).colorScheme.secondary,
89+ ),
90+ unselectedIconTheme: IconThemeData (color: Colors .white54),
91+ unselectedLabelTextStyle: TextStyle (color: Colors .white54),
92+ leading: Column (
93+ children: [
94+ SizedBox (height: 20 ),
95+ SvgPicture .asset (
8796 logo,
8897 semanticsLabel: 'CCExtractor Logo' ,
98+ height: 120 ,
8999 ),
100+ _CheckForUpdatesButton (),
101+ ],
102+ ),
103+ destinations: const < NavigationRailDestination > [
104+ NavigationRailDestination (
105+ icon: Icon (Icons .dashboard),
106+ label: Text ('Dashboard' ),
107+ ),
108+ NavigationRailDestination (
109+ icon: Icon (Icons .settings),
110+ label: Text ('Basic Settings' ),
111+ ),
112+ NavigationRailDestination (
113+ icon: Icon (Icons .input),
114+ label: Text ('Input Settings' ),
115+ ),
116+ NavigationRailDestination (
117+ icon: Icon (Icons .dvr_outlined),
118+ label: Text ('Output Settings' ),
119+ ),
120+ NavigationRailDestination (
121+ icon: Icon (Icons .search),
122+ label: Text ('HardSubx Settings' ),
123+ ),
124+ NavigationRailDestination (
125+ icon: Icon (Icons .extension ),
126+ label: Text ('Obscure Settings' ),
90127 ),
91- _CheckForUpdatesButton ()
92128 ],
93- );
94- },
95- currentIndex: _currentIndex,
96- onTap: (val) {
97- if (mounted && _currentIndex != val) {
98- setState (() {
99- _currentIndex = val;
100- });
101- }
102- },
103- body: IndexedStack (
104- index: _currentIndex,
105- children: < Widget > [
106- Dashboard (),
107- BasicSettingsScreen (),
108- InputSettingsScreen (),
109- OutputSettingsScreen (),
110- HardSubxSettingsScreen (),
111- ObscureSettingsScreen (),
112- ],
113- ),
114- tabs: < BottomNavigationBarItem > [
115- BottomNavigationBarItem (
116- label: 'Dashboard' ,
117- icon: Icon (Icons .dashboard),
118- ),
119- BottomNavigationBarItem (
120- label: 'Basic Settings' ,
121- icon: Icon (Icons .settings),
122- ),
123- BottomNavigationBarItem (
124- label: 'Input Settings' ,
125- icon: Icon (Icons .input),
126129 ),
127- BottomNavigationBarItem (
128- label: 'Output Settings' ,
129- icon: Icon (Icons .dvr_outlined),
130- ),
131- BottomNavigationBarItem (
132- label: 'HardSubx Settings' ,
133- icon: Icon (Icons .search),
134- ),
135- BottomNavigationBarItem (
136- label: 'Obscure Settings' ,
137- icon: Icon (Icons .do_disturb_alt_rounded),
130+ Expanded (
131+ child: IndexedStack (
132+ index: _currentIndex,
133+ children: < Widget > [
134+ Dashboard (),
135+ BasicSettingsScreen (),
136+ InputSettingsScreen (),
137+ OutputSettingsScreen (),
138+ HardSubxSettingsScreen (),
139+ ObscureSettingsScreen (),
140+ ],
141+ ),
138142 ),
139143 ],
140144 ),
0 commit comments