forked from firka/flutter
in flutter run, throw tool exit when --flavor is provided but is not supported on the target device (#139045)
Fixes https://github.com/flutter/flutter/issues/134197
This commit is contained in:
@@ -119,9 +119,11 @@ class FakeDevice extends Device {
|
||||
PlatformType type = PlatformType.web,
|
||||
LaunchResult? launchResult,
|
||||
this.deviceLogReader,
|
||||
bool supportsFlavors = false,
|
||||
}) : _isSupported = isSupported,
|
||||
_isSupportedForProject = isSupportedForProject,
|
||||
_launchResult = launchResult ?? LaunchResult.succeeded(),
|
||||
_supportsFlavors = supportsFlavors,
|
||||
super(
|
||||
id,
|
||||
platformType: type,
|
||||
@@ -131,6 +133,7 @@ class FakeDevice extends Device {
|
||||
|
||||
final bool _isSupported;
|
||||
final bool _isSupportedForProject;
|
||||
final bool _supportsFlavors;
|
||||
final LaunchResult _launchResult;
|
||||
DeviceLogReader? deviceLogReader;
|
||||
|
||||
@@ -174,6 +177,9 @@ class FakeDevice extends Device {
|
||||
@override
|
||||
bool isSupported() => _isSupported;
|
||||
|
||||
@override
|
||||
bool get supportsFlavors => _supportsFlavors;
|
||||
|
||||
@override
|
||||
bool isConnected;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user