Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 81 additions & 55 deletions lib/screens/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:navigation_rail/navigation_rail.dart';

import 'package:ccxgui/bloc/process_bloc/process_bloc.dart';
import 'package:ccxgui/bloc/updater_bloc/updater_bloc.dart';
Expand Down Expand Up @@ -75,66 +74,93 @@ class _HomeState extends State<Home> {
context, 'You are already on the latest version');
}
},
child: NavRail(
desktopBreakpoint: 1150,
hideTitleBar: true,
drawerHeaderBuilder: (context) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
DrawerHeader(
child: SvgPicture.asset(
child: Row(
children: <Widget>[
NavigationRail(
selectedIndex: _currentIndex,
extended: true,
onDestinationSelected: (int index) {
setState(() {
_currentIndex = index;
});
},
selectedLabelTextStyle: TextStyle(
color: Theme.of(context).colorScheme.secondary,
),
unselectedIconTheme: IconThemeData(
color: Colors.white54,
),
unselectedLabelTextStyle: TextStyle(
color: Colors.white54,
),
selectedIconTheme: IconThemeData(
color: Theme.of(context).colorScheme.secondary,
),
useIndicator: false,
leading: Column(
children: [
SizedBox(
height: 20,
),
SvgPicture.asset(
logo,
semanticsLabel: 'CCExtractor Logo',
height: 80,
),
_CheckForUpdatesButton(),
],
),
destinations: [
NavigationRailDestination(
padding: EdgeInsets.only(top: 6),
icon: Icon(Icons.dashboard),
selectedIcon: Icon(Icons.dashboard),
label: Text('Dashboard'),
),
NavigationRailDestination(
padding: EdgeInsets.only(top: 6),
icon: Icon(Icons.settings),
selectedIcon: Icon(Icons.settings),
label: Text('Basic Settings'),
),
NavigationRailDestination(
padding: EdgeInsets.only(top: 6),
icon: Icon(Icons.input),
selectedIcon: Icon(Icons.input),
label: Text('Input Settings'),
),
NavigationRailDestination(
padding: EdgeInsets.only(top: 6),
icon: Icon(Icons.dvr_outlined),
selectedIcon: Icon(Icons.dvr_outlined),
label: Text('Output Settings'),
),
NavigationRailDestination(
padding: EdgeInsets.only(top: 6),
icon: Icon(Icons.search),
selectedIcon: Icon(Icons.search),
label: Text('HardSubx Settings'),
),
NavigationRailDestination(
padding: EdgeInsets.only(top: 6),
icon: Icon(Icons.do_disturb_alt_rounded),
selectedIcon: Icon(Icons.do_disturb_alt_rounded),
label: Text('Obscure Settings'),
),
_CheckForUpdatesButton()
],
);
},
currentIndex: _currentIndex,
onTap: (val) {
if (mounted && _currentIndex != val) {
setState(() {
_currentIndex = val;
});
}
},
body: IndexedStack(
index: _currentIndex,
children: <Widget>[
Dashboard(),
BasicSettingsScreen(),
InputSettingsScreen(),
OutputSettingsScreen(),
HardSubxSettingsScreen(),
ObscureSettingsScreen(),
],
),
tabs: <BottomNavigationBarItem>[
BottomNavigationBarItem(
label: 'Dashboard',
icon: Icon(Icons.dashboard),
),
BottomNavigationBarItem(
label: 'Basic Settings',
icon: Icon(Icons.settings),
),
BottomNavigationBarItem(
label: 'Input Settings',
icon: Icon(Icons.input),
),
BottomNavigationBarItem(
label: 'Output Settings',
icon: Icon(Icons.dvr_outlined),
),
BottomNavigationBarItem(
label: 'HardSubx Settings',
icon: Icon(Icons.search),
),
BottomNavigationBarItem(
label: 'Obscure Settings',
icon: Icon(Icons.do_disturb_alt_rounded),
Expanded(
child: IndexedStack(
index: _currentIndex,
children: <Widget>[
Dashboard(),
BasicSettingsScreen(),
InputSettingsScreen(),
OutputSettingsScreen(),
HardSubxSettingsScreen(),
ObscureSettingsScreen(),
],
),
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
33CC10EC2044A3C60003C045 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Loading