wallet card redesign
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
|
||||
class BalanceActionsUiController extends ChangeNotifier {
|
||||
int? _hoveredButtonIndex;
|
||||
|
||||
int? get hoveredButtonIndex => _hoveredButtonIndex;
|
||||
|
||||
bool isExpanded(int index) => _hoveredButtonIndex == index;
|
||||
|
||||
void onHoverChanged(int index, bool hovered) {
|
||||
final next = hovered
|
||||
? index
|
||||
: (_hoveredButtonIndex == index ? null : _hoveredButtonIndex);
|
||||
if (next == _hoveredButtonIndex) return;
|
||||
_hoveredButtonIndex = next;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user