IuguProperties constructor

IuguProperties({
  1. required String apiKey,
  2. required String urlApi,
  3. Dio? customDio,
})

Implementation

IuguProperties({required this.apiKey, required this.urlApi, Dio? customDio})
    : assert(
        apiKey.trim() != "",
        "You need to set API Key",
      ),
      assert(
        urlApi.trim() != "",
        "You need to set a valid url",
      ) {
  _dio = customDio ??
      Dio(
        BaseOptions(
          baseUrl: urlApi,
          queryParameters: {
            'api_token': apiKey
          },
        ),
      );
}