Skip to content

Commit

Permalink
Fix (:
Browse files Browse the repository at this point in the history
  • Loading branch information
tenhobi committed Dec 11, 2023
1 parent 40b9c61 commit 1436847
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class HomeWidgetPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,
}
"requestPinWidget" -> {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
return result.success()
return result.success(null)
}
val qualifiedName = call.argument<String>("qualifiedAndroidName")
val className = call.argument<String>("android") ?: call.argument<String>("name")
Expand All @@ -125,7 +125,7 @@ class HomeWidgetPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,
appWidgetManager.requestPinAppWidget(myProvider, null, null)
}

return result.success()
return result.success(null)
} catch (classException: ClassNotFoundException) {
result.error("-4", "No Widget found with Name $className. Argument 'name' must be the same as your AppWidgetProvider you wish to update", classException)
}
Expand Down

0 comments on commit 1436847

Please sign in to comment.