getUserConsent method

  1. @override
Future<UserConsent> getUserConsent()

Implementation

@override
Future<UserConsent> getUserConsent() async {
  String userConsent =
      (await methodChannel.invokeMethod('getUserConsent')) as String;
  if (userConsent == 'granted') {
    return UserConsent.granted;
  } else if (userConsent == 'declined') {
    return UserConsent.declined;
  } else {
    return UserConsent.unknown;
  }
}