Reputation: 1209
If you add a widget by requestPinAppWidget
then onEnabled
is call, but if you remove it from the Home screen onDisabled
is not call (of course it is the last removed widget). What is wrong or it is a bug?
Upvotes: 0
Views: 466
Reputation: 273
onDisabled
is only called when the last AppWidget instance for this provider is deleted.
If you want to get a callback on any AppWidget being deleted, you must override onDeleted
.
For more info see the official documentation.
Upvotes: 0