getCurrentProfile method Null safety

Future<CurrentProfileResponse> getCurrentProfile()

Get the current profile

Implementation

Future<CurrentProfileResponse> getCurrentProfile() async {
  final response = await command('GetCurrentProfile');

  if (response == null) {
    throw Exception('Problem getting current profile');
  }

  return CurrentProfileResponse.fromJson(response.rawResponse);
}