mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-18 02:07:43 +00:00
desktop settings navigation fix
This commit is contained in:
parent
ab28a93699
commit
22473c1668
3 changed files with 176 additions and 179 deletions
|
@ -1,8 +1,8 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/home/desktop_menu.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/home/desktop_settings_view.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/my_stack_view.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/settings_menu.dart';
|
||||
import 'package:stackwallet/route_generator.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
|
||||
|
@ -35,7 +35,7 @@ class _DesktopHomeViewState extends ConsumerState<DesktopHomeView> {
|
|||
const Navigator(
|
||||
key: Key("desktopSettingHomeKey"),
|
||||
onGenerateRoute: RouteGenerator.generateRoute,
|
||||
initialRoute: SettingsMenu.routeName,
|
||||
initialRoute: DesktopSettingsView.routeName,
|
||||
),
|
||||
Container(
|
||||
color: Colors.blue,
|
||||
|
|
|
@ -3,7 +3,10 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|||
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/backup_and_restore.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/settings_menu.dart';
|
||||
import 'package:stackwallet/route_generator.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
||||
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
|
||||
|
||||
class DesktopSettingsView extends ConsumerStatefulWidget {
|
||||
const DesktopSettingsView({Key? key}) : super(key: key);
|
||||
|
@ -54,9 +57,24 @@ class _DesktopSettingsViewState extends ConsumerState<DesktopSettingsView> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Material(
|
||||
color: Theme.of(context).extension<StackColors>()!.background,
|
||||
child: Row(
|
||||
return DesktopScaffold(
|
||||
background: Theme.of(context).extension<StackColors>()!.background,
|
||||
appBar: DesktopAppBar(
|
||||
isCompactHeight: true,
|
||||
leading: Row(
|
||||
children: [
|
||||
const SizedBox(
|
||||
width: 24,
|
||||
height: 24,
|
||||
),
|
||||
Text(
|
||||
"Settings",
|
||||
style: STextStyles.desktopH3(context),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
body: Row(
|
||||
children: [
|
||||
SettingsMenu(
|
||||
onSelectionChanged: onMenuSelectionChanged,
|
||||
|
|
|
@ -3,9 +3,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/home/settings_menu_item.dart';
|
||||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
||||
|
||||
class SettingsMenu extends ConsumerStatefulWidget {
|
||||
const SettingsMenu({
|
||||
|
@ -37,184 +35,165 @@ class _SettingsMenuState extends ConsumerState<SettingsMenu> {
|
|||
debugPrint("BUILD: $runtimeType");
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
DesktopAppBar(
|
||||
isCompactHeight: true,
|
||||
leading: Row(
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 15),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(
|
||||
width: 24,
|
||||
height: 24,
|
||||
SettingsMenuItem(
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.polygon,
|
||||
width: 11,
|
||||
height: 11,
|
||||
color: selectedMenuItem == 0
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorBlue
|
||||
: Colors.transparent,
|
||||
),
|
||||
label: "Backup and restore",
|
||||
value: 0,
|
||||
group: selectedMenuItem,
|
||||
onChanged: updateSelectedMenuItem,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SettingsMenuItem(
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.polygon,
|
||||
width: 11,
|
||||
height: 11,
|
||||
color: selectedMenuItem == 1
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorBlue
|
||||
: Colors.transparent,
|
||||
),
|
||||
label: "Security",
|
||||
value: 1,
|
||||
group: selectedMenuItem,
|
||||
onChanged: updateSelectedMenuItem,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SettingsMenuItem(
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.polygon,
|
||||
width: 11,
|
||||
height: 11,
|
||||
color: selectedMenuItem == 2
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorBlue
|
||||
: Colors.transparent,
|
||||
),
|
||||
label: "Currency",
|
||||
value: 2,
|
||||
group: selectedMenuItem,
|
||||
onChanged: updateSelectedMenuItem,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SettingsMenuItem(
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.polygon,
|
||||
width: 11,
|
||||
height: 11,
|
||||
color: selectedMenuItem == 3
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorBlue
|
||||
: Colors.transparent,
|
||||
),
|
||||
label: "Language",
|
||||
value: 3,
|
||||
group: selectedMenuItem,
|
||||
onChanged: updateSelectedMenuItem,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SettingsMenuItem(
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.polygon,
|
||||
width: 11,
|
||||
height: 11,
|
||||
color: selectedMenuItem == 4
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorBlue
|
||||
: Colors.transparent,
|
||||
),
|
||||
label: "Nodes",
|
||||
value: 4,
|
||||
group: selectedMenuItem,
|
||||
onChanged: updateSelectedMenuItem,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SettingsMenuItem(
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.polygon,
|
||||
width: 11,
|
||||
height: 11,
|
||||
color: selectedMenuItem == 5
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorBlue
|
||||
: Colors.transparent,
|
||||
),
|
||||
label: "Syncing preferences",
|
||||
value: 5,
|
||||
group: selectedMenuItem,
|
||||
onChanged: updateSelectedMenuItem,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SettingsMenuItem(
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.polygon,
|
||||
width: 11,
|
||||
height: 11,
|
||||
color: selectedMenuItem == 6
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorBlue
|
||||
: Colors.transparent,
|
||||
),
|
||||
label: "Appearance",
|
||||
value: 6,
|
||||
group: selectedMenuItem,
|
||||
onChanged: updateSelectedMenuItem,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SettingsMenuItem(
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.polygon,
|
||||
width: 11,
|
||||
height: 11,
|
||||
color: selectedMenuItem == 7
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorBlue
|
||||
: Colors.transparent,
|
||||
),
|
||||
label: "Advanced",
|
||||
value: 7,
|
||||
group: selectedMenuItem,
|
||||
onChanged: updateSelectedMenuItem,
|
||||
),
|
||||
Text(
|
||||
"Settings",
|
||||
style: STextStyles.desktopH3(context),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 15),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SettingsMenuItem(
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.polygon,
|
||||
width: 11,
|
||||
height: 11,
|
||||
color: selectedMenuItem == 0
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorBlue
|
||||
: Colors.transparent,
|
||||
),
|
||||
label: "Backup and restore",
|
||||
value: 0,
|
||||
group: selectedMenuItem,
|
||||
onChanged: updateSelectedMenuItem,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SettingsMenuItem(
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.polygon,
|
||||
width: 11,
|
||||
height: 11,
|
||||
color: selectedMenuItem == 1
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorBlue
|
||||
: Colors.transparent,
|
||||
),
|
||||
label: "Security",
|
||||
value: 1,
|
||||
group: selectedMenuItem,
|
||||
onChanged: updateSelectedMenuItem,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SettingsMenuItem(
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.polygon,
|
||||
width: 11,
|
||||
height: 11,
|
||||
color: selectedMenuItem == 2
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorBlue
|
||||
: Colors.transparent,
|
||||
),
|
||||
label: "Currency",
|
||||
value: 2,
|
||||
group: selectedMenuItem,
|
||||
onChanged: updateSelectedMenuItem,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SettingsMenuItem(
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.polygon,
|
||||
width: 11,
|
||||
height: 11,
|
||||
color: selectedMenuItem == 3
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorBlue
|
||||
: Colors.transparent,
|
||||
),
|
||||
label: "Language",
|
||||
value: 3,
|
||||
group: selectedMenuItem,
|
||||
onChanged: updateSelectedMenuItem,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SettingsMenuItem(
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.polygon,
|
||||
width: 11,
|
||||
height: 11,
|
||||
color: selectedMenuItem == 4
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorBlue
|
||||
: Colors.transparent,
|
||||
),
|
||||
label: "Nodes",
|
||||
value: 4,
|
||||
group: selectedMenuItem,
|
||||
onChanged: updateSelectedMenuItem,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SettingsMenuItem(
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.polygon,
|
||||
width: 11,
|
||||
height: 11,
|
||||
color: selectedMenuItem == 5
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorBlue
|
||||
: Colors.transparent,
|
||||
),
|
||||
label: "Syncing preferences",
|
||||
value: 5,
|
||||
group: selectedMenuItem,
|
||||
onChanged: updateSelectedMenuItem,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SettingsMenuItem(
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.polygon,
|
||||
width: 11,
|
||||
height: 11,
|
||||
color: selectedMenuItem == 6
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorBlue
|
||||
: Colors.transparent,
|
||||
),
|
||||
label: "Appearance",
|
||||
value: 6,
|
||||
group: selectedMenuItem,
|
||||
onChanged: updateSelectedMenuItem,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SettingsMenuItem(
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.polygon,
|
||||
width: 11,
|
||||
height: 11,
|
||||
color: selectedMenuItem == 7
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorBlue
|
||||
: Colors.transparent,
|
||||
),
|
||||
label: "Advanced",
|
||||
value: 7,
|
||||
group: selectedMenuItem,
|
||||
onChanged: updateSelectedMenuItem,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue