Closed utkudenis closed 3 months ago
@utkudenis Add 'isSupported' to check if launcher supports badge counter. But actually, updateBadge will do nothing when the launcher doesn't support badge counter. I think it is unnecessary to check if the launcher support badge counter. version: 1.1.0
As I checked from package, there is an exception if it is not implemented
Could you pls tell me which exception it will throw? Any detail?
Future
lib/app_badge_plus_platform_interface.dart
I thought that if platform support does not implemented , it will throw this error.
However, your first comment was nothing happen if platfrom does not supported.
flutter will invoke native api, which has been implement in android and ios. So it will not throw UnimplementedError when you are using android or iOS devices.
@windows7lake I see that the latest version now has an isSupported
method. Why did you decide to implement it after all?
Is it still safe to call updateBadgeCount
without checking isSupported
first on Android and iOS?
@creativecreatorormaybenot It always return true on iOS, and on Android it will return false if the launcher doesn't support badge.
@windows7lake But it is safe to call updateBadgeCount
without checking first on Android?
@creativecreatorormaybenot Yes, try catch the exception and print log to console but do nothing.
@windows7lake So you are saying I need to wrap the updateBadgeCount
in a try
/ catch
block manually?
@creativecreatorormaybenot No, I have been deal with it in native, you dont need to do anything, just use the api.
Hi Developer,
Can you add isSupported feature(Especially for android) like discontiuned package of flutter_app_badger.