From aba9aeaef2865b9206e85713abbda9dcdb85e625 Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 21 Jun 2023 12:08:18 -0600 Subject: [PATCH 1/5] fix: desktop address book card coin icon --- .../subwidgets/desktop_address_card.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_address_card.dart b/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_address_card.dart index cb570be90..fc626f290 100644 --- a/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_address_card.dart +++ b/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_address_card.dart @@ -8,6 +8,8 @@ * */ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -43,8 +45,10 @@ class DesktopAddressCard extends ConsumerWidget { return Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SvgPicture.asset( - ref.watch(coinIconProvider(entry.coin)), + SvgPicture.file( + File( + ref.watch(coinIconProvider(entry.coin)), + ), height: 32, width: 32, ), From baec88a4f81d5c2c4bfd8427224c8ccf746c25fc Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 21 Jun 2023 12:08:39 -0600 Subject: [PATCH 2/5] fix: dependency version --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index b214169cf..faa286fc5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -108,7 +108,7 @@ dependencies: uuid: ^3.0.5 flutter_rounded_date_picker: ^3.0.1 crypto: ^3.0.2 - barcode_scan2: ^4.2.0 + barcode_scan2: ^4.2.3 wakelock: ^0.6.2 intl: ^0.17.0 devicelocale: ^0.6.0 From ccc9ac545a3c7056233b5f87462331ed01224b9f Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 21 Jun 2023 12:09:00 -0600 Subject: [PATCH 3/5] clean up --- lib/utilities/extensions/impl/box_shadow.dart | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/lib/utilities/extensions/impl/box_shadow.dart b/lib/utilities/extensions/impl/box_shadow.dart index 39dd84c4e..367599d49 100644 --- a/lib/utilities/extensions/impl/box_shadow.dart +++ b/lib/utilities/extensions/impl/box_shadow.dart @@ -10,35 +10,6 @@ import 'package:flutter/material.dart'; -// todo: delete this map (example) -final map = { - "name": "Dark", - "coinColors": { - "bitcoin": "0xFF267352", - }, - "assets": { - "circleLock": "svg/somerandomnamecreatedbythemecreator.svg", - }, - "colors": { - "background": "0xFF848383", - }, - "gradientBackground": { - "gradientType": "linear", - "begin": { - "x": 0.0, - "y": 1.0, - }, - "end": { - "x": -1.0, - "y": 1.0, - }, - "colors": [ - "0xFF638227", - "0xFF632827", - ] - } -}; - extension BoxShadowExt on BoxShadow { static BoxShadow fromJson(Map json) => BoxShadow( color: Color(int.parse(json["color"] as String)), From 2870ec49ec856bd401fe9fcad99769bb0f8f396b Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 21 Jun 2023 12:12:39 -0600 Subject: [PATCH 4/5] move debug logs option to bottom of advanced settings on desktop --- .../advanced_settings/advanced_settings.dart | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/advanced_settings.dart b/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/advanced_settings.dart index a514da74d..1a11320c0 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/advanced_settings.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/advanced_settings.dart @@ -219,44 +219,6 @@ class _AdvancedSettings extends ConsumerState { thickness: 0.5, ), ), - Padding( - padding: const EdgeInsets.all(10), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "Debug info", - style: STextStyles.desktopTextExtraSmall(context) - .copyWith( - color: Theme.of(context) - .extension()! - .textDark), - textAlign: TextAlign.left, - ), - PrimaryButton( - buttonHeight: ButtonHeight.xs, - label: "Show logs", - width: 101, - onPressed: () async { - await showDialog( - context: context, - useSafeArea: false, - barrierDismissible: true, - builder: (context) { - return const DebugInfoDialog(); - }, - ); - }, - ), - ], - ), - ), - const Padding( - padding: EdgeInsets.all(10.0), - child: Divider( - thickness: 0.5, - ), - ), Padding( padding: const EdgeInsets.all(10), child: Row( @@ -327,6 +289,44 @@ class _AdvancedSettings extends ConsumerState { ], ), ), + const Padding( + padding: EdgeInsets.all(10.0), + child: Divider( + thickness: 0.5, + ), + ), + Padding( + padding: const EdgeInsets.all(10), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Debug info", + style: STextStyles.desktopTextExtraSmall(context) + .copyWith( + color: Theme.of(context) + .extension()! + .textDark), + textAlign: TextAlign.left, + ), + PrimaryButton( + buttonHeight: ButtonHeight.xs, + label: "Show logs", + width: 101, + onPressed: () async { + await showDialog( + context: context, + useSafeArea: false, + barrierDismissible: true, + builder: (context) { + return const DebugInfoDialog(); + }, + ); + }, + ), + ], + ), + ), const SizedBox( height: 10, ), From 14bf1ab3e328109487e61f97b05b566c6dc67796 Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 21 Jun 2023 12:47:47 -0600 Subject: [PATCH 5/5] fix: equal width desktop settings option clickable area --- .../settings/desktop_settings_view.dart | 9 +- .../settings/settings_menu.dart | 158 +----------------- 2 files changed, 10 insertions(+), 157 deletions(-) diff --git a/lib/pages_desktop_specific/settings/desktop_settings_view.dart b/lib/pages_desktop_specific/settings/desktop_settings_view.dart index 596337925..2a8c180f9 100644 --- a/lib/pages_desktop_specific/settings/desktop_settings_view.dart +++ b/lib/pages_desktop_specific/settings/desktop_settings_view.dart @@ -83,10 +83,10 @@ class _DesktopSettingsViewState extends ConsumerState { Widget build(BuildContext context) { return DesktopScaffold( background: Theme.of(context).extension()!.background, - appBar: DesktopAppBar( + appBar: const DesktopAppBar( isCompactHeight: true, leading: Row( - children: const [ + children: [ SizedBox( width: 24, height: 24, @@ -97,7 +97,10 @@ class _DesktopSettingsViewState extends ConsumerState { ), body: Row( children: [ - const SettingsMenu(), + const Padding( + padding: EdgeInsets.all(15.0), + child: SettingsMenu(), + ), Expanded( child: contentViews[ ref.watch(selectedSettingsMenuItemStateProvider.state).state], diff --git a/lib/pages_desktop_specific/settings/settings_menu.dart b/lib/pages_desktop_specific/settings/settings_menu.dart index f21398000..4f3175a72 100644 --- a/lib/pages_desktop_specific/settings/settings_menu.dart +++ b/lib/pages_desktop_specific/settings/settings_menu.dart @@ -45,10 +45,10 @@ class _SettingsMenuState extends ConsumerState { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding( - padding: const EdgeInsets.only(left: 15), + SizedBox( + width: 250, child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.stretch, children: [ for (int i = 0; i < labels.length; i++) Column( @@ -83,157 +83,7 @@ class _SettingsMenuState extends ConsumerState { .state = newValue, ), ], - ) - - // SettingsMenuItem( - // icon: SvgPicture.asset( - // Assets.svg.polygon, - // width: 11, - // height: 11, - // color: selectedMenuItem == 0 - // ? Theme.of(context) - // .extension()! - // .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()! - // .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()! - // .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()! - // .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()! - // .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()! - // .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()! - // .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()! - // .accentColorBlue - // : Colors.transparent, - // ), - // label: "Advanced", - // value: 7, - // group: selectedMenuItem, - // onChanged: updateSelectedMenuItem, - // ), + ), ], ), ),