createUser static method

Future<Either<int, String>> createUser(
  1. String apiKey,
  2. String customerId
)

Implementation

static Future<Either<int, String>> createUser(
    String apiKey, String customerId) async {
  try {
    final response = await _platform.invokeMethod('createUser',
        <String, dynamic>{'api_key': apiKey, 'customer_id': customerId});
    return Right(response.toString());
  } on PlatformException catch (e) {
    return Left(int.parse(e.code));
  }
}