Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused baseUrl parameter warning fix #677

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

SaurabhS120
Copy link
Contributor

@SaurabhS120 SaurabhS120 commented Jun 5, 2024

#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';
  }

trevorwang#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
@trevorwang trevorwang merged commit c580410 into trevorwang:master Jul 2, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants