[flutter_tools] Fix local engine preview device (#138046)
Fixes https://github.com/flutter/flutter/issues/137982
This commit is contained in:
committed by
GitHub
parent
e7246898b0
commit
89692884a1
@@ -1028,7 +1028,12 @@ class CachedLocalEngineArtifacts implements Artifacts {
|
||||
case Artifact.flutterToolsFileGenerators:
|
||||
return _getFileGeneratorsPath();
|
||||
case Artifact.flutterPreviewDevice:
|
||||
throw UnimplementedError('The preview device is not supported with local engine builds');
|
||||
return _backupCache.getArtifactPath(
|
||||
artifact,
|
||||
platform: platform,
|
||||
mode: mode,
|
||||
environmentType: environmentType,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -329,6 +329,14 @@ void main() {
|
||||
'snapshots', 'frontend_server_aot.dart.snapshot')
|
||||
);
|
||||
|
||||
expect(
|
||||
artifacts.getArtifactPath(
|
||||
Artifact.flutterPreviewDevice,
|
||||
platform: TargetPlatform.windows_x64,
|
||||
),
|
||||
fileSystem.path.join('root', 'bin', 'cache', 'artifacts',
|
||||
'flutter_preview', 'flutter_preview.exe'),
|
||||
);
|
||||
|
||||
fileSystem.file(fileSystem.path.join('/out', 'host_debug_unopt', 'impellerc'))
|
||||
.createSync(recursive: true);
|
||||
|
||||
Reference in New Issue
Block a user