appinioGmbH / flutter_packages

Dart and Flutter plugins/packages used and maintained by @appinioGmbH
187 stars 214 forks source link

[appinio_swipper] NoSuchMethodError #30

Closed SEGVeenstra closed 1 year ago

SEGVeenstra commented 1 year ago

When you don't provide the onSwipe callback a default callback is used (emptyFunctionIndex). However, this function is missing the direction property which crashes the app with a NoSuchMethodError:

Closure call with mismatched arguments: function 'emptyFunctionIndex'
Receiver: Closure: (int, AppinioSwiperDirection) => void from Function 'emptyFunctionIndex': static.
Tried calling: emptyFunctionIndex(3, Instance of 'AppinioSwiperDirection')

Solution

Update the signature of emptyFunctionIndex

SEGVeenstra commented 1 year ago

I've opened a PR with the fix: https://github.com/appinioGmbH/flutter_packages/pull/29

bilalhamud commented 1 year ago

Thanks @SEGVeenstra, already live with version 1.1.1

SEGVeenstra commented 1 year ago

Great @bilalhammoud ! I have a few more suggestions to improve the package, are you open for those? Should I open an new issue for them?