getActivityState method

  1. @override
Future<LiveActivityState?> getActivityState(
  1. String activityId
)
override

Implementation

@override
Future<LiveActivityState?> getActivityState(String activityId) async {
  final result = await methodChannel.invokeMethod<String?>(
    'getActivityState',
    {
      'activityId': activityId,
    },
  );
  return result != null ? LiveActivityState.values.byName(result) : null;
}