retrofit.dart
retrofit.dart copied to clipboard
Unused baseUrl parameter warning fix
#676 I am passing baseUrl through @RestApi
, it is showing a warning that I am not using the baseUrl parameter from the Auto-generated(g.dart) file
With the following comment, this issue can be resolved
// ignore_for_file: unused_element
Output after change:
part of 'api_service.dart';
// **************************************************************************
// RetrofitGenerator
// **************************************************************************
// ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers,unused_element
class _ApiService implements ApiService {
_ApiService(
this._dio, {
this.baseUrl,
}) {
baseUrl ??= 'https://fakestoreapi.com';
}