From 2b3b7db206fec37407b5ea3c92be495593a998a4 Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 11 Sep 2023 16:27:44 -0600 Subject: [PATCH 1/5] screen height in debug mode (desktop) --- lib/main.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 94c70c8b1..b948a9510 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -16,7 +16,6 @@ import 'package:cw_core/node.dart'; import 'package:cw_core/unspent_coins_info.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_type.dart'; -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_libmonero/monero/monero.dart'; @@ -97,7 +96,7 @@ void main() async { setWindowMaxSize(Size.infinite); final screenHeight = screen?.frame.height; - if (screenHeight != null && !kDebugMode) { + if (screenHeight != null) { // starting to height be 3/4 screen height or 900, whichever is smaller final height = min(screenHeight * 0.75, 900); setWindowFrame( From 0e64696c2013c6245dbc27d58d20babbc2f3e70f Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 11 Sep 2023 17:03:56 -0600 Subject: [PATCH 2/5] possible "fix" for android 13 not being able to load swb files --- pubspec.lock | 23 ++++++++++++----------- pubspec.yaml | 10 ++++++++-- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index c01aca249..f24f7916a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -557,11 +557,12 @@ packages: file_picker: dependency: "direct main" description: - name: file_picker - sha256: b1729fc96627dd44012d0a901558177418818d6bd428df59dcfeb594e5f66432 - url: "https://pub.dev" - source: hosted - version: "5.3.2" + path: "." + ref: f0930d9fa79d347b2a0e25a7de4f5a4a88a9a907 + resolved-ref: f0930d9fa79d347b2a0e25a7de4f5a4a88a9a907 + url: "https://github.com/muttsu-623/flutter_file_picker.git" + source: git + version: "5.3.3" fixnum: dependency: transitive description: @@ -1209,18 +1210,18 @@ packages: dependency: "direct main" description: name: permission_handler - sha256: "63e5216aae014a72fe9579ccd027323395ce7a98271d9defa9d57320d001af81" + sha256: ad65ba9af42a3d067203641de3fd9f547ded1410bad3b84400c2b4899faede70 url: "https://pub.dev" source: hosted - version: "10.4.3" + version: "11.0.0" permission_handler_android: dependency: transitive description: name: permission_handler_android - sha256: "2ffaf52a21f64ac9b35fe7369bb9533edbd4f698e5604db8645b1064ff4cf221" + sha256: "6901d50f4d4b9a27e1749dbd4adbf06aa00d90a21a2db563405d5ce27ee120ac" url: "https://pub.dev" source: hosted - version: "10.3.3" + version: "11.0.0" permission_handler_apple: dependency: transitive description: @@ -1233,10 +1234,10 @@ packages: dependency: transitive description: name: permission_handler_platform_interface - sha256: "7c6b1500385dd1d2ca61bb89e2488ca178e274a69144d26bbd65e33eae7c02a9" + sha256: f2343e9fa9c22ae4fd92d4732755bfe452214e7189afcc097380950cf567b4b2 url: "https://pub.dev" source: hosted - version: "3.11.3" + version: "3.11.5" permission_handler_windows: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index fece8ca4b..e692f0cfc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -60,7 +60,7 @@ dependencies: # Utility plugins http: ^0.13.0 local_auth: ^1.1.10 - permission_handler: ^10.0.0 + permission_handler: ^11.0.0 flutter_local_notifications: ^9.4.0 rxdart: ^0.27.3 zxcvbn: ^1.0.0 @@ -123,7 +123,7 @@ dependencies: pointycastle: ^3.6.0 package_info_plus: ^4.0.2 lottie: ^2.3.2 - file_picker: ^5.3.1 + file_picker: ^5.5.0 connectivity_plus: ^4.0.1 isar: 3.0.5 isar_flutter_libs: 3.0.5 # contains the binaries @@ -200,6 +200,12 @@ dependency_overrides: url: https://github.com/cypherstack/stack-bip39.git ref: 0cd6d54e2860bea68fc50c801cb9db2a760192fb + + file_picker: + git: + url: https://github.com/muttsu-623/flutter_file_picker.git + ref: f0930d9fa79d347b2a0e25a7de4f5a4a88a9a907 + crypto: 3.0.2 analyzer: ^5.2.0 pinenacl: ^0.3.3 From dae4a38287eb410af962249e4c1f942355e38258 Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 11 Sep 2023 17:12:35 -0600 Subject: [PATCH 3/5] add placeholder icon to ethereum tokens select --- .../sub_widgets/add_token_list_element.dart | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/lib/pages/add_wallet_views/add_token_view/sub_widgets/add_token_list_element.dart b/lib/pages/add_wallet_views/add_token_view/sub_widgets/add_token_list_element.dart index be5aaa37d..e6d9149a7 100644 --- a/lib/pages/add_wallet_views/add_token_view/sub_widgets/add_token_list_element.dart +++ b/lib/pages/add_wallet_views/add_token_view/sub_widgets/add_token_list_element.dart @@ -8,7 +8,10 @@ * */ +import 'dart:io'; + import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:isar/isar.dart'; import 'package:stackwallet/models/isar/exchange_cache/currency.dart'; @@ -16,6 +19,7 @@ import 'package:stackwallet/models/isar/models/ethereum/eth_contract.dart'; import 'package:stackwallet/services/exchange/change_now/change_now_exchange.dart'; import 'package:stackwallet/services/exchange/exchange_data_loading_service.dart'; import 'package:stackwallet/themes/stack_colors.dart'; +import 'package:stackwallet/themes/theme_providers.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/util.dart'; @@ -30,16 +34,17 @@ class AddTokenListElementData { bool selected = false; } -class AddTokenListElement extends StatefulWidget { +class AddTokenListElement extends ConsumerStatefulWidget { const AddTokenListElement({Key? key, required this.data}) : super(key: key); final AddTokenListElementData data; @override - State createState() => _AddTokenListElementState(); + ConsumerState createState() => + _AddTokenListElementState(); } -class _AddTokenListElementState extends State { +class _AddTokenListElementState extends ConsumerState { final bool isDesktop = Util.isDesktop; @override @@ -74,6 +79,17 @@ class _AddTokenListElementState extends State { currency.image, width: iconSize, height: iconSize, + placeholderBuilder: (_) => SvgPicture.file( + File( + ref.watch( + themeAssetsProvider.select( + (value) => value.stackIcon, + ), + ), + ), + width: iconSize, + height: iconSize, + ), ) : SvgPicture.asset( widget.data.token.symbol == "BNB" From 16718b94e600899e53b0d4f8cd6680e21df3eb55 Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 11 Sep 2023 17:54:01 -0600 Subject: [PATCH 4/5] revert auto focus next field on valid mnemonic word --- .../restore_wallet_view.dart | 92 +++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart b/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart index 87219d277..1a62af746 100644 --- a/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart +++ b/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart @@ -98,7 +98,7 @@ class _RestoreWalletViewState extends ConsumerState { final List _controllers = []; final List _inputStatuses = []; - final List _focusNodes = []; + // final List _focusNodes = []; late final BarcodeScannerInterface scanner; @@ -152,7 +152,7 @@ class _RestoreWalletViewState extends ConsumerState { for (int i = 0; i < _seedWordCount; i++) { _controllers.add(TextEditingController()); _inputStatuses.add(FormInputStatus.empty); - _focusNodes.add(FocusNode()); + // _focusNodes.add(FocusNode()); } super.initState(); @@ -821,8 +821,8 @@ class _RestoreWalletViewState extends ConsumerState { i * 4 + j - 1 == 1 ? textSelectionControls : null, - focusNode: - _focusNodes[i * 4 + j - 1], + // focusNode: + // _focusNodes[i * 4 + j - 1], onChanged: (value) { final FormInputStatus formInputStatus; @@ -841,18 +841,18 @@ class _RestoreWalletViewState extends ConsumerState { FormInputStatus.invalid; } - if (formInputStatus == - FormInputStatus.valid) { - if (i * 4 + j < - _focusNodes.length) { - _focusNodes[i * 4 + j] - .requestFocus(); - } else if (i * 4 + j == - _focusNodes.length) { - _focusNodes[i * 4 + j - 1] - .unfocus(); - } - } + // if (formInputStatus == + // FormInputStatus.valid) { + // if (i * 4 + j < + // _focusNodes.length) { + // _focusNodes[i * 4 + j] + // .requestFocus(); + // } else if (i * 4 + j == + // _focusNodes.length) { + // _focusNodes[i * 4 + j - 1] + // .unfocus(); + // } + // } setState(() { _inputStatuses[i * 4 + j - @@ -929,7 +929,7 @@ class _RestoreWalletViewState extends ConsumerState { selectionControls: i == 1 ? textSelectionControls : null, - focusNode: _focusNodes[i], + // focusNode: _focusNodes[i], onChanged: (value) { final FormInputStatus formInputStatus; @@ -948,27 +948,27 @@ class _RestoreWalletViewState extends ConsumerState { FormInputStatus.invalid; } - if (formInputStatus == - FormInputStatus - .valid && - (i - 1) < - _focusNodes.length) { - Focus.of(context) - .requestFocus( - _focusNodes[i]); - } + // if (formInputStatus == + // FormInputStatus + // .valid && + // (i - 1) < + // _focusNodes.length) { + // Focus.of(context) + // .requestFocus( + // _focusNodes[i]); + // } - if (formInputStatus == - FormInputStatus.valid) { - if (i + 1 < - _focusNodes.length) { - _focusNodes[i + 1] - .requestFocus(); - } else if (i + 1 == - _focusNodes.length) { - _focusNodes[i].unfocus(); - } - } + // if (formInputStatus == + // FormInputStatus.valid) { + // if (i + 1 < + // _focusNodes.length) { + // _focusNodes[i + 1] + // .requestFocus(); + // } else if (i + 1 == + // _focusNodes.length) { + // _focusNodes[i].unfocus(); + // } + // } }, controller: _controllers[i], style: @@ -1068,7 +1068,7 @@ class _RestoreWalletViewState extends ConsumerState { AutovalidateMode.onUserInteraction, selectionControls: i == 1 ? textSelectionControls : null, - focusNode: _focusNodes[i - 1], + // focusNode: _focusNodes[i - 1], onChanged: (value) { final FormInputStatus formInputStatus; @@ -1084,14 +1084,14 @@ class _RestoreWalletViewState extends ConsumerState { FormInputStatus.invalid; } - if (formInputStatus == - FormInputStatus.valid) { - if (i < _focusNodes.length) { - _focusNodes[i].requestFocus(); - } else if (i == _focusNodes.length) { - _focusNodes[i - 1].unfocus(); - } - } + // if (formInputStatus == + // FormInputStatus.valid) { + // if (i < _focusNodes.length) { + // _focusNodes[i].requestFocus(); + // } else if (i == _focusNodes.length) { + // _focusNodes[i - 1].unfocus(); + // } + // } setState(() { _inputStatuses[i - 1] = formInputStatus; From 26ce10c8fffd465d274cf8366ff7d5991a2580ff Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 12 Sep 2023 09:42:50 -0600 Subject: [PATCH 5/5] update flutter_svg --- pubspec.lock | 36 ++++++++++++++++++++++++++---------- pubspec.yaml | 2 +- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index f24f7916a..2b04a97a2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -743,10 +743,10 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: "6ff9fa12892ae074092de2fa6a9938fb21dbabfdaa2ff57dc697ff912fc8d4b2" + sha256: "8c5d68a82add3ca76d792f058b186a0599414f279f00ece4830b9b231b570338" url: "https://pub.dev" source: hosted - version: "1.1.6" + version: "2.0.7" flutter_test: dependency: "direct dev" description: flutter @@ -1142,14 +1142,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.3" - path_drawing: - dependency: transitive - description: - name: path_drawing - sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 - url: "https://pub.dev" - source: hosted - version: "1.0.1" path_parsing: dependency: transitive description: @@ -1748,6 +1740,30 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.7" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "670f6e07aca990b4a2bcdc08a784193c4ccdd1932620244c3a86bb72a0eac67f" + url: "https://pub.dev" + source: hosted + version: "1.1.7" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "7451721781d967db9933b63f5733b1c4533022c0ba373a01bdd79d1a5457f69f" + url: "https://pub.dev" + source: hosted + version: "1.1.7" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "80a13c613c8bde758b1464a1755a7b3a8f2b6cec61fbf0f5a53c94c30f03ba2e" + url: "https://pub.dev" + source: hosted + version: "1.1.7" vector_math: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index e692f0cfc..f05cfe781 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -101,7 +101,7 @@ dependencies: flutter_native_splash: ^2.2.4 google_fonts: ^4.0.4 url_launcher: ^6.0.5 - flutter_svg: ^1.0.1 + flutter_svg: ^2.0.7 flutter_feather_icons: ^2.0.0+1 decimal: ^2.1.0 event_bus: ^2.0.0