Skip to content

Commit

Permalink
refactor(http_client): using const
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanaidilp committed Jul 29, 2024
1 parent 81d51b7 commit 512753a
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ class HttpClient extends DioMixin {
}

// ignore: prefer_constructors_over_static_methods
static HttpClient init([HttpSetting? setting]) {
return HttpClient._(setting ?? HttpSetting(baseUrl: Env.apiBaseUrl));
}
static HttpClient init([HttpSetting? setting]) => HttpClient._(
setting ??
const HttpSetting(
baseUrl: Env.apiBaseUrl,
),
);

static List<Interceptor> defaultInterceptors = [
if (kDebugMode) LoggingInterceptor(),
Expand Down

0 comments on commit 512753a

Please sign in to comment.