From 72248d6a644807d6f7410c31529ae3a57869066f Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 17 Nov 2022 10:12:19 -0600 Subject: [PATCH] expandable fix --- .../wallet_network_settings_view.dart | 10 +++++----- .../sub_widgets/contact_list_item.dart | 2 +- lib/widgets/expandable.dart | 6 +++--- lib/widgets/node_card.dart | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart index accf244eb..3044467aa 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart @@ -77,7 +77,7 @@ class _WalletNetworkSettingsViewState late double _percent; late int _blocksRemaining; - bool _advancedIsExpanded = true; + bool _advancedIsExpanded = false; Future _attemptRescan() async { if (!Platform.isLinux) await Wakelock.enable(); @@ -855,8 +855,8 @@ class _WalletNetworkSettingsViewState ), SvgPicture.asset( _advancedIsExpanded - ? Assets.svg.chevronDown - : Assets.svg.chevronUp, + ? Assets.svg.chevronUp + : Assets.svg.chevronDown, width: 12, height: 6, color: Theme.of(context) @@ -877,11 +877,11 @@ class _WalletNetworkSettingsViewState text: "Rescan", onTap: () async { await Navigator.of(context).push( - FadePageRoute( + FadePageRoute( ConfirmFullRescanDialog( onConfirm: _attemptRescan, ), - const RouteSettings(), + const RouteSettings(), ), ); // await showDialog( diff --git a/lib/pages_desktop_specific/home/my_stack_view/wallet_view/sub_widgets/address_book_address_chooser/sub_widgets/contact_list_item.dart b/lib/pages_desktop_specific/home/my_stack_view/wallet_view/sub_widgets/address_book_address_chooser/sub_widgets/contact_list_item.dart index e030f9882..7acfaae9e 100644 --- a/lib/pages_desktop_specific/home/my_stack_view/wallet_view/sub_widgets/address_book_address_chooser/sub_widgets/contact_list_item.dart +++ b/lib/pages_desktop_specific/home/my_stack_view/wallet_view/sub_widgets/address_book_address_chooser/sub_widgets/contact_list_item.dart @@ -58,7 +58,7 @@ class _ContactListItemState extends ConsumerState { ), child: AddressBookCard( contactId: contactId, - indicatorDown: _state == ExpandableState.expanded, + indicatorDown: _state, ), ), body: Column( diff --git a/lib/widgets/expandable.dart b/lib/widgets/expandable.dart index 47726d6d6..737f4ce7d 100644 --- a/lib/widgets/expandable.dart +++ b/lib/widgets/expandable.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; enum ExpandableState { - expanded, collapsed, + expanded, } class ExpandableController { @@ -45,11 +45,11 @@ class _ExpandableState extends State with TickerProviderStateMixin { Future toggle() async { if (animation.isDismissed) { await animationController.forward(); - _toggleState = ExpandableState.collapsed; + _toggleState = ExpandableState.expanded; widget.onExpandChanged?.call(_toggleState); } else if (animation.isCompleted) { await animationController.reverse(); - _toggleState = ExpandableState.expanded; + _toggleState = ExpandableState.collapsed; widget.onExpandChanged?.call(_toggleState); } controller?.state = _toggleState; diff --git a/lib/widgets/node_card.dart b/lib/widgets/node_card.dart index 1da7e9012..c3fb36c70 100644 --- a/lib/widgets/node_card.dart +++ b/lib/widgets/node_card.dart @@ -46,7 +46,7 @@ class NodeCard extends ConsumerStatefulWidget { class _NodeCardState extends ConsumerState { String _status = "Disconnected"; late final String nodeId; - bool _advancedIsExpanded = true; + bool _advancedIsExpanded = false; Future _notifyWalletsOfUpdatedNode(WidgetRef ref) async { final managers = ref @@ -367,8 +367,8 @@ class _NodeCardState extends ConsumerState { if (isDesktop) SvgPicture.asset( _advancedIsExpanded - ? Assets.svg.chevronDown - : Assets.svg.chevronUp, + ? Assets.svg.chevronUp + : Assets.svg.chevronDown, width: 12, height: 6, color: Theme.of(context)