tokenizeCard method

  1. @override
Future<CardAccountNonce?> tokenizeCard(
  1. CardRequest request
)
override

Implementation

@override
Future<CardAccountNonce?> tokenizeCard(CardRequest request) async {
  final responseChannel = await methodChannel.invokeMethod<String>(
    BraintreeConstants.tokenizeCardMethodKey,
    request.toJson(),
  );
  if (responseChannel != null) {
    final json = jsonDecode(responseChannel);
    return CardAccountNonce.fromJson(json);
  } else {
    return null;
  }
}