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';
44class Flutter {
55 Flutter (YamlMap flutterMap) {
66 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+ }
913 }
1014 }
1115
Original file line number Diff line number Diff line change @@ -8,10 +8,14 @@ class FlutterGen {
88 FlutterGen (YamlMap flutterGenMap) {
99 if (flutterGenMap != null ) {
1010 _output = safeCast <String >(flutterGenMap['output' ]);
11- integrations = FlutterGenIntegrations (
11+ if (flutterGenMap.containsKey ('integrations' )) {
12+ integrations = FlutterGenIntegrations (
1213 safeCast <YamlMap >(flutterGenMap['integrations' ]));
14+ }
1315 _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+ }
1519 }
1620 }
1721
You can’t perform that action at this time.
0 commit comments