diff --git a/lib/src/typedefs.dart b/lib/src/typedefs.dart index fd49f18..c6582d1 100644 --- a/lib/src/typedefs.dart +++ b/lib/src/typedefs.dart @@ -9,7 +9,7 @@ typedef CardSwiperOnSwipe = FutureOr 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, ); diff --git a/lib/src/undoable.dart b/lib/src/undoable.dart index f79f428..888c3d9 100644 --- a/lib/src/undoable.dart +++ b/lib/src/undoable.dart @@ -1,8 +1,8 @@ class Undoable { - Undoable(this._value, {Undoable? previousValue}) : _previous = previousValue; + Undoable(this._value, {Undoable? previousValue}) : _previous = previousValue; T _value; - Undoable? _previous; + Undoable? _previous; T get state => _value; T? get previousState => _previous?.state;