getCurrent static method Null safety

Future<UserData> getCurrent()

Returns current user data.

Implementation

static Future<UserData> getCurrent() async {
  if (_instance != null) {
    return _instance!;
  } else {
    Map<String, dynamic> currentData =
        (await FairBidInternal._channel.invokeMapMethod("getUserData"))!
            .cast();
    _instance = UserData._fromMap(currentData);
    return _instance!;
  }
}