mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
expandable fix
This commit is contained in:
parent
8c0a6f5669
commit
72248d6a64
4 changed files with 12 additions and 12 deletions
|
@ -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)
|
||||
|
|
|
@ -58,7 +58,7 @@ class _ContactListItemState extends ConsumerState<ContactListItem> {
|
|||
),
|
||||
child: AddressBookCard(
|
||||
contactId: contactId,
|
||||
indicatorDown: _state == ExpandableState.expanded,
|
||||
indicatorDown: _state,
|
||||
),
|
||||
),
|
||||
body: Column(
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue