logIn static method

Future<LogInResult> logIn(
  1. String appUserID
)

This function will logIn the current user with an appUserID. Typically this would be used after logging in a user to identify them without calling configure

Returns a LogInResult object, or throws a PlatformException if there was a problem restoring transactions. LogInResult holds a CustomerInfo object and a bool that can be used to know if a user has just been created for the first time.

newAppUserID The appUserID that should be linked to the currently user

Implementation

static Future<LogInResult> logIn(String appUserID) async {
  final result =
      await _channel.invokeMethod('logIn', {'appUserID': appUserID});
  final customerInfo = CustomerInfo.fromJson(
    Map<String, dynamic>.from(result['customerInfo']),
  );
  final bool created = result['created'];

  return LogInResult(customerInfo: customerInfo, created: created);
}