File tree 1 file changed +13
-14
lines changed 1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -34,21 +34,20 @@ class FlutterGenBuilder extends Builder {
34
34
35
35
@override
36
36
Future <void > build (BuildStep buildStep) async {
37
- if (_config == null ) {
38
- return ;
39
- }
40
- final state = await _createState (_config, buildStep);
41
- if (state.shouldSkipGenerate (_currentState)) {
42
- return ;
37
+ if (_config case final config? ) {
38
+ final state = await _createState (config, buildStep);
39
+ if (state.shouldSkipGenerate (_currentState)) {
40
+ return ;
41
+ }
42
+ _currentState = state;
43
+
44
+ await generator.build (
45
+ config: config,
46
+ writer: (contents, path) {
47
+ buildStep.writeAsString (_output (buildStep, path), contents);
48
+ },
49
+ );
43
50
}
44
- _currentState = state;
45
-
46
- await generator.build (
47
- config: _config,
48
- writer: (contents, path) {
49
- buildStep.writeAsString (_output (buildStep, path), contents);
50
- },
51
- );
52
51
}
53
52
54
53
@override
You can’t perform that action at this time.
0 commit comments