expandable fix

This commit is contained in:
julian 2022-11-17 10:12:19 -06:00
parent 8c0a6f5669
commit 72248d6a64
4 changed files with 12 additions and 12 deletions

View file

@ -77,7 +77,7 @@ class _WalletNetworkSettingsViewState
late double _percent;
late int _blocksRemaining;
bool _advancedIsExpanded = true;
bool _advancedIsExpanded = false;
Future<void> _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)

View file

@ -58,7 +58,7 @@ class _ContactListItemState extends ConsumerState<ContactListItem> {
),
child: AddressBookCard(
contactId: contactId,
indicatorDown: _state == ExpandableState.expanded,
indicatorDown: _state,
),
),
body: Column(

View file

@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
enum ExpandableState {
expanded,
collapsed,
expanded,
}
class ExpandableController {
@ -45,11 +45,11 @@ class _ExpandableState extends State<Expandable> with TickerProviderStateMixin {
Future<void> 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;

View file

@ -46,7 +46,7 @@ class NodeCard extends ConsumerStatefulWidget {
class _NodeCardState extends ConsumerState<NodeCard> {
String _status = "Disconnected";
late final String nodeId;
bool _advancedIsExpanded = true;
bool _advancedIsExpanded = false;
Future<void> _notifyWalletsOfUpdatedNode(WidgetRef ref) async {
final managers = ref
@ -367,8 +367,8 @@ class _NodeCardState extends ConsumerState<NodeCard> {
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)