connectWithRedirect method

  1. @override
Future<EarthoCredentials?> connectWithRedirect(
  1. String accessId
)
override

Starts the access flow

accessId - which access the user should connect to take this value from creator.eartho.world

Implementation

@override
Future<EarthoCredentials?> connectWithRedirect(String accessId) async {
  final rawJson = await methodChannel
      .invokeMethod('connectWithRedirect', {"accessId": accessId});
  if (rawJson == null) return null;
  final decodedJson = jsonDecode(rawJson);
  return EarthoCredentials.fromJSON(decodedJson);
}