@@ -5,7 +5,6 @@ import 'package:flutter/material.dart';
5
5
import 'package:flutter_bloc/flutter_bloc.dart' ;
6
6
import 'package:flutter_markdown/flutter_markdown.dart' ;
7
7
import 'package:flutter_svg/flutter_svg.dart' ;
8
- import 'package:navigation_rail/navigation_rail.dart' ;
9
8
10
9
import 'package:ccxgui/bloc/process_bloc/process_bloc.dart' ;
11
10
import 'package:ccxgui/bloc/updater_bloc/updater_bloc.dart' ;
@@ -75,66 +74,71 @@ class _HomeState extends State<Home> {
75
74
context, 'You are already on the latest version' );
76
75
}
77
76
},
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 (
87
96
logo,
88
97
semanticsLabel: 'CCExtractor Logo' ,
98
+ height: 120 ,
89
99
),
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' ),
90
127
),
91
- _CheckForUpdatesButton ()
92
128
],
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),
126
129
),
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
+ ),
138
142
),
139
143
],
140
144
),
0 commit comments