feat: impove type inference
This commit is contained in:
parent
c1b0ca39e3
commit
146ec762b2
|
|
@ -9,7 +9,7 @@ typedef CardSwiperOnSwipe = FutureOr<bool> Function(
|
|||
CardSwiperDirection direction,
|
||||
);
|
||||
|
||||
typedef CardSwiperOnSwipeUpdate = Function(
|
||||
typedef CardSwiperOnSwipeUpdate = void Function(
|
||||
int? currentIndex,
|
||||
CardSwiperDirection direction,
|
||||
);
|
||||
|
|
@ -21,7 +21,7 @@ typedef NullableCardBuilder = Widget? Function(
|
|||
int verticalOffsetPercentage,
|
||||
);
|
||||
|
||||
typedef CardSwiperDirectionChange = Function(
|
||||
typedef CardSwiperDirectionChange = void Function(
|
||||
CardSwiperDirection horizontalDirection,
|
||||
CardSwiperDirection verticalDirection,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
class Undoable<T> {
|
||||
Undoable(this._value, {Undoable? previousValue}) : _previous = previousValue;
|
||||
Undoable(this._value, {Undoable<T>? previousValue}) : _previous = previousValue;
|
||||
|
||||
T _value;
|
||||
Undoable? _previous;
|
||||
Undoable<T>? _previous;
|
||||
|
||||
T get state => _value;
|
||||
T? get previousState => _previous?.state;
|
||||
|
|
|
|||
Loading…
Reference in New Issue