getAppConfig method

Future<AppConfig> getAppConfig()

Implementation

Future<AppConfig> getAppConfig() async {
  final response = await _get(
    path: '/config',
  );

  final json = jsonDecode(response.body);

  if (response.statusCode >= 400) {
    return Future.error(ApiError.fromJson(json));
  }

  return AppConfig.fromJson(json);
}