[flutter_tools] update pubspec .yaml message should not be displayed when creating a new plugin (#62599)

* update pubspec message should not be displayed when creating a new plugin

* formatting

* revikew

* review

* cleanup
This commit is contained in:
Chris Yang
2020-07-30 13:49:15 -07:00
committed by GitHub
parent fbd29b8880
commit 48fab86c6e
2 changed files with 34 additions and 1 deletions

View File

@@ -612,7 +612,9 @@ To edit platform code in an IDE see https://flutter.dev/developing-packages/#edi
);
}
if (willAddPlatforms) {
final bool addPlatformsToExistingPlugin = willAddPlatforms && existingPlatforms.isNotEmpty;
if (addPlatformsToExistingPlugin) {
// If adding new platforms to an existing plugin project, prints
// a help message containing the platforms maps need to be added to the `platforms` key in the pubspec.
platformsToAdd.removeWhere(existingPlatforms.contains);