getAllActivities method

  1. @override
Future<Map<String, LiveActivityState>> getAllActivities()
override

Implementation

@override
Future<Map<String, LiveActivityState>> getAllActivities() async {
  final result =
      await methodChannel.invokeMapMethod<String, String>('getAllActivities');

  return result?.map((key, value) =>
          MapEntry(key, LiveActivityState.values.byName(value))) ??
      <String, LiveActivityState>{};
}