getActivityState method

  1. @override
Future<LiveActivitiesState> getActivityState(
  1. String liveId
)
override

Implementation

@override
Future<LiveActivitiesState> getActivityState(String liveId) async {
  try {
    final int? data = await _methodChannel
        .invokeMethod<int>('getActivityState', <String, String>{
      'liveId': liveId,
    });

    return LiveActivitiesState.values[data ?? 3];
  } catch (e) {
    return LiveActivitiesState.unknown;
  }
}