diff --git a/lib/pages_desktop_specific/home/desktop_settings_view.dart b/lib/pages_desktop_specific/home/desktop_settings_view.dart new file mode 100644 index 000000000..e69de29bb diff --git a/lib/pages_desktop_specific/home/settings_menu/backup_and_restore.dart b/lib/pages_desktop_specific/home/settings_menu/backup_and_restore.dart new file mode 100644 index 000000000..e69de29bb diff --git a/lib/pages_desktop_specific/home/settings_menu/settings_menu.dart b/lib/pages_desktop_specific/home/settings_menu/settings_menu.dart new file mode 100644 index 000000000..a567c510d --- /dev/null +++ b/lib/pages_desktop_specific/home/settings_menu/settings_menu.dart @@ -0,0 +1,30 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class SettingsMenu extends ConsumerStatefulWidget { + const SettingsMenu({Key? key}) : super(key: key); + + static const String routeName = "/settingsMenu"; + + @override + ConsumerState createState() => _SettingsMenuState(); +} + +class _SettingsMenuState extends ConsumerState { + @override + Widget build(BuildContext context) { + // // TODO: implement build + // throw UnimplementedError(); + debugPrint("BUILD: $runtimeType"); + + return Column( + children: [ + Container( + width: 32, + height: 32, + decoration: BoxDecoration(color: Colors.teal), + ), + ], + ); + } +} diff --git a/lib/pages_desktop_specific/home/settings_menu_item.dart b/lib/pages_desktop_specific/home/settings_menu_item.dart new file mode 100644 index 000000000..125e50e73 --- /dev/null +++ b/lib/pages_desktop_specific/home/settings_menu_item.dart @@ -0,0 +1,57 @@ +import 'package:flutter/material.dart'; +import 'package:stackwallet/utilities/text_styles.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; + +class SettingsMenuItem extends StatelessWidget { + const SettingsMenuItem({ + Key? key, + required this.icon, + required this.label, + required this.value, + required this.group, + required this.onChanged, + }) : super(key: key); + + final Widget icon; + final String label; + final T value; + final T group; + final void Function(T) onChanged; + + @override + Widget build(BuildContext context) { + return TextButton( + style: value == group + ? Theme.of(context) + .extension()! + .getDesktopMenuButtonColorSelected(context) + : Theme.of(context) + .extension()! + .getDesktopMenuButtonColor(context), + onPressed: () { + onChanged(value); + }, + child: Padding( + padding: EdgeInsets.symmetric( + vertical: 16, + horizontal: 16, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + icon, + const SizedBox( + width: 12, + ), + Text( + label, + style: value == group //checks if option is selected + ? STextStyles.desktopMenuItemSelected(context) + : STextStyles.desktopMenuItem(context), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages_desktop_specific/home/settings_view/settings_view.dart b/lib/pages_desktop_specific/home/settings_view/settings_view.dart deleted file mode 100644 index c308f2962..000000000 --- a/lib/pages_desktop_specific/home/settings_view/settings_view.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; - -class SettingsView extends ConsumerStatefulWidget { - const SettingsView({Key? key}) : super(key: key); - - static const String routeName = "/settingsView"; - - @override - ConsumerState createState() => _SettingsView(); -} - -class _SettingsView extends ConsumerState { - @override - Widget build(BuildContext context) { - debugPrint("BUILD: $runtimeType"); - // TODO: implement build - throw UnimplementedError(); - } -}