Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
895879c1
Unverified
Commit
895879c1
authored
Apr 12, 2023
by
Kevin Moore
Committed by
GitHub
Apr 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flutter_tools: Flutter Web CLI cleanup (#124564)
flutter_tools: Flutter Web CLI cleanup
parent
328635b3
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
71 additions
and
80 deletions
+71
-80
build_info.dart
packages/flutter_tools/lib/src/build_info.dart
+1
-1
devfs_web.dart
packages/flutter_tools/lib/src/isolated/devfs_web.dart
+1
-1
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+6
-47
compile.dart
packages/flutter_tools/lib/src/web/compile.dart
+36
-4
run_test.dart
.../flutter_tools/test/commands.shard/hermetic/run_test.dart
+2
-2
web_test.dart
...ols/test/general.shard/build_system/targets/web_test.dart
+23
-23
compile_web_test.dart
...lutter_tools/test/general.shard/web/compile_web_test.dart
+1
-1
devfs_web_test.dart
.../flutter_tools/test/general.shard/web/devfs_web_test.dart
+1
-1
No files found.
packages/flutter_tools/lib/src/build_info.dart
View file @
895879c1
...
...
@@ -35,7 +35,7 @@ class BuildInfo {
List
<
String
>?
dartDefines
,
this
.
bundleSkSLPath
,
List
<
String
>?
dartExperiments
,
this
.
webRenderer
=
WebRendererMode
.
auto
Detect
,
this
.
webRenderer
=
WebRendererMode
.
auto
,
required
this
.
treeShakeIcons
,
this
.
performanceMeasurementFile
,
this
.
dartDefineConfigJsonMap
,
...
...
packages/flutter_tools/lib/src/isolated/devfs_web.dart
View file @
895879c1
...
...
@@ -778,7 +778,7 @@ class WebDevFS implements DevFS {
final
int
selectedPort
=
webAssetServer
.
selectedPort
;
if
(
buildInfo
.
dartDefines
.
contains
(
'FLUTTER_WEB_AUTO_DETECT=true'
))
{
webAssetServer
.
webRenderer
=
WebRendererMode
.
auto
Detect
;
webAssetServer
.
webRenderer
=
WebRendererMode
.
auto
;
}
else
if
(
buildInfo
.
dartDefines
.
contains
(
'FLUTTER_WEB_USE_SKIA=true'
))
{
webAssetServer
.
webRenderer
=
WebRendererMode
.
canvaskit
;
}
...
...
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
895879c1
...
...
@@ -157,36 +157,6 @@ abstract class FlutterCommand extends Command<void> {
/// The flag name for whether or not to use ipv6.
static
const
String
ipv6Flag
=
'ipv6'
;
/// Maps command line web renderer strings to the corresponding web renderer mode
static
const
Map
<
String
,
WebRendererMode
>
_webRendererModeMap
=
<
String
,
WebRendererMode
>
{
'auto'
:
WebRendererMode
.
autoDetect
,
'canvaskit'
:
WebRendererMode
.
canvaskit
,
'html'
:
WebRendererMode
.
html
,
'skwasm'
:
WebRendererMode
.
skwasm
,
};
/// The map used to convert web renderer mode to a List of dart-defines.
static
const
Map
<
WebRendererMode
,
Iterable
<
String
>>
_webRendererDartDefines
=
<
WebRendererMode
,
Iterable
<
String
>>
{
WebRendererMode
.
autoDetect
:
<
String
>[
'FLUTTER_WEB_AUTO_DETECT=true'
,
],
WebRendererMode
.
canvaskit
:
<
String
>[
'FLUTTER_WEB_AUTO_DETECT=false'
,
'FLUTTER_WEB_USE_SKIA=true'
,
],
WebRendererMode
.
html
:
<
String
>[
'FLUTTER_WEB_AUTO_DETECT=false'
,
'FLUTTER_WEB_USE_SKIA=false'
,
],
WebRendererMode
.
skwasm
:
<
String
>[
'FLUTTER_WEB_AUTO_DETECT=false'
,
'FLUTTER_WEB_USE_SKIA=false'
,
'FLUTTER_WEB_USE_SKWASM=true'
,
]
};
@override
ArgParser
get
argParser
=>
_argParser
;
final
ArgParser
_argParser
=
ArgParser
(
...
...
@@ -668,15 +638,10 @@ abstract class FlutterCommand extends Command<void> {
void
usesWebRendererOption
()
{
argParser
.
addOption
(
FlutterOptions
.
kWebRendererFlag
,
defaultsTo:
'auto'
,
allowed:
<
String
>[
'auto'
,
'canvaskit'
,
'html'
,
'skwasm'
]
,
defaultsTo:
WebRendererMode
.
auto
.
name
,
allowed:
WebRendererMode
.
values
.
map
((
WebRendererMode
e
)
=>
e
.
name
)
,
help:
'The renderer implementation to use when building for the web.'
,
allowedHelp:
<
String
,
String
>{
'html'
:
'Always use the HTML renderer. This renderer uses a combination of HTML, CSS, SVG, 2D Canvas, and WebGL.'
,
'canvaskit'
:
'Always use the CanvasKit renderer. This renderer uses WebGL and WebAssembly to render graphics.'
,
'auto'
:
'Use the HTML renderer on mobile devices, and CanvasKit on desktop devices.'
,
'skwasm'
:
'Always use the experimental skwasm renderer.'
,
}
allowedHelp:
Map
<
String
,
String
>.
fromEntries
(
WebRendererMode
.
values
.
map
((
WebRendererMode
e
)
=>
MapEntry
<
String
,
String
>(
e
.
name
,
e
.
helpText
)))
);
}
...
...
@@ -1236,12 +1201,9 @@ abstract class FlutterCommand extends Command<void> {
final
Map
<
String
,
Object
>?
defineConfigJsonMap
=
extractDartDefineConfigJsonMap
();
List
<
String
>
dartDefines
=
extractDartDefines
(
defineConfigJsonMap:
defineConfigJsonMap
);
WebRendererMode
webRenderer
=
WebRendererMode
.
auto
Detect
;
WebRendererMode
webRenderer
=
WebRendererMode
.
auto
;
if
(
argParser
.
options
.
containsKey
(
FlutterOptions
.
kWebRendererFlag
))
{
final
WebRendererMode
?
mappedMode
=
_webRendererModeMap
[
stringArg
(
FlutterOptions
.
kWebRendererFlag
)!];
if
(
mappedMode
!=
null
)
{
webRenderer
=
mappedMode
;
}
webRenderer
=
WebRendererMode
.
values
.
byName
(
stringArg
(
FlutterOptions
.
kWebRendererFlag
)!);
dartDefines
=
updateDartDefines
(
dartDefines
,
webRenderer
);
}
...
...
@@ -1427,10 +1389,7 @@ abstract class FlutterCommand extends Command<void> {
&&
dartDefines
.
any
((
String
d
)
=>
d
.
startsWith
(
'FLUTTER_WEB_USE_SKIA='
)))
{
dartDefinesSet
.
removeWhere
((
String
d
)
=>
d
.
startsWith
(
'FLUTTER_WEB_USE_SKIA='
));
}
final
Iterable
<
String
>?
webRendererDefine
=
_webRendererDartDefines
[
webRenderer
];
if
(
webRendererDefine
!=
null
)
{
dartDefinesSet
.
addAll
(
webRendererDefine
);
}
dartDefinesSet
.
addAll
(
webRenderer
.
dartDefines
);
return
dartDefinesSet
.
toList
();
}
...
...
packages/flutter_tools/lib/src/web/compile.dart
View file @
895879c1
...
...
@@ -135,18 +135,50 @@ class WebBuilder {
/// Web rendering backend mode.
enum
WebRendererMode
{
/// Auto detects which rendering backend to use.
autoDetect
,
auto
,
/// Always uses canvaskit.
canvaskit
,
/// Always uses html.
html
,
/// Always use skwasm.
skwasm
,
skwasm
;
String
get
helpText
=>
switch
(
this
)
{
auto
=>
'Use the HTML renderer on mobile devices, and CanvasKit on desktop devices.'
,
canvaskit
=>
'Always use the CanvasKit renderer. This renderer uses WebGL and WebAssembly to render graphics.'
,
html
=>
'Always use the HTML renderer. This renderer uses a combination of HTML, CSS, SVG, 2D Canvas, and WebGL.'
,
skwasm
=>
'Always use the experimental skwasm renderer.'
};
Iterable
<
String
>
get
dartDefines
=>
switch
(
this
)
{
WebRendererMode
.
auto
=>
<
String
>[
'FLUTTER_WEB_AUTO_DETECT=true'
,
],
WebRendererMode
.
canvaskit
=>
<
String
>[
'FLUTTER_WEB_AUTO_DETECT=false'
,
'FLUTTER_WEB_USE_SKIA=true'
,
],
WebRendererMode
.
html
=>
<
String
>[
'FLUTTER_WEB_AUTO_DETECT=false'
,
'FLUTTER_WEB_USE_SKIA=false'
,
],
WebRendererMode
.
skwasm
=>
<
String
>[
'FLUTTER_WEB_AUTO_DETECT=false'
,
'FLUTTER_WEB_USE_SKIA=false'
,
'FLUTTER_WEB_USE_SKWASM=true'
,
]
};
}
/// The correct precompiled artifact to use for each build and render mode.
const
Map
<
WebRendererMode
,
Map
<
NullSafetyMode
,
HostArtifact
>>
kDartSdkJsArtifactMap
=
<
WebRendererMode
,
Map
<
NullSafetyMode
,
HostArtifact
>>{
WebRendererMode
.
auto
Detect
:
<
NullSafetyMode
,
HostArtifact
>
{
WebRendererMode
.
auto
:
<
NullSafetyMode
,
HostArtifact
>
{
NullSafetyMode
.
sound
:
HostArtifact
.
webPrecompiledCanvaskitAndHtmlSoundSdk
,
NullSafetyMode
.
unsound
:
HostArtifact
.
webPrecompiledCanvaskitAndHtmlSdk
,
},
...
...
@@ -162,7 +194,7 @@ const Map<WebRendererMode, Map<NullSafetyMode, HostArtifact>> kDartSdkJsArtifact
/// The correct source map artifact to use for each build and render mode.
const
Map
<
WebRendererMode
,
Map
<
NullSafetyMode
,
HostArtifact
>>
kDartSdkJsMapArtifactMap
=
<
WebRendererMode
,
Map
<
NullSafetyMode
,
HostArtifact
>>{
WebRendererMode
.
auto
Detect
:
<
NullSafetyMode
,
HostArtifact
>
{
WebRendererMode
.
auto
:
<
NullSafetyMode
,
HostArtifact
>
{
NullSafetyMode
.
sound
:
HostArtifact
.
webPrecompiledCanvaskitAndHtmlSoundSdkSourcemaps
,
NullSafetyMode
.
unsound
:
HostArtifact
.
webPrecompiledCanvaskitAndHtmlSdkSourcemaps
,
},
...
...
packages/flutter_tools/test/commands.shard/hermetic/run_test.dart
View file @
895879c1
...
...
@@ -929,7 +929,7 @@ void main() {
});
test
(
'auto web-renderer with no dart-defines'
,
()
{
dartDefines
=
FlutterCommand
.
updateDartDefines
(
dartDefines
,
WebRendererMode
.
auto
Detect
);
dartDefines
=
FlutterCommand
.
updateDartDefines
(
dartDefines
,
WebRendererMode
.
auto
);
expect
(
dartDefines
,
<
String
>[
'FLUTTER_WEB_AUTO_DETECT=true'
]);
});
...
...
@@ -945,7 +945,7 @@ void main() {
test
(
'auto web-renderer with existing dart-defines'
,
()
{
dartDefines
=
<
String
>[
'FLUTTER_WEB_USE_SKIA=false'
];
dartDefines
=
FlutterCommand
.
updateDartDefines
(
dartDefines
,
WebRendererMode
.
auto
Detect
);
dartDefines
=
FlutterCommand
.
updateDartDefines
(
dartDefines
,
WebRendererMode
.
auto
);
expect
(
dartDefines
,
<
String
>[
'FLUTTER_WEB_AUTO_DETECT=true'
]);
});
...
...
packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart
View file @
895879c1
...
...
@@ -101,7 +101,7 @@ void main() {
webResources
.
childFile
(
'index.html'
)
.
createSync
(
recursive:
true
);
environment
.
buildDir
.
childFile
(
'main.dart.js'
).
createSync
();
await
const
WebReleaseBundle
(
WebRendererMode
.
auto
Detect
,
isWasm:
false
).
build
(
environment
);
await
const
WebReleaseBundle
(
WebRendererMode
.
auto
,
isWasm:
false
).
build
(
environment
);
expect
(
environment
.
outputDir
.
childFile
(
'version.json'
),
exists
);
}));
...
...
@@ -113,7 +113,7 @@ void main() {
final
Directory
webResources
=
environment
.
projectDir
.
childDirectory
(
'web'
);
webResources
.
childFile
(
'index.html'
).
createSync
(
recursive:
true
);
environment
.
buildDir
.
childFile
(
'main.dart.js'
).
createSync
();
await
const
WebReleaseBundle
(
WebRendererMode
.
auto
Detect
,
isWasm:
false
).
build
(
environment
);
await
const
WebReleaseBundle
(
WebRendererMode
.
auto
,
isWasm:
false
).
build
(
environment
);
final
String
versionFile
=
environment
.
outputDir
.
childFile
(
'version.json'
)
...
...
@@ -131,7 +131,7 @@ void main() {
<!DOCTYPE html><html><base href="
$kBaseHrefPlaceholder
"><head></head></html>
'''
);
environment
.
buildDir
.
childFile
(
'main.dart.js'
).
createSync
();
await
const
WebReleaseBundle
(
WebRendererMode
.
auto
Detect
,
isWasm:
false
).
build
(
environment
);
await
const
WebReleaseBundle
(
WebRendererMode
.
auto
,
isWasm:
false
).
build
(
environment
);
expect
(
environment
.
outputDir
.
childFile
(
'index.html'
).
readAsStringSync
(),
contains
(
'/basehreftest/'
));
}));
...
...
@@ -144,7 +144,7 @@ void main() {
<!DOCTYPE html><html><head><base href='
/
basehreftest
/
'></head></html>
'''
);
environment
.
buildDir
.
childFile
(
'main.dart.js'
).
createSync
();
await
const
WebReleaseBundle
(
WebRendererMode
.
auto
Detect
,
isWasm:
false
).
build
(
environment
);
await
const
WebReleaseBundle
(
WebRendererMode
.
auto
,
isWasm:
false
).
build
(
environment
);
expect
(
environment
.
outputDir
.
childFile
(
'index.html'
).
readAsStringSync
(),
contains
(
'/basehreftest/'
));
}));
...
...
@@ -166,7 +166,7 @@ void main() {
.
writeAsStringSync
(
'A'
);
environment
.
buildDir
.
childFile
(
'main.dart.js'
).
createSync
();
await
const
WebReleaseBundle
(
WebRendererMode
.
auto
Detect
,
isWasm:
false
).
build
(
environment
);
await
const
WebReleaseBundle
(
WebRendererMode
.
auto
,
isWasm:
false
).
build
(
environment
);
expect
(
environment
.
outputDir
.
childFile
(
'foo.txt'
)
.
readAsStringSync
(),
'A'
);
...
...
@@ -178,7 +178,7 @@ void main() {
// Update to arbitrary resource file triggers rebuild.
webResources
.
childFile
(
'foo.txt'
).
writeAsStringSync
(
'B'
);
await
const
WebReleaseBundle
(
WebRendererMode
.
auto
Detect
,
isWasm:
false
).
build
(
environment
);
await
const
WebReleaseBundle
(
WebRendererMode
.
auto
,
isWasm:
false
).
build
(
environment
);
expect
(
environment
.
outputDir
.
childFile
(
'foo.txt'
)
.
readAsStringSync
(),
'B'
);
...
...
@@ -361,7 +361,7 @@ void main() {
]
));
await
Dart2JSTarget
(
WebRendererMode
.
auto
Detect
).
build
(
environment
);
await
Dart2JSTarget
(
WebRendererMode
.
auto
).
build
(
environment
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
processManager
,
}));
...
...
@@ -401,7 +401,7 @@ void main() {
]
));
await
Dart2JSTarget
(
WebRendererMode
.
auto
Detect
).
build
(
environment
);
await
Dart2JSTarget
(
WebRendererMode
.
auto
).
build
(
environment
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
processManager
,
}));
...
...
@@ -437,7 +437,7 @@ void main() {
]
));
await
Dart2JSTarget
(
WebRendererMode
.
auto
Detect
).
build
(
environment
);
await
Dart2JSTarget
(
WebRendererMode
.
auto
).
build
(
environment
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
processManager
,
}));
...
...
@@ -472,7 +472,7 @@ void main() {
]
));
await
Dart2JSTarget
(
WebRendererMode
.
auto
Detect
).
build
(
environment
);
await
Dart2JSTarget
(
WebRendererMode
.
auto
).
build
(
environment
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
processManager
,
}));
...
...
@@ -510,7 +510,7 @@ void main() {
]
));
await
Dart2JSTarget
(
WebRendererMode
.
auto
Detect
).
build
(
environment
);
await
Dart2JSTarget
(
WebRendererMode
.
auto
).
build
(
environment
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
processManager
,
}));
...
...
@@ -546,7 +546,7 @@ void main() {
]
));
await
Dart2JSTarget
(
WebRendererMode
.
auto
Detect
).
build
(
environment
);
await
Dart2JSTarget
(
WebRendererMode
.
auto
).
build
(
environment
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
processManager
,
}));
...
...
@@ -570,7 +570,7 @@ void main() {
.
writeAsStringSync
(
'file:///a.dart'
);
},
));
await
Dart2JSTarget
(
WebRendererMode
.
auto
Detect
).
build
(
environment
);
await
Dart2JSTarget
(
WebRendererMode
.
auto
).
build
(
environment
);
expect
(
environment
.
buildDir
.
childFile
(
'dart2js.d'
),
exists
);
final
Depfile
depfile
=
depfileService
.
parse
(
environment
.
buildDir
.
childFile
(
'dart2js.d'
));
...
...
@@ -617,7 +617,7 @@ void main() {
]
));
await
Dart2JSTarget
(
WebRendererMode
.
auto
Detect
).
build
(
environment
);
await
Dart2JSTarget
(
WebRendererMode
.
auto
).
build
(
environment
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
processManager
,
}));
...
...
@@ -651,7 +651,7 @@ void main() {
]
));
await
Dart2JSTarget
(
WebRendererMode
.
auto
Detect
).
build
(
environment
);
await
Dart2JSTarget
(
WebRendererMode
.
auto
).
build
(
environment
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
processManager
,
}));
...
...
@@ -693,7 +693,7 @@ void main() {
]
));
await
Dart2JSTarget
(
WebRendererMode
.
auto
Detect
).
build
(
environment
);
await
Dart2JSTarget
(
WebRendererMode
.
auto
).
build
(
environment
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
processManager
,
}));
...
...
@@ -922,7 +922,7 @@ void main() {
environment
.
outputDir
.
childDirectory
(
'a'
).
childFile
(
'a.txt'
)
..
createSync
(
recursive:
true
)
..
writeAsStringSync
(
'A'
);
await
WebServiceWorker
(
globals
.
fs
,
WebRendererMode
.
auto
Detect
,
isWasm:
false
).
build
(
environment
);
await
WebServiceWorker
(
globals
.
fs
,
WebRendererMode
.
auto
,
isWasm:
false
).
build
(
environment
);
expect
(
environment
.
outputDir
.
childFile
(
'flutter_service_worker.js'
),
exists
);
// Contains file hash.
...
...
@@ -941,7 +941,7 @@ void main() {
environment
.
outputDir
.
childFile
(
'index.html'
)
.
createSync
(
recursive:
true
);
await
WebServiceWorker
(
globals
.
fs
,
WebRendererMode
.
auto
Detect
,
isWasm:
false
).
build
(
environment
);
await
WebServiceWorker
(
globals
.
fs
,
WebRendererMode
.
auto
,
isWasm:
false
).
build
(
environment
);
expect
(
environment
.
outputDir
.
childFile
(
'flutter_service_worker.js'
),
exists
);
// Contains file hash for both `/` and index.html.
...
...
@@ -959,7 +959,7 @@ void main() {
environment
.
outputDir
.
childFile
(
'main.dart.js.map'
)
.
createSync
(
recursive:
true
);
await
WebServiceWorker
(
globals
.
fs
,
WebRendererMode
.
auto
Detect
,
isWasm:
false
).
build
(
environment
);
await
WebServiceWorker
(
globals
.
fs
,
WebRendererMode
.
auto
,
isWasm:
false
).
build
(
environment
);
// No caching of source maps.
expect
(
environment
.
outputDir
.
childFile
(
'flutter_service_worker.js'
).
readAsStringSync
(),
...
...
@@ -991,7 +991,7 @@ void main() {
..
createSync
(
recursive:
true
)
..
writeAsStringSync
(
'OL'
);
await
WebBuiltInAssets
(
globals
.
fs
,
WebRendererMode
.
auto
Detect
,
isWasm:
false
).
build
(
environment
);
await
WebBuiltInAssets
(
globals
.
fs
,
WebRendererMode
.
auto
,
isWasm:
false
).
build
(
environment
);
// No caching of source maps.
final
String
fileGeneratorsPath
=
environment
.
artifacts
...
...
@@ -1008,7 +1008,7 @@ void main() {
globals
.
fs
.
file
(
'bin/cache/flutter_web_sdk/canvaskit/canvaskit.wasm'
)
.
createSync
(
recursive:
true
);
await
WebBuiltInAssets
(
globals
.
fs
,
WebRendererMode
.
auto
Detect
,
isWasm:
true
).
build
(
environment
);
await
WebBuiltInAssets
(
globals
.
fs
,
WebRendererMode
.
auto
,
isWasm:
true
).
build
(
environment
);
expect
(
environment
.
outputDir
.
childFile
(
'main.dart.js'
).
existsSync
(),
true
);
expect
(
environment
.
outputDir
.
childDirectory
(
'canvaskit'
)
...
...
@@ -1021,7 +1021,7 @@ void main() {
..
createSync
(
recursive:
true
);
canvasKitInput
.
writeAsStringSync
(
'foo'
,
flush:
true
);
await
WebBuiltInAssets
(
globals
.
fs
,
WebRendererMode
.
auto
Detect
,
isWasm:
true
).
build
(
environment
);
await
WebBuiltInAssets
(
globals
.
fs
,
WebRendererMode
.
auto
,
isWasm:
true
).
build
(
environment
);
final
File
canvasKitOutputBefore
=
environment
.
outputDir
.
childDirectory
(
'canvaskit'
)
.
childFile
(
'canvaskit.wasm'
);
...
...
@@ -1030,7 +1030,7 @@ void main() {
canvasKitInput
.
writeAsStringSync
(
'bar'
,
flush:
true
);
await
WebBuiltInAssets
(
globals
.
fs
,
WebRendererMode
.
auto
Detect
,
isWasm:
true
).
build
(
environment
);
await
WebBuiltInAssets
(
globals
.
fs
,
WebRendererMode
.
auto
,
isWasm:
true
).
build
(
environment
);
final
File
canvasKitOutputAfter
=
environment
.
outputDir
.
childDirectory
(
'canvaskit'
)
.
childFile
(
'canvaskit.wasm'
);
...
...
packages/flutter_tools/test/general.shard/web/compile_web_test.dart
View file @
895879c1
...
...
@@ -39,7 +39,7 @@ void main() {
TestBuildSystem
.
all
(
BuildResult
(
success:
true
),
(
Target
target
,
Environment
environment
)
{
final
WebServiceWorker
webServiceWorker
=
target
as
WebServiceWorker
;
expect
(
webServiceWorker
.
isWasm
,
isTrue
,
reason:
'should be wasm'
);
expect
(
webServiceWorker
.
webRenderer
,
WebRendererMode
.
auto
Detect
);
expect
(
webServiceWorker
.
webRenderer
,
WebRendererMode
.
auto
);
expect
(
environment
.
defines
,
<
String
,
String
>{
'TargetFile'
:
'target'
,
...
...
packages/flutter_tools/test/general.shard/web/devfs_web_test.dart
View file @
895879c1
...
...
@@ -1052,7 +1052,7 @@ void main() {
await
webDevFS
.
create
();
expect
(
webDevFS
.
webAssetServer
.
webRenderer
,
WebRendererMode
.
auto
Detect
);
expect
(
webDevFS
.
webAssetServer
.
webRenderer
,
WebRendererMode
.
auto
);
await
webDevFS
.
destroy
();
}));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment