Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
Fix PBFlutterWriter returning too early.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-015 committed Mar 21, 2022
1 parent d5b7098 commit 93e91a0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/generation/generators/writers/pb_flutter_writer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,8 @@ class MyApp extends StatelessWidget {
}

/// Add assets
if (modifiableyaml.containsKey('flutter')) {
var assets = _getAssetFileNames();

/// If there are no assets to add, simply return.
if (assets.isEmpty) {
return;
}

var assets = _getAssetFileNames();
if (modifiableyaml.containsKey('flutter') && assets.isNotEmpty) {
/// Add only elements that are not already in the yaml
if (modifiableyaml['flutter'].containsKey('assets') &&
modifiableyaml['flutter']['assets'] != null) {
Expand Down

0 comments on commit 93e91a0

Please sign in to comment.