diff --git a/packages/flutter_tools/lib/src/commands/run.dart b/packages/flutter_tools/lib/src/commands/run.dart index 88909281f3628fc2a3d5fa0dedf8fa38491e9ca6..ba03a87ce715c6b2040464e40194fcf5b45e5463 100644 --- a/packages/flutter_tools/lib/src/commands/run.dart +++ b/packages/flutter_tools/lib/src/commands/run.dart @@ -641,7 +641,7 @@ class RunCommand extends RunCommandBase { .every((Device device) => device.supportsFlavors); if (flavor != null && !flavorsSupportedOnEveryDevice) { globals.printWarning( - '--flavor is only supported for Android, macOS, and iOS devices. ' + '--flavor is only supported for Android, macOS, iOS and ohos devices. ' 'Flavor-related features may not function properly and could ' 'behave differently in a future release.' ); diff --git a/packages/flutter_tools/lib/src/ohos/ohos_device.dart b/packages/flutter_tools/lib/src/ohos/ohos_device.dart index 5ab5688595eddc5f6d5ef2613e77e8bc18474e6c..862382abd7d46444daa14cff217721c66bd8157f 100644 --- a/packages/flutter_tools/lib/src/ohos/ohos_device.dart +++ b/packages/flutter_tools/lib/src/ohos/ohos_device.dart @@ -123,6 +123,9 @@ class OhosDevice extends Device { await runHdcCheckedAsync(['shell', 'rm', remotePath]); } + @override + bool get supportsFlavors => true; + Future _installApp(covariant ApplicationPackage app, {String? userIdentifier}) async { if (app is! OhosHap) {