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, ), 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, - // ), + ), ], ), ), 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, ), 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)), 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