File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,12 @@ import 'package:yaml/yaml.dart';
4
4
class Flutter {
5
5
Flutter (YamlMap flutterMap) {
6
6
if (flutterMap != null ) {
7
- assets = FlutterAssets (safeCast <YamlList >(flutterMap['assets' ]));
8
- fonts = FlutterFonts (safeCast <YamlList >(flutterMap['fonts' ]));
7
+ if (flutterMap.containsKey ('assets' )) {
8
+ assets = FlutterAssets (safeCast <YamlList >(flutterMap['assets' ]));
9
+ }
10
+ if (flutterMap.containsKey ('fonts' )) {
11
+ fonts = FlutterFonts (safeCast <YamlList >(flutterMap['fonts' ]));
12
+ }
9
13
}
10
14
}
11
15
Original file line number Diff line number Diff line change @@ -8,10 +8,14 @@ class FlutterGen {
8
8
FlutterGen (YamlMap flutterGenMap) {
9
9
if (flutterGenMap != null ) {
10
10
_output = safeCast <String >(flutterGenMap['output' ]);
11
- integrations = FlutterGenIntegrations (
11
+ if (flutterGenMap.containsKey ('integrations' )) {
12
+ integrations = FlutterGenIntegrations (
12
13
safeCast <YamlMap >(flutterGenMap['integrations' ]));
14
+ }
13
15
_lineLength = safeCast <int >(flutterGenMap['lineLength' ]);
14
- colors = FlutterGenColors (safeCast <YamlMap >(flutterGenMap['colors' ]));
16
+ if (flutterGenMap.containsKey ('colors' )) {
17
+ colors = FlutterGenColors (safeCast <YamlMap >(flutterGenMap['colors' ]));
18
+ }
15
19
}
16
20
}
17
21
You can’t perform that action at this time.
0 commit comments