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