File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed
presentation/feature/profile Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ linter:
25
25
- avoid_types_as_parameter_names
26
26
- avoid_unnecessary_containers
27
27
- avoid_unused_constructor_parameters
28
+ - avoid_void_async
28
29
- await_only_futures
29
30
- camel_case_extensions
30
31
- curly_braces_in_flow_control_structures
Original file line number Diff line number Diff line change @@ -12,8 +12,10 @@ class MetaInterceptor extends InterceptorsWrapper {
12
12
final AppFlavor flavor;
13
13
14
14
@override
15
- void onRequest (
16
- RequestOptions options, RequestInterceptorHandler handler) async {
15
+ Future <void > onRequest (
16
+ RequestOptions options,
17
+ RequestInterceptorHandler handler,
18
+ ) async {
17
19
if (options.headers['Accept' ] == null ) {
18
20
options.headers['Accept' ] = 'application/json; charset=UTF-8' ;
19
21
}
Original file line number Diff line number Diff line change 1
1
import 'package:flutter/material.dart' ;
2
2
import 'package:flutter_template/injection/dependencies.dart' ;
3
3
import 'package:flutter_template/presentation/app.dart' ;
4
+
4
5
import 'presentation/app_flavor.dart' ;
5
6
7
+ // ignore: avoid_void_async
6
8
void mainCommon (AppFlavor flavor) async {
7
9
WidgetsFlutterBinding .ensureInitialized ();
8
10
await DependencyManager .inject (flavor);
Original file line number Diff line number Diff line change @@ -13,11 +13,12 @@ class ProfileCubit extends Cubit<ProfileState> {
13
13
@factoryParam ProfileState ? state,
14
14
}) : super (state ?? ProfileState .initial ());
15
15
16
- void load () async {
16
+ Future < void > load () async {
17
17
if (state.isLoading) return ;
18
18
19
19
emit (state.copyWith (isLoading: true ));
20
- await profileService
20
+
21
+ return profileService
21
22
.getProfileName ()
22
23
.then (
23
24
(value) => emit (
You can’t perform that action at this time.
0 commit comments