Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
4df8f73
Roll Packages from 1785501174f3 to 252bb33ad366 (6 revisions) (#191480)
engine-flutter-autoroll Aug 21, 2026
3512ebe
Roll Skia from 70988bed1b3b to f6900c5b8439 (2 revisions) (#191481)
engine-flutter-autoroll Aug 21, 2026
e210443
[flutter_tools] Deprecate --build and --no-build flags on flutter run…
bkonyi Aug 21, 2026
8bb6d75
[Widget Preview] Isolate PageStorage scope in widget preview group ex…
bkonyi Aug 21, 2026
e1c692d
Roll Fuchsia Linux SDK from GCQlmt6h-esJsNubS... to ic6GjOSn-KN508XyK…
engine-flutter-autoroll Aug 21, 2026
27f8676
[web] Move CanvasKit fragment shader classes to canvaskit/fragment_sh…
harryterkelsen Aug 21, 2026
4bb854b
tools: Extract Dart SDK to temp directory before moving to final loca…
bkonyi Aug 21, 2026
3479680
[flutter_tools] refactor CLI argument architecture with typed option …
kevmoo Aug 21, 2026
7c25794
[rules] Add packages/flutter_tools/gradle/AGENTS.md rules (#191486)
reidbaker-agent Aug 21, 2026
9479bb7
[flutter_tools] Fix crash when migrating flow-style exclude lists in …
bkonyi Aug 21, 2026
d525d4d
Refactor `FlutterDevice.connect` and VM service discovery (#191221)
bkonyi Aug 21, 2026
9df0f58
Roll Skia from f6900c5b8439 to 0c37868737fa (2 revisions) (#191504)
engine-flutter-autoroll Aug 21, 2026
7c0ccea
[flutter_tools] Restrict WebAssetServer source resolution to source m…
bkonyi Aug 21, 2026
0cb32fd
Fixes windows gallery benchmarks by forcing mobile layout (#191507)
gaaclarke Aug 21, 2026
6391d39
Revert "[input] Migrate fuchsia.ui.pointerinjector to TouchSource (#1…
caroqliu Aug 21, 2026
a3191ed
Roll Skia from 0c37868737fa to 666a9b3d5cf0 (2 revisions) (#191518)
engine-flutter-autoroll Aug 22, 2026
915812c
[flutter_tools] Add tests for negative lookahead regex in test runner…
bkonyi Aug 22, 2026
f1374f5
Roll Fuchsia Test Scripts from KaOq3EE4qJ9fnaaaK... to 0iCv10IlKfiilE…
engine-flutter-autoroll Aug 22, 2026
68d6be5
Roll Skia from 666a9b3d5cf0 to ad2106c0bb64 (3 revisions) (#191527)
engine-flutter-autoroll Aug 22, 2026
65c9a8d
Roll ICU from d578f2e8b7bd to 8cc91d9b6ab9 (1 revision) (#191542)
engine-flutter-autoroll Aug 22, 2026
83a64de
[WebParagraph] Fixing minor problem with getBoxesForRange (#191419)
Rusino Aug 22, 2026
4ebf37f
Roll Fuchsia Linux SDK from ic6GjOSn-KN508XyK... to Cqs-NyeELd60hqv1e…
engine-flutter-autoroll Aug 22, 2026
59150b3
Roll Skia from ad2106c0bb64 to a1825062f832 (1 revision) (#191555)
engine-flutter-autoroll Aug 23, 2026
64e1cfe
Roll Skia from a1825062f832 to 886302c7c68e (1 revision) (#191559)
engine-flutter-autoroll Aug 23, 2026
1f2af33
Remove Material/Cupertino references in error messages (#191305)
justinmc Aug 23, 2026
5f97c7f
Fixes MSAA on the linux embedder. (#191379)
gaaclarke Aug 23, 2026
7d219de
Roll Fuchsia Linux SDK from Cqs-NyeELd60hqv1e... to 8Xu4ujBJniC0nQGx3…
engine-flutter-autoroll Aug 23, 2026
a6d9dcd
Revert "Improve initial size and placement logic for popups and toolt…
mattkae Aug 24, 2026
49d0823
Roll Skia from 886302c7c68e to c78782c7c1c2 (1 revision) (#191566)
engine-flutter-autoroll Aug 24, 2026
71edf97
Roll Skia from c78782c7c1c2 to 925e13559532 (5 revisions) (#191568)
engine-flutter-autoroll Aug 24, 2026
3eabedf
iOS: Improve FlutterEngineGroup tests (#191563)
cbracken Aug 24, 2026
b4755fd
iOS: Add stylus pointer tests (#191564)
cbracken Aug 24, 2026
e6bc184
Roll Skia from 925e13559532 to 50452b13f05b (2 revisions) (#191570)
engine-flutter-autoroll Aug 24, 2026
ed21324
Move more RSE rendering cases to complex_rse.frag (#191235)
walley892 Aug 24, 2026
800eb02
Roll Skia from 50452b13f05b to 57968d087d18 (1 revision) (#191572)
engine-flutter-autoroll Aug 24, 2026
a48daa0
Roll Dart SDK from cb056da580b6 to 78bbc37b6ff6 (13 revisions) (#191574)
engine-flutter-autoroll Aug 24, 2026
9a82789
Roll Packages from 252bb33ad366 to df2ba94faea6 (5 revisions) (#191578)
engine-flutter-autoroll Aug 24, 2026
0b1bac2
Roll Skia from 57968d087d18 to 698c60bf58f1 (1 revision) (#191577)
engine-flutter-autoroll Aug 24, 2026
57e47bd
[flutter_tools] Add --force flag to flutter channel (#191579)
bkonyi Aug 24, 2026
bb5b1dc
[native_assets] Roll native packages (#191253)
dcharkes Aug 24, 2026
53643c2
[flutter_tools] Resolve workspace root when running widget preview fr…
bkonyi Aug 24, 2026
2483da2
[flutter_tools] Do not treat 'daemon' argument as daemon command in l…
bkonyi Aug 24, 2026
0c0d059
[flutter_tools] Handle null version gracefully in CachedArtifact and …
bkonyi Aug 24, 2026
fbb2656
[flutter_tools] Handle missing Xcode gracefully in getInfo and buildM…
bkonyi Aug 24, 2026
af06e99
On iOS 27+ devices, manually process lldb stops (#191434)
vashworth Aug 24, 2026
e5ef1d0
[AGP 9.1.0 Migration #3] Add buildModeFor overloads and wire Flutter …
reidbaker-agent Aug 24, 2026
9ad1211
[AGP 9.1.0 Migration #4] Replace the plugin build-type copy with init…
reidbaker-agent Aug 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ vars = {
'skia_git': 'https://skia.googlesource.com',
'llvm_git': 'https://llvm.googlesource.com',
'dart_ai_rev': '9c96bfe5f091c9451eff5b59c9bffeb2e806b875',
'skia_revision': '70988bed1b3bea0026026083ca0accd215620d53',
'skia_revision': '698c60bf58f175479343f07c31904b404a2b843e',

# Do not download the Emscripten SDK by default.
# This prevents us from downloading the Emscripten toolchain for builds
Expand Down Expand Up @@ -55,12 +55,12 @@ vars = {
# updated revision list of existing dependencies. You will need to
# gclient sync before and after update deps to ensure all deps are updated.
# updated revision list of existing dependencies.
'dart_revision': 'cb056da580b6357c87b4dbea6ae850a6d808cea6',
'dart_revision': '78bbc37b6ff6341346c7c8fa06e5c9c6ec91ee97',

# WARNING: DO NOT EDIT MANUALLY
# The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py
'dart_binaryen_rev': '9926156a583cec3d22d521232b31c70fa9a87dc1',
'dart_boringssl_rev': 'defe5810ee8be430bcdeccf46a199bec0e93abdb',
'dart_boringssl_rev': 'da182b2afcea3677f726e708ac5e53eea6760781',
'dart_core_rev': '773de9d6321bc2c7d86d6926e30b341f0b8c2cb1',
'dart_devtools_rev': '21f1838f3a9b138ac377efb953ca5a53c8832e75',
'dart_ecosystem_rev': 'cda8bd535dfbcff45010bc3c843d325682f944b2',
Expand All @@ -70,7 +70,7 @@ vars = {
'dart_protobuf_rev': '91efb90f437bb6a30e6726c3369a2fcb9bba06e7',
'dart_pub_rev': '7654d523a42e764fad77c9e7b63a9686b88c9323',
'dart_sync_http_rev': '6666fff944221891182e1f80bf56569338164d72',
'dart_tools_rev': 'a4b459cca3ab39466bf8fe6734622b92015b5e15',
'dart_tools_rev': '7dc3279da2d7b6bdd49164cada8531d6a2125c15',
'dart_vector_math_rev': 'cf3b5db7340d317dd3489e5a35434b408020a852',
'dart_web_rev': '6b84f811cd67a5fd05f4dac24cb56542bcfc92e4',
'dart_webdriver_rev': '3a711ebb36871eac997c5d5d2429f7414873dc63',
Expand Down Expand Up @@ -199,7 +199,7 @@ vars = {
# The version / instance id of the cipd:chromium/fuchsia/test-scripts which
# will be used altogether with fuchsia-sdk to setup the build / test
# environment.
'fuchsia_test_scripts_version': 'KaOq3EE4qJ9fnaaaKznmHAZs9wyn-LdK_h52KEQv2KgC',
'fuchsia_test_scripts_version': '0iCv10IlKfiilEBOU6W-UM1oPJ8_wGduU0i6cYYDo28C',

# The version / instance id of the cipd:chromium/fuchsia/gn-sdk which will be
# used altogether with fuchsia-sdk to generate gn based build rules.
Expand Down Expand Up @@ -292,7 +292,7 @@ deps = {
Var('chromium_git') + '/external/github.com/google/flatbuffers' + '@' + '067bfdbde9b10c1beb5d6b02d67ae9db8b96f736',

'engine/src/flutter/third_party/icu':
Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'd578f2e8b7bd5938e21cfb6bf15c079e0aa5b738',
Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '8cc91d9b6ab9991802fd208ee03a69714fd0251c',

'engine/src/flutter/third_party/gtest-parallel':
Var('chromium_git') + '/external/github.com/google/gtest-parallel' + '@' + '38191e2733d7cbaeaef6a3f1a942ddeb38a2ad14',
Expand Down Expand Up @@ -336,7 +336,7 @@ deps = {
Var('dart_git') + '/core.git' + '@' + Var('dart_core_rev'),

'engine/src/flutter/third_party/dart/third_party/pkg/dart_style':
Var('dart_git') + '/dart_style.git@dfdf6420c7ea923d28edef3f11e89b4ff23d03bf',
Var('dart_git') + '/dart_style.git@39edc2d946a5d7bd1caf6f1695f366b00f7b873c',

'engine/src/flutter/third_party/dart/third_party/pkg/dartdoc':
Var('dart_git') + '/dartdoc.git@27376696f59b8776af3a2d07291a53562767d345',
Expand All @@ -354,7 +354,7 @@ deps = {
Var('dart_git') + '/leak_tracker.git@f5620600a5ce1c44f65ddaa02001e200b096e14c',

'engine/src/flutter/third_party/dart/third_party/pkg/native':
Var('dart_git') + '/native.git@d196dea41ad2a901a6734066e2c73002a02f9fd5',
Var('dart_git') + '/native.git@057ba8856b8ed2135c549a27719884fd9c7f2ed1',

'engine/src/flutter/third_party/dart/third_party/pkg/protobuf':
Var('dart_git') + '/protobuf.git' + '@' + Var('dart_protobuf_rev'),
Expand Down Expand Up @@ -830,7 +830,7 @@ deps = {
'packages': [
{
'package': 'fuchsia/sdk/core/linux-amd64',
'version': 'GCQlmt6h-esJsNubSmgdOPOVSJoeftcg9q5Bmq8H51AC'
'version': '8Xu4ujBJniC0nQGx3MAlb2ANTQhaU6CrIcmBlf-yz0gC'
}
],
'condition': 'download_fuchsia_deps and not download_fuchsia_sdk',
Expand Down
2 changes: 1 addition & 1 deletion bin/internal/flutter_packages.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1785501174f39c234ec99d9fc2da503eb9fbfc7b
df2ba94faea6a88a7c749c1d3116d9dc232c3ac8
61 changes: 44 additions & 17 deletions bin/internal/update_dart_sdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,11 @@ if ($env:FLUTTER_HOST_ARCH -eq "arm64") {
}
$dartSdkUrl = "$dartSdkBaseUrl/flutter_infra_release/flutter/$engineVersion/$dartZipName"

if ((Test-Path $dartSdkPath) -or (Test-Path $dartSdkLicense)) {
# Move old SDK to a new location instead of deleting it in case it is still in use (e.g. by IntelliJ).
$oldDartSdkSuffix = 1
while (Test-Path "$cachePath\$oldDartSdkPrefix$oldDartSdkSuffix") { $oldDartSdkSuffix++ }

if (Test-Path $dartSdkPath) {
Rename-Item $dartSdkPath "$oldDartSdkPrefix$oldDartSdkSuffix"
}

if (Test-Path $dartSdkLicense) {
Rename-Item $dartSdkLicense "$oldDartSdkPrefix$oldDartSdkSuffix.LICENSE.md"
}
$dartSdkPathTemp = "$cachePath\dart-sdk.tmp"
if (Test-Path $dartSdkPathTemp) {
Remove-Item $dartSdkPathTemp -Recurse -Force
}
New-Item $dartSdkPath -force -type directory | Out-Null
New-Item $dartSdkPathTemp -force -type directory | Out-Null
$dartSdkZip = "$cachePath\$dartZipName"

Try {
Expand All @@ -106,27 +97,63 @@ Catch {
If (Get-Command 7z -errorAction SilentlyContinue) {
Write-Host "Expanding downloaded archive with 7z..."
# The built-in unzippers are painfully slow. Use 7-Zip, if available.
& 7z x $dartSdkZip "-o$cachePath" -bd | Out-Null
& 7z x $dartSdkZip "-o$dartSdkPathTemp" -bd | Out-Null
} ElseIf (Get-Command 7za -errorAction SilentlyContinue) {
Write-Host "Expanding downloaded archive with 7za..."
# Use 7-Zip's standalone version 7za.exe, if available.
& 7za x $dartSdkZip "-o$cachePath" -bd | Out-Null
& 7za x $dartSdkZip "-o$dartSdkPathTemp" -bd | Out-Null
} ElseIf (Get-Command Microsoft.PowerShell.Archive\Expand-Archive -errorAction SilentlyContinue) {
Write-Host "Expanding downloaded archive with PowerShell..."
# Use PowerShell's built-in unzipper, if available (requires PowerShell 5+).
$global:ProgressPreference='SilentlyContinue'
Microsoft.PowerShell.Archive\Expand-Archive $dartSdkZip -DestinationPath $cachePath
Microsoft.PowerShell.Archive\Expand-Archive $dartSdkZip -DestinationPath $dartSdkPathTemp
} Else {
Write-Host "Expanding downloaded archive with Windows..."
# As last resort: fall back to the Windows GUI.
$shell = New-Object -com shell.application
$zip = $shell.NameSpace($dartSdkZip)
foreach($item in $zip.items()) {
$shell.Namespace($cachePath).copyhere($item)
$shell.Namespace($dartSdkPathTemp).copyhere($item)
}
}

Remove-Item $dartSdkZip

if (-not (Test-Path "$dartSdkPathTemp\dart-sdk")) {
Remove-Item $dartSdkPathTemp -Recurse -Force -ErrorAction SilentlyContinue
Write-Error "Dart SDK extraction failed: '$dartSdkPathTemp\dart-sdk' not found."
exit 1
}

# Move old SDK to a new location instead of deleting it in case it is still in use (e.g. by IntelliJ).
if ((Test-Path $dartSdkPath) -or (Test-Path $dartSdkLicense)) {
$oldDartSdkSuffix = 1
while (Test-Path "$cachePath\$oldDartSdkPrefix$oldDartSdkSuffix") { $oldDartSdkSuffix++ }

if (Test-Path $dartSdkPath) {
Rename-Item $dartSdkPath "$oldDartSdkPrefix$oldDartSdkSuffix" -ErrorAction Stop
}

if (Test-Path $dartSdkLicense) {
Rename-Item $dartSdkLicense "$oldDartSdkPrefix$oldDartSdkSuffix.LICENSE.md" -ErrorAction Stop
}
}

# The unzip might have extracted LICENSE.dart_sdk_archive.md to the temp dir
$tempLicense = "$dartSdkPathTemp\LICENSE.dart_sdk_archive.md"
if (Test-Path $tempLicense) {
if (Test-Path $dartSdkLicense) {
Remove-Item $dartSdkLicense -Force -ErrorAction Stop
}
Move-Item $tempLicense $dartSdkLicense -ErrorAction Stop
}

# Move the extracted SDK to the final location
try {
Move-Item "$dartSdkPathTemp\dart-sdk" $dartSdkPath -ErrorAction Stop
} finally {
Remove-Item $dartSdkPathTemp -Recurse -Force -ErrorAction SilentlyContinue
}
$engineVersion | Out-File $engineStamp -Encoding ASCII

# Try to delete all old SDKs and license files.
Expand Down
47 changes: 36 additions & 11 deletions bin/internal/update_dart_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,11 @@ if [ ! -f "$ENGINE_STAMP" ] || [ "$ENGINE_VERSION" != "$(< "$ENGINE_STAMP")" ];
DART_SDK_BASE_URL="${FLUTTER_STORAGE_BASE_URL:-https://storage.googleapis.com}${ENGINE_REALM:+/$ENGINE_REALM}"
DART_SDK_URL="$DART_SDK_BASE_URL/flutter_infra_release/flutter/$ENGINE_VERSION/$DART_ZIP_NAME"

# if the sdk path exists, copy it to a temporary location
if [ -d "$DART_SDK_PATH" ]; then
rm -rf "$DART_SDK_PATH_OLD"
mv "$DART_SDK_PATH" "$DART_SDK_PATH_OLD"
fi
# Create a temporary directory for extraction to ensure atomicity
DART_SDK_PATH_TEMP="$FLUTTER_ROOT/bin/cache/dart-sdk.tmp"
rm -rf -- "$DART_SDK_PATH_TEMP"
mkdir -m 755 -p -- "$DART_SDK_PATH_TEMP"

# install the new sdk
rm -rf -- "$DART_SDK_PATH"
mkdir -m 755 -p -- "$DART_SDK_PATH"
DART_SDK_ZIP="$FLUTTER_ROOT/bin/cache/$DART_ZIP_NAME"

# Conditionally set verbose flag for LUCI
Expand Down Expand Up @@ -172,20 +168,49 @@ if [ ! -f "$ENGINE_STAMP" ] || [ "$ENGINE_VERSION" != "$(< "$ENGINE_STAMP")" ];
>&2 echo " https://flutter.dev/community/china"
>&2 echo
rm -f -- "$DART_SDK_ZIP"
rm -rf -- "$DART_SDK_PATH_TEMP"
exit 1
}
unzip -o -q "$DART_SDK_ZIP" -d "$FLUTTER_ROOT/bin/cache" || {
unzip -o -q "$DART_SDK_ZIP" -d "$DART_SDK_PATH_TEMP" || {
>&2 echo
>&2 echo "It appears that the downloaded file is corrupt; please try again."
>&2 echo "If this problem persists, please report the problem at:"
>&2 echo " https://github.com/flutter/flutter/issues/new?template=01_activation.yml"
>&2 echo
rm -f -- "$DART_SDK_ZIP"
rm -rf -- "$DART_SDK_PATH_TEMP"
exit 1
}
rm -f -- "$DART_SDK_ZIP"
$FIND "$DART_SDK_PATH" -type d -exec chmod 755 {} +
$FIND "$DART_SDK_PATH" -type f $IS_USER_EXECUTABLE -exec chmod a+x,a+r {} +

if [ ! -d "$DART_SDK_PATH_TEMP/dart-sdk" ]; then
>&2 echo "Dart SDK extraction failed: '$DART_SDK_PATH_TEMP/dart-sdk' not found."
rm -rf -- "$DART_SDK_PATH_TEMP"
exit 1
fi

# The unzip might have extracted LICENSE.dart_sdk_archive.md to the temp dir
if [ -f "$DART_SDK_PATH_TEMP/LICENSE.dart_sdk_archive.md" ]; then
mv "$DART_SDK_PATH_TEMP/LICENSE.dart_sdk_archive.md" "$FLUTTER_ROOT/bin/cache/LICENSE.dart_sdk_archive.md"
fi

$FIND "$DART_SDK_PATH_TEMP/dart-sdk" -type d -exec chmod 755 {} +
$FIND "$DART_SDK_PATH_TEMP/dart-sdk" -type f $IS_USER_EXECUTABLE -exec chmod a+x,a+r {} +

# Move old SDK to a temporary location in case it is still in use (e.g. by an IDE).
if [ -d "$DART_SDK_PATH" ]; then
rm -rf "$DART_SDK_PATH_OLD"
mv "$DART_SDK_PATH" "$DART_SDK_PATH_OLD"
fi

# Move the extracted SDK to the final location
mv "$DART_SDK_PATH_TEMP/dart-sdk" "$DART_SDK_PATH" || {
>&2 echo "Failed to move Dart SDK to final destination."
rm -rf -- "$DART_SDK_PATH_TEMP"
exit 1
}
rm -rf -- "$DART_SDK_PATH_TEMP"

echo "$ENGINE_VERSION" > "$ENGINE_STAMP"

# delete any temporary sdk path
Expand Down
34 changes: 30 additions & 4 deletions dev/devicelab/lib/framework/fs_safety.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,42 @@ bool _isDangerousDirectory(String dirPath) {
return false;
}

/// Canonicalizes [p] and normalizes standard root symlink aliases on macOS.
///
/// On macOS (Darwin), system root directories `/var`, `/tmp`, and `/etc` are
/// symlinks to `/private/var`, `/private/tmp`, and `/private/etc` respectively
/// (with Darwin per-user `$TMPDIR` located under `/var/folders/...`).
///
/// Normalizing these prefixes at the string level ensures consistent prefix
/// matching against the resolved temporary directory without performing costly
/// filesystem syscalls (`resolveSymbolicLinksSync`) or failing when validating
/// paths to files/directories that do not exist yet.
String _canonicalize(String p) {
final String canonical = path.canonicalize(p);
if (io.Platform.isMacOS) {
if (canonical.startsWith('/var/') || canonical == '/var') {
return '/private$canonical';
}
if (canonical.startsWith('/tmp/') || canonical == '/tmp') {
return '/private$canonical';
}
if (canonical.startsWith('/etc/') || canonical == '/etc') {
return '/private$canonical';
}
}
return canonical;
}

bool _isAllowedPath(String entityPath) {
final String canonicalEntity = path.canonicalize(entityPath);
final String canonicalEntity = _canonicalize(entityPath);

// Allow system temp
String canonicalTemp;
final io.IOOverrides? currentOverrides = io.IOOverrides.current;
if (currentOverrides is FSGuardIOOverrides) {
canonicalTemp = currentOverrides._canonicalSystemTemp;
} else {
canonicalTemp = path.canonicalize(io.Directory.systemTemp.path);
canonicalTemp = _canonicalize(io.Directory.systemTemp.path);
}

if (path.isWithin(canonicalTemp, canonicalEntity) || canonicalEntity == canonicalTemp) {
Expand Down Expand Up @@ -578,9 +604,9 @@ final class FSGuardIOOverrides extends io.IOOverrides {
? _parent.getSystemTempDirectory()
: super.getSystemTempDirectory();
try {
return path.canonicalize(rawTemp.resolveSymbolicLinksSync());
return _canonicalize(rawTemp.resolveSymbolicLinksSync());
} on Object catch (_) {
return path.canonicalize(rawTemp.path);
return _canonicalize(rawTemp.path);
}
}();

Expand Down
4 changes: 2 additions & 2 deletions dev/integration_tests/data_asset_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ resolution: workspace
dependencies:
flutter:
sdk: flutter
hooks: ^2.1.0
hooks: ^2.2.0
data_assets: ^0.20.0
data_asset_package:
path: ../data_asset_package
Expand All @@ -24,4 +24,4 @@ dev_dependencies:
flutter:
uses-material-design: true

# PUBSPEC CHECKSUM: qa7aie
# PUBSPEC CHECKSUM: g7de17
4 changes: 2 additions & 2 deletions dev/integration_tests/data_asset_package/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ resolution: workspace
dependencies:
flutter:
sdk: flutter
hooks: ^2.1.0
hooks: ^2.2.0
data_assets: ^0.20.0

dev_dependencies:
Expand All @@ -22,4 +22,4 @@ dev_dependencies:
flutter:
uses-material-design: true

# PUBSPEC CHECKSUM: fqqee1
# PUBSPEC CHECKSUM: qo17ak
6 changes: 3 additions & 3 deletions dev/integration_tests/hook_user_defines/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ hooks:
magic_value: 1000

dependencies:
hooks: 2.1.0
hooks: 2.2.0
logging: 1.3.0
native_toolchain_c: 0.19.3
native_toolchain_c: 0.19.4

dev_dependencies:
test: 1.29.0

# PUBSPEC CHECKSUM: b3eo7f
# PUBSPEC CHECKSUM: hsfmta
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ class GalleryOptions {
isTestMode,
);

static GalleryOptions? maybeOf(BuildContext context) {
final _ModelBindingScope? scope = context
.dependOnInheritedWidgetOfExactType<_ModelBindingScope>();
return scope?.modelBindingState.currentModel;
}

static GalleryOptions of(BuildContext context) {
final _ModelBindingScope scope = context
.dependOnInheritedWidgetOfExactType<_ModelBindingScope>()!;
Expand Down
12 changes: 11 additions & 1 deletion dev/integration_tests/new_gallery/lib/layout/adaptive.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import 'package:adaptive_breakpoints/adaptive_breakpoints.dart';
import 'package:flutter/material.dart';

import '../data/gallery_options.dart';

/// The maximum width taken up by each item on the home screen.
const double maxHomeItemWidth = 1400.0;

Expand All @@ -15,11 +17,19 @@ const double maxHomeItemWidth = 1400.0;
/// where only part of the display is available to said widgets.
///
/// Used to build adaptive and responsive layouts.
bool isDisplayDesktop(BuildContext context) => getWindowType(context) >= AdaptiveWindowType.medium;
bool isDisplayDesktop(BuildContext context) {
if (GalleryOptions.maybeOf(context)?.isTestMode ?? false) {
return false;
}
return getWindowType(context) >= AdaptiveWindowType.medium;
}

/// Returns boolean value whether the window is considered medium size.
///
/// Used to build adaptive and responsive layouts.
bool isDisplaySmallDesktop(BuildContext context) {
if (GalleryOptions.maybeOf(context)?.isTestMode ?? false) {
return false;
}
return getWindowType(context) == AdaptiveWindowType.medium;
}
Loading