diff --git a/packages/home_widget/lib/src/home_widget.dart b/packages/home_widget/lib/src/home_widget.dart index 5183c8b..e88f078 100644 --- a/packages/home_widget/lib/src/home_widget.dart +++ b/packages/home_widget/lib/src/home_widget.dart @@ -136,12 +136,10 @@ class HomeWidget { /// Register a callback that gets called when clicked on a specific View in a HomeWidget /// This enables having Interactive Widgets that can call Dart Code /// More Info on setting this up in the README - static Future registerInteractivityCallback( - FutureOr Function(Uri?) callback, - ) { - final args = [ - ui.PluginUtilities.getCallbackHandle(callbackDispatcher)?.toRawHandle(), - ui.PluginUtilities.getCallbackHandle(callback)?.toRawHandle(), + static Future registerInteractivityCallback(FutureOr Function(Uri?) callback) { + final args = [ + ui.PluginUtilities.getCallbackHandle(callbackDispatcher)?.toRawHandle() ?? 0, + ui.PluginUtilities.getCallbackHandle(callback)?.toRawHandle() ?? 1, ]; return _channel.invokeMethod('registerBackgroundCallback', args); }