getAllActiveNotificationIdsOnStatusBar method

  1. @override
Future<List<int>> getAllActiveNotificationIdsOnStatusBar()
override

The ids of the app's notifications currently shown in the status bar (see isNotificationActiveOnStatusBar).

Implementation

@override
Future<List<int>> getAllActiveNotificationIdsOnStatusBar() async {
  // The platform channel returns a List<Object?>; invokeListMethod casts each
  // element to int (a plain `as List<int>` would throw at runtime).
  return await methodChannel.invokeListMethod<int>(
          CHANNEL_METHOD_GET_ALL_ACTIVE_NOTIFICATION_IDS) ??
      [];
}