hasPlatformAuthenticatorsWithCb method

Future<void> hasPlatformAuthenticatorsWithCb(
  1. dynamic onSuccess({
    1. bool? result,
    }),
  2. dynamic onFailure({
    1. String? errString,
    2. int? errorCode,
    })
)

Implementation

Future<void> hasPlatformAuthenticatorsWithCb(
  Function({bool? result}) onSuccess,
  Function({int? errorCode, String? errString}) onFailure,
) async {
  dynamic res = await _channel.invokeMethod('hasPlatformAuthenticatorsCb');
  if (res == null) {
    return;
  }
  if (res.runtimeType == bool) {
    onSuccess(result: res);
  } else {
    Map<dynamic, dynamic> result = Map<dynamic, dynamic>.from(res);
    onFailure(
      errorCode: result['errorCode'],
      errString: result['errString'],
    );
  }
}