refreshToken method

Future<JwtToken> refreshToken()

Implementation

Future<JwtToken> refreshToken() async {
  try {
    var jwtToken = await _jwtAuthApiClient.refreshToken(
        _jwtToken!.username, _jwtToken!.refreshToken);
    _setToken(jwtToken);
    return jwtToken;
  } on DioException catch (e) {
    var error = _handleError(e);
    throw error;
  } catch (e) {
    rethrow;
  }
}