createExchangeCode method Null safety

Future<String> createExchangeCode()

creates an exchange code to authenticate with the fortnite api. an exchange code is valid only for 30 seconds. an exchange code can be used to launch game/ perform any action on account.

Implementation

Future<String> createExchangeCode() async {
  HttpResponse res = await _client.send(
    method: "GET",
    url: Endpoints().oauthExchange,
  );

  return res.data["code"];
}