Do not show plugin embedding warning with missing example app (#76406)

This commit is contained in:
Jenn Magder
2021-02-19 17:41:02 -08:00
committed by GitHub
parent c6a74e0a5e
commit 841f2e082e
2 changed files with 13 additions and 1 deletions

View File

@@ -217,6 +217,9 @@ class FlutterProject {
/// True if this project is a Flutter module project.
bool get isModule => manifest.isModule;
/// True if this project is a Flutter plugin project.
bool get isPlugin => manifest.isPlugin;
/// True if the Flutter project is using the AndroidX support library.
bool get usesAndroidX => manifest.usesAndroidX;
@@ -285,7 +288,7 @@ class FlutterProject {
bool windowsPlatform = false,
bool webPlatform = false,
}) async {
if (!directory.existsSync() || hasExampleApp) {
if (!directory.existsSync() || hasExampleApp || isPlugin) {
return;
}
await refreshPluginsList(this, iosPlatform: iosPlatform, macOSPlatform: macOSPlatform);