Skip to content

Commit

Permalink
Fix #21
Browse files Browse the repository at this point in the history
  • Loading branch information
nekocode committed Sep 8, 2020
1 parent 90c132e commit 2552aca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions lib/src/settings/flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ import 'package:yaml/yaml.dart';
class Flutter {
Flutter(YamlMap flutterMap) {
if (flutterMap != null) {
assets = FlutterAssets(safeCast<YamlList>(flutterMap['assets']));
fonts = FlutterFonts(safeCast<YamlList>(flutterMap['fonts']));
if (flutterMap.containsKey('assets')) {
assets = FlutterAssets(safeCast<YamlList>(flutterMap['assets']));
}
if (flutterMap.containsKey('fonts')) {
fonts = FlutterFonts(safeCast<YamlList>(flutterMap['fonts']));
}
}
}

Expand Down
8 changes: 6 additions & 2 deletions lib/src/settings/flutter_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ class FlutterGen {
FlutterGen(YamlMap flutterGenMap) {
if (flutterGenMap != null) {
_output = safeCast<String>(flutterGenMap['output']);
integrations = FlutterGenIntegrations(
if (flutterGenMap.containsKey('integrations')) {
integrations = FlutterGenIntegrations(
safeCast<YamlMap>(flutterGenMap['integrations']));
}
_lineLength = safeCast<int>(flutterGenMap['lineLength']);
colors = FlutterGenColors(safeCast<YamlMap>(flutterGenMap['colors']));
if (flutterGenMap.containsKey('colors')) {
colors = FlutterGenColors(safeCast<YamlMap>(flutterGenMap['colors']));
}
}
}

Expand Down

0 comments on commit 2552aca

Please sign in to comment.