getAuthState method

  1. @override
Future<MoveAuthState> getAuthState()
override

Returns the current authorization state.

Implementation

@override
Future<MoveAuthState> getAuthState() async {
  final authState = await methodChannel.invokeMethod<String>('getAuthState');
  MoveAuthState? result = MoveAuthState.values.firstWhereOrNull(
      (element) => element.name.toLowerCase() == authState?.toLowerCase());
  return result ?? MoveAuthState.unknown;
}