diff --git a/.ci.yaml b/.ci.yaml
index f264e0e792a4c..64a4de522fd43 100644
--- a/.ci.yaml
+++ b/.ci.yaml
@@ -78,7 +78,10 @@ platform_properties:
]
os: Mac-12
device_type: none
- xcode: 14e222b
+ $flutter/osx_sdk : >-
+ {
+ "sdk_version": "14e300c"
+ }
mac_arm64:
properties:
dependencies: >-
@@ -88,7 +91,10 @@ platform_properties:
os: Mac-12
device_type: none
cpu: arm64
- xcode: 14e222b
+ $flutter/osx_sdk : >-
+ {
+ "sdk_version": "14e300c"
+ }
mac_benchmark:
properties:
dependencies: >-
@@ -100,7 +106,10 @@ platform_properties:
os: Mac-12
tags: >
["devicelab", "hostonly", "mac"]
- xcode: 14e222b
+ $flutter/osx_sdk : >-
+ {
+ "sdk_version": "14e300c"
+ }
mac_x64:
properties:
dependencies: >-
@@ -110,25 +119,30 @@ platform_properties:
os: Mac-12
device_type: none
cpu: x86
- xcode: 14e222b
+ $flutter/osx_sdk : >-
+ {
+ "sdk_version": "14e300c"
+ }
mac_build_test:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"},
{"dependency": "apple_signing", "version": "version:2022_to_2023"}
]
os: Mac-12
device_type: none
cpu: x86
- xcode: 14e222b
+ $flutter/osx_sdk : >-
+ {
+ "sdk_version": "14e300c"
+ }
mac_android:
properties:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:110.0"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
os: Mac-12
@@ -148,26 +162,30 @@ platform_properties:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"},
{"dependency": "apple_signing", "version": "version:2022_to_2023"}
]
os: Mac-12
cpu: x86
device_os: iOS-16
- xcode: 14e222b
+ $flutter/osx_sdk : >-
+ {
+ "sdk_version": "14e300c"
+ }
mac_arm64_ios:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"},
{"dependency": "apple_signing", "version": "none"}
]
os: Mac-12
cpu: arm64
device_os: iOS-16
- xcode: 14e222b
+ $flutter/osx_sdk : >-
+ {
+ "sdk_version": "14e300c"
+ }
windows:
properties:
dependencies: >-
@@ -182,7 +200,7 @@ platform_properties:
[
{"dependency": "android_sdk", "version": "version:33v6"},
{"dependency": "certs", "version": "version:9563bb"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
os: Windows-10
@@ -225,6 +243,8 @@ targets:
- name: Linux packages_autoroller
presubmit: false
+ # TODO(fujino): https://github.com/flutter/flutter/issues/129744
+ bringup: true
recipe: pub_autoroller/pub_autoroller
timeout: 30
enabled_branches:
@@ -244,7 +264,8 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "android_virtual_device", "version": "31"}
+ {"dependency": "android_virtual_device", "version": "33"},
+ {"dependency": "open_jdk", "version": "version:11"}
]
tags: >
["framework","hostonly","linux"]
@@ -257,7 +278,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:17"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"},
{"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"},
@@ -276,8 +297,8 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
- {"dependency": "open_jdk", "version": "version:11"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
+ {"dependency": "open_jdk", "version": "version:17"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"},
{"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"},
{"dependency": "cmake", "version": "build_id:8787856497187628321"},
@@ -295,8 +316,8 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
- {"dependency": "open_jdk", "version": "version:11"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
+ {"dependency": "open_jdk", "version": "version:17"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"},
{"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"},
{"dependency": "cmake", "version": "build_id:8787856497187628321"},
@@ -381,7 +402,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
tags: >
@@ -392,6 +413,24 @@ targets:
- bin/**
- .ci.yaml
+ - name: Linux firebase_oriol33_abstract_method_smoke_test
+ bringup: true
+ recipe: firebaselab/firebaselab
+ timeout: 60
+ properties:
+ dependencies: >-
+ [
+ {"dependency": "android_sdk", "version": "version:33v6"},
+ {"dependency": "open_jdk", "version": "version:11"}
+ ]
+ tags: >
+ ["firebaselab"]
+ task_name: abstract_method_smoke_test
+ physical_devices: >-
+ ["--device", "model=oriole,version=33"]
+ virtual_devices: >-
+ []
+
- name: Linux firebase_abstract_method_smoke_test
bringup: true # Flaky https://github.com/flutter/flutter/issues/124691
recipe: firebaselab/firebaselab
@@ -399,11 +438,28 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "android_sdk", "version": "version:33v6"}
+ {"dependency": "android_sdk", "version": "version:33v6"},
+ {"dependency": "open_jdk", "version": "version:11"}
]
tags: >
["firebaselab"]
task_name: abstract_method_smoke_test
+ physical_devices: >-
+ [
+ "--device", "model=redfin,version=30",
+ "--device", "model=griffin,version=24"
+ ]
+ # TODO(flutter/flutter#123331): This device is flaking.
+ # "--device", "model=Nexus6P,version=25",
+ virtual_devices: >-
+ [
+ "--device", "model=Nexus5,version=21",
+ "--device", "model=Nexus5,version=22",
+ "--device", "model=Nexus5,version=23",
+ "--device", "model=Nexus6P,version=26",
+ "--device", "model=Nexus6P,version=27",
+ "--device", "model=NexusLowRes,version=29"
+ ]
- name: Linux firebase_android_embedding_v2_smoke_test
recipe: firebaselab/firebaselab
@@ -411,11 +467,28 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "android_sdk", "version": "version:33v6"}
+ {"dependency": "android_sdk", "version": "version:33v6"},
+ {"dependency": "open_jdk", "version": "version:11"}
]
tags: >
["firebaselab"]
task_name: android_embedding_v2_smoke_test
+ physical_devices: >-
+ [
+ "--device", "model=redfin,version=30",
+ "--device", "model=griffin,version=24"
+ ]
+ # TODO(flutter/flutter#123331): This device is flaking.
+ # "--device", "model=Nexus6P,version=25",
+ virtual_devices: >-
+ [
+ "--device", "model=Nexus5,version=21",
+ "--device", "model=Nexus5,version=22",
+ "--device", "model=Nexus5,version=23",
+ "--device", "model=Nexus6P,version=26",
+ "--device", "model=Nexus6P,version=27",
+ "--device", "model=NexusLowRes,version=29"
+ ]
- name: Linux firebase_release_smoke_test
recipe: firebaselab/firebaselab
@@ -423,11 +496,28 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "android_sdk", "version": "version:33v6"}
+ {"dependency": "android_sdk", "version": "version:33v6"},
+ {"dependency": "open_jdk", "version": "version:11"}
]
tags: >
["firebaselab"]
task_name: release_smoke_test
+ physical_devices: >-
+ [
+ "--device", "model=redfin,version=30",
+ "--device", "model=griffin,version=24"
+ ]
+ # TODO(flutter/flutter#123331): This device is flaking.
+ # "--device", "model=Nexus6P,version=25",
+ virtual_devices: >-
+ [
+ "--device", "model=Nexus5,version=21",
+ "--device", "model=Nexus5,version=22",
+ "--device", "model=Nexus5,version=23",
+ "--device", "model=Nexus6P,version=26",
+ "--device", "model=Nexus6P,version=27",
+ "--device", "model=NexusLowRes,version=29"
+ ]
- name: Linux flutter_packaging_test
recipe: packaging/packaging
@@ -521,6 +611,7 @@ targets:
["framework", "hostonly", "shard", "linux"]
runIf:
- dev/**
+ - examples/api/**
- packages/flutter/**
- packages/flutter_driver/**
- packages/integration_test/**
@@ -573,7 +664,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
tags: >
@@ -591,7 +682,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
tags: >
@@ -609,7 +700,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
tags: >
@@ -627,7 +718,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
tags: >
@@ -645,7 +736,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
tags: >
@@ -663,7 +754,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
tags: >
@@ -682,7 +773,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"}
+ {"dependency": "chrome_and_driver", "version": "version:114.0"}
]
tags: >
["devicelab", "hostonly", "linux"]
@@ -700,7 +791,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
tags: >
@@ -719,7 +810,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
tags: >
@@ -738,7 +829,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
tags: >
@@ -836,7 +927,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"}
+ {"dependency": "chrome_and_driver", "version": "version:114.0"}
]
tags: >
["devicelab", "hostonly", "linux"]
@@ -862,7 +953,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"},
{"dependency": "open_jdk", "version": "version:11"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
@@ -886,7 +977,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"},
{"dependency": "open_jdk", "version": "version:11"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
@@ -910,7 +1001,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"},
{"dependency": "open_jdk", "version": "version:11"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
@@ -934,7 +1025,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"},
{"dependency": "open_jdk", "version": "version:11"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
@@ -998,7 +1089,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"}
+ {"dependency": "chrome_and_driver", "version": "version:114.0"}
]
tags: >
["devicelab","hostonly", "linux"]
@@ -1006,12 +1097,13 @@ targets:
- name: Linux web_benchmarks_html
recipe: devicelab/devicelab_drone
+ presubmit: false
timeout: 60
properties:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"}
+ {"dependency": "chrome_and_driver", "version": "version:114.0"}
]
tags: >
["devicelab"]
@@ -1021,6 +1113,25 @@ targets:
- bin/**
- .ci.yaml
+ - name: Linux web_benchmarks_skwasm
+ bringup: true
+ recipe: devicelab/devicelab_drone
+ presubmit: false
+ timeout: 60
+ properties:
+ dependencies: >-
+ [
+ {"dependency": "android_sdk", "version": "version:33v6"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"}
+ ]
+ tags: >
+ ["devicelab"]
+ task_name: web_benchmarks_skwasm
+ runIf:
+ - dev/**
+ - bin/**
+ - .ci.yaml
+
- name: Linux web_long_running_tests_1_5
recipe: flutter/flutter_drone
timeout: 60
@@ -1028,7 +1139,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_long_running_tests
@@ -1048,7 +1159,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_long_running_tests
@@ -1068,7 +1179,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_long_running_tests
@@ -1088,7 +1199,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_long_running_tests
@@ -1108,7 +1219,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_long_running_tests
@@ -1128,7 +1239,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_tests
@@ -1148,7 +1259,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_tests
@@ -1168,7 +1279,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_tests
@@ -1188,7 +1299,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_tests
@@ -1208,7 +1319,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_tests
@@ -1228,7 +1339,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_tests
@@ -1248,7 +1359,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_tests
@@ -1268,7 +1379,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_tests
@@ -1288,7 +1399,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_canvaskit_tests
@@ -1308,7 +1419,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_canvaskit_tests
@@ -1328,7 +1439,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_canvaskit_tests
@@ -1348,7 +1459,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_canvaskit_tests
@@ -1368,7 +1479,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_canvaskit_tests
@@ -1388,7 +1499,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_canvaskit_tests
@@ -1408,7 +1519,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_canvaskit_tests
@@ -1428,7 +1539,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
shard: web_canvaskit_tests
@@ -1448,7 +1559,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
@@ -1477,7 +1588,7 @@ targets:
task_name: android_defines_test
dependencies: >-
[
- {"dependency": "android_virtual_device", "version": "31"}
+ {"dependency": "android_virtual_device", "version": "33"}
]
use_emulator: "true"
@@ -2295,6 +2406,26 @@ targets:
["devicelab", "android", "linux", "samsung", "s10"]
task_name: platform_views_scroll_perf__timeline_summary
+ - name: Linux_android platform_views_scroll_perf_impeller__timeline_summary
+ bringup: true
+ recipe: devicelab/devicelab_drone
+ presubmit: false
+ timeout: 60
+ properties:
+ tags: >
+ ["devicelab", "android", "linux"]
+ task_name: platform_views_scroll_perf_impeller__timeline_summary
+
+ - name: Linux_samsung_s10 platform_views_scroll_perf_impeller__timeline_summary
+ bringup: true
+ recipe: devicelab/devicelab_drone
+ presubmit: false
+ timeout: 60
+ properties:
+ tags: >
+ ["devicelab", "android", "linux", "samsung", "s10"]
+ task_name: platform_views_scroll_perf_impeller__timeline_summary
+
- name: Linux_android platform_view__start_up
recipe: devicelab/devicelab_drone
presubmit: false
@@ -2504,6 +2635,7 @@ targets:
["framework", "hostonly", "shard", "linux"]
runIf:
- dev/**
+ - examples/api/**
- packages/flutter/**
- packages/flutter_driver/**
- packages/integration_test/**
@@ -2522,7 +2654,6 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
task_name: animated_complex_opacity_perf_macos__e2e_summary
@@ -2532,19 +2663,15 @@ targets:
recipe: devicelab/devicelab_drone
timeout: 60
properties:
- dependencies: >-
- [
- {"dependency": "xcode", "version": "14e222b"}
- ]
task_name: basic_material_app_macos__compile
- name: Mac build_ios_framework_module_test
recipe: devicelab/devicelab_drone
timeout: 60
properties:
+ add_recipes_cq: "true"
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
tags: >
@@ -2578,9 +2705,8 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:110.0"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:17"},
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
@@ -2597,9 +2723,8 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:110.0"},
- {"dependency": "open_jdk", "version": "version:11"},
- {"dependency": "xcode", "version": "14e222b"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
+ {"dependency": "open_jdk", "version": "version:17"},
{"dependency": "gems", "version": "v3.3.14"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
@@ -2616,9 +2741,8 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:110.0"},
- {"dependency": "open_jdk", "version": "version:11"},
- {"dependency": "xcode", "version": "14e222b"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
+ {"dependency": "open_jdk", "version": "version:17"},
{"dependency": "gems", "version": "v3.3.14"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
@@ -2635,9 +2759,8 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:110.0"},
- {"dependency": "open_jdk", "version": "version:11"},
- {"dependency": "xcode", "version": "14e222b"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
+ {"dependency": "open_jdk", "version": "version:17"},
{"dependency": "gems", "version": "v3.3.14"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
@@ -2653,7 +2776,6 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
task_name: complex_layout_macos__start_up
@@ -2665,7 +2787,6 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
task_name: complex_layout_scroll_perf_macos__timeline_summary
@@ -2687,7 +2808,6 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
tags: >
@@ -2706,7 +2826,6 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
task_name: flutter_gallery_macos__compile
@@ -2718,7 +2837,6 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
task_name: flutter_gallery_macos__start_up
@@ -2752,10 +2870,6 @@ targets:
recipe: devicelab/devicelab_drone
timeout: 60
properties:
- dependencies: >-
- [
- {"dependency": "xcode", "version": "14e222b"}
- ]
task_name: flutter_view_macos__start_up
- name: Mac framework_tests_libraries
@@ -2791,7 +2905,6 @@ targets:
dependencies: >-
[
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"},
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"},
{"dependency": "open_jdk", "version": "version:11"},
{"dependency": "android_sdk", "version": "version:33v6"}
@@ -2802,6 +2915,7 @@ targets:
["framework", "hostonly", "shard", "mac"]
runIf:
- dev/**
+ - examples/api/**
- packages/flutter/**
- packages/flutter_driver/**
- packages/integration_test/**
@@ -2861,10 +2975,6 @@ targets:
recipe: devicelab/devicelab_drone
timeout: 60
properties:
- dependencies: >-
- [
- {"dependency": "xcode", "version": "14e222b"}
- ]
task_name: hello_world_macos__compile
- name: Mac integration_ui_test_test_macos
@@ -2874,7 +2984,6 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
tags: >
@@ -2942,7 +3051,6 @@ targets:
cpu: x86 # Codesigning fails on ARM https://github.com/flutter/flutter/issues/112033
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
tags: >
@@ -2973,10 +3081,6 @@ targets:
recipe: devicelab/devicelab_drone
timeout: 60
properties:
- dependencies: >-
- [
- {"dependency": "xcode", "version": "14e222b"}
- ]
task_name: platform_view_macos__start_up
- name: Mac platform_channel_sample_test_macos
@@ -2984,10 +3088,6 @@ targets:
presubmit: false
timeout: 60
properties:
- dependencies: >-
- [
- {"dependency": "xcode", "version": "14e222b"}
- ]
tags: >
["devicelab", "hostonly", "mac"]
task_name: platform_channel_sample_test_macos
@@ -3000,7 +3100,6 @@ targets:
[
{"dependency": "android_sdk", "version": "version:33v6"},
{"dependency": "open_jdk", "version": "version:11"},
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
tags: >
@@ -3018,7 +3117,6 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
tags: >
@@ -3070,7 +3168,6 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
tags: >
@@ -3088,7 +3185,6 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
tags: >
@@ -3106,7 +3202,6 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
shard: tool_host_cross_arch_tests
@@ -3125,7 +3220,6 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
shard: tool_host_cross_arch_tests
@@ -3146,9 +3240,8 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:110.0"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"},
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
@@ -3171,9 +3264,8 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:110.0"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"},
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
@@ -3196,9 +3288,8 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:110.0"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"},
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
@@ -3221,9 +3312,8 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:110.0"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"},
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
@@ -3280,10 +3370,6 @@ targets:
presubmit: false
timeout: 60
properties:
- dependencies: >-
- [
- {"dependency": "xcode", "version": "14e222b"}
- ]
tags: >
["framework", "hostonly", "shard", "mac"]
validation: verify_binaries_codesigned
@@ -3296,10 +3382,6 @@ targets:
presubmit: false
timeout: 60
properties:
- dependencies: >-
- [
- {"dependency": "xcode", "version": "14e222b"}
- ]
tags: >
["framework", "hostonly", "shard", "mac"]
validation: verify_binaries_codesigned
@@ -3312,7 +3394,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:110.0"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
@@ -3582,6 +3664,16 @@ targets:
["devicelab", "ios", "mac"]
task_name: flutter_gallery_ios__start_up
+ - name: Mac_ios flutter_gallery_ios__start_up_xcode_debug
+ recipe: devicelab/devicelab_drone
+ presubmit: false
+ timeout: 60
+ properties:
+ tags: >
+ ["devicelab", "ios", "mac"]
+ task_name: flutter_gallery_ios__start_up_xcode_debug
+ bringup: true
+
- name: Mac_ios flutter_view_ios__start_up
recipe: devicelab/devicelab_drone
presubmit: false
@@ -3649,6 +3741,16 @@ targets:
["devicelab", "ios", "mac"]
task_name: integration_ui_ios_driver
+ - name: Mac_ios integration_ui_ios_driver_xcode_debug
+ recipe: devicelab/devicelab_drone
+ presubmit: false
+ timeout: 60
+ properties:
+ tags: >
+ ["devicelab", "ios", "mac"]
+ task_name: integration_ui_ios_driver_xcode_debug
+ bringup: true
+
- name: Mac_ios integration_ui_ios_frame_number
recipe: devicelab/devicelab_drone
presubmit: false
@@ -3766,6 +3868,17 @@ targets:
["devicelab", "ios", "mac"]
task_name: microbenchmarks_ios
+ # TODO(vashworth): Remove after Xcode 15 and iOS 17 are in CI (https://github.com/flutter/flutter/issues/132128)
+ - name: Mac_ios microbenchmarks_ios_xcode_debug
+ recipe: devicelab/devicelab_drone
+ presubmit: false
+ timeout: 60
+ properties:
+ tags: >
+ ["devicelab", "ios", "mac"]
+ task_name: microbenchmarks_ios_xcode_debug
+ bringup: true
+
- name: Mac_ios native_platform_view_ui_tests_ios
recipe: devicelab/devicelab_drone
presubmit: false
@@ -3964,7 +4077,6 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
tags: >
@@ -3982,7 +4094,6 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
tags: >
@@ -4000,7 +4111,6 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
tags: >
@@ -4033,7 +4143,6 @@ targets:
properties:
dependencies: >-
[
- {"dependency": "xcode", "version": "14e222b"},
{"dependency": "gems", "version": "v3.3.14"}
]
tags: >
@@ -4067,7 +4176,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:17"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"},
{"dependency": "vs_build", "version": "version:vs2019"}
@@ -4085,8 +4194,8 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
- {"dependency": "open_jdk", "version": "version:11"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
+ {"dependency": "open_jdk", "version": "version:17"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"},
{"dependency": "vs_build", "version": "version:vs2019"}
]
@@ -4103,8 +4212,8 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
- {"dependency": "open_jdk", "version": "version:11"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
+ {"dependency": "open_jdk", "version": "version:17"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"},
{"dependency": "vs_build", "version": "version:vs2019"}
]
@@ -4121,8 +4230,8 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
- {"dependency": "open_jdk", "version": "version:11"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
+ {"dependency": "open_jdk", "version": "version:17"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"},
{"dependency": "vs_build", "version": "version:vs2019"}
]
@@ -4184,6 +4293,7 @@ targets:
["framework", "hostonly", "shard", "windows"]
runIf:
- dev/**
+ - examples/api/**
- packages/flutter/**
- packages/flutter_driver/**
- packages/integration_test/**
@@ -4227,7 +4337,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
tags: >
@@ -4258,7 +4368,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
tags: >
@@ -4277,7 +4387,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
tags: >
@@ -4296,7 +4406,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
tags: >
@@ -4328,7 +4438,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
tags: >
@@ -4347,7 +4457,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"}
]
tags: >
@@ -4420,7 +4530,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"},
{"dependency": "vs_build", "version": "version:vs2019"}
@@ -4444,7 +4554,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"},
{"dependency": "vs_build", "version": "version:vs2019"}
@@ -4468,7 +4578,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"},
{"dependency": "vs_build", "version": "version:vs2019"}
@@ -4492,7 +4602,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"},
{"dependency": "vs_build", "version": "version:vs2019"}
@@ -4516,7 +4626,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"},
{"dependency": "vs_build", "version": "version:vs2019"}
@@ -4540,7 +4650,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"},
{"dependency": "vs_build", "version": "version:vs2019"}
@@ -4603,7 +4713,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
@@ -4624,7 +4734,7 @@ targets:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
- {"dependency": "chrome_and_driver", "version": "version:96.2"},
+ {"dependency": "chrome_and_driver", "version": "version:114.0"},
{"dependency": "open_jdk", "version": "version:11"},
{"dependency": "goldctl", "version": "git_revision:f808dcff91b221ae313e540c09d79696cd08b8de"}
]
diff --git a/.cirrus.yml b/.cirrus.yml
deleted file mode 100644
index cdcba477e7631..0000000000000
--- a/.cirrus.yml
+++ /dev/null
@@ -1,158 +0,0 @@
-# CIRRUS CONFIGURATION FILE
-# https://cirrus-ci.org/guide/writing-tasks/
-
-environment:
- # For details about environment variables used in Cirrus, including how encrypted variables work,
- # see https://cirrus-ci.org/guide/writing-tasks/#environment-variables
- # We change Flutter's directory to include a space in its name (see $CIRRUS_WORKING_DIR) so that
- # we constantly test path names with spaces in them. The FLUTTER_SDK_PATH_WITH_SPACE variable must
- # therefore have a space in it.
- FLUTTER_SDK_PATH_WITH_SPACE: "flutter sdk"
- # We force BOT to true so that all our tools know we're in a CI environment. This avoids any
- # dependency on precisely how Cirrus is detected by our tools.
- BOT: "true"
-
-gcp_credentials: ENCRYPTED[!9c8e92e8da192ce2a51b7d4ed9948c4250d0bae3660193d9b901196c9692abbebe784d4a32e9f38b328571d65f6e7aed!]
-
-# LINUX SHARDS
-task:
- gke_container:
- dockerfile: "dev/ci/docker_linux/Dockerfile"
- builder_image_name: docker-builder-linux # gce vm image
- builder_image_project: flutter-cirrus
- cluster_name: test-cluster
- zone: us-central1-a
- namespace: default
- cpu: $CPU
- memory: $MEMORY
- use_in_memory_disk: $USE_IN_MEMORY_DISK
- environment:
- # We shrink our default resource requirement as much as possible because that way we are more
- # likely to get scheduled. We require 4G of RAM because most of the shards (all but one as of
- # October 2019) just get OOM-killed with less. Some shards may need more. When increasing the
- # requirements for select shards, please leave a comment on those shards saying when you
- # increased the requirements, what numbers you tried, and what the results were.
- CPU: 1 # 0.1-8 without compute credits, 0.1-30 with (yes, you can go fractional)
- MEMORY: 4G # 256M-24G without compute credits, 256M-90G with
- CIRRUS_WORKING_DIR: "/tmp/$FLUTTER_SDK_PATH_WITH_SPACE"
- CIRRUS_DOCKER_CONTEXT: "dev/"
- PATH: "$CIRRUS_WORKING_DIR/bin:$CIRRUS_WORKING_DIR/bin/cache/dart-sdk/bin:$PATH"
- ANDROID_SDK_ROOT: "/opt/android_sdk"
- SHOULD_UPDATE_PACKAGES: 'TRUE' # can be overridden at the task level
- USE_IN_MEMORY_DISK: false
- pub_cache:
- folder: $HOME/.pub-cache
- fingerprint_script: echo $OS; grep -r --include=pubspec.yaml 'PUBSPEC CHECKSUM' "$CIRRUS_WORKING_DIR"
- reupload_on_changes: false
- flutter_pkg_cache:
- folder: bin/cache/pkg
- fingerprint_script: echo $OS; cat bin/internal/*.version
- reupload_on_changes: false
- artifacts_cache:
- folder: bin/cache/artifacts
- fingerprint_script: echo $OS; cat bin/internal/*.version
- reupload_on_changes: false
- setup_script:
- - date
- - git clean -xffd --exclude=bin/cache/
- - git fetch origin
- - git fetch origin master # To set FETCH_HEAD, so that "git merge-base" works.
- - flutter config --no-analytics
- - if [ "$SHOULD_UPDATE_PACKAGES" == TRUE ]; then flutter update-packages; fi
- - flutter doctor -v
- - ./dev/bots/accept_android_sdk_licenses.sh
- - date
- on_failure:
- failure_script:
- - date
- - which flutter
- matrix:
- - name: analyze-linux # linux-only
- only_if: "$CIRRUS_PR != '' && $CIRRUS_BASE_BRANCH == 'master'"
- environment:
- # Empirically, the analyze-linux shard runs surprisingly fast (under 15 minutes) with just 1
- # CPU. We noticed OOM failures with 6GB 4/2020, so we increased the memory.
- CPU: 1
- MEMORY: 8G
- script:
- - dart --enable-asserts ./dev/bots/analyze.dart
-
- - name: framework_tests-widgets-linux
- only_if: "changesInclude('.cirrus.yml', 'dev/**', 'packages/flutter/**', 'packages/flutter_test/**', 'packages/flutter_tools/lib/src/test/**', 'bin/**') && $CIRRUS_PR != '' && $CIRRUS_BASE_BRANCH == 'master'"
- environment:
- # We use 3 CPUs because that's the minimum required to get framework_tests-widgets-linux
- # running fast enough that it is not the long pole, as of October 2019.
- CPU: 3
- script:
- - dart --enable-asserts ./dev/bots/test.dart
-
- - name: framework_tests-libraries-linux
- only_if: "changesInclude('.cirrus.yml', 'dev/**', 'packages/flutter/**', 'packages/flutter_test/**', 'packages/flutter_tools/lib/src/test/**', 'bin/**') && $CIRRUS_PR != '' && $CIRRUS_BASE_BRANCH == 'master'"
- environment:
- # We use 3 CPUs because that's the minimum required to get the
- # framework_tests-libraries-linux shard running fast enough that it is not the long pole, as
- # of October 2019.
- CPU: 3
- script:
- - dart --enable-asserts ./dev/bots/test.dart
-
- - name: framework_tests-misc-linux
- # this includes the tests for directories in dev/
- only_if: "changesInclude('.cirrus.yml', 'dev/**', 'packages/flutter/**', 'packages/flutter_goldens/**', 'packages/flutter_test/**', 'packages/flutter_tools/lib/src/test/**', 'bin/**') && $CIRRUS_PR != '' && $CIRRUS_BASE_BRANCH == 'master'"
- environment:
- # We use 3 CPUs because that's the minimum required to get framework_tests-misc-linux
- # running fast enough that it is not the long pole, as of October 2019.
- CPU: 3
- script:
- - dart --enable-asserts ./dev/bots/test.dart
-
- - name: tool_tests-general-linux
- only_if: "changesInclude('.cirrus.yml', 'dev/**', 'packages/flutter_tools/**', 'bin/**') && $CIRRUS_PR != '' && $CIRRUS_BASE_BRANCH == 'master'"
- environment:
- # As of November 2019, the tool_tests-general-linux shard got faster with more CPUs up to 4
- # CPUs, and needed at least 10G of RAM to not run out of memory.
- CPU: 4
- MEMORY: 10G
- SHOULD_UPDATE_PACKAGES: "FALSE"
- script:
- - (cd packages/flutter_tools; dart pub get)
- - (cd packages/flutter_tools/test/data/asset_test/main; dart pub get)
- - (cd packages/flutter_tools/test/data/asset_test/font; dart pub get)
- - (cd dev/bots; dart pub get)
- - dart --enable-asserts ./dev/bots/test.dart
-
- - name: tool_tests-commands-linux
- only_if: "changesInclude('.cirrus.yml', 'dev/**', 'packages/flutter_tools/**', 'bin/**') && $CIRRUS_PR != '' && $CIRRUS_BASE_BRANCH == 'master'"
- environment:
- # As of October 2019, the tool_tests-commands-linux shard got faster with more CPUs up to 6
- # CPUs, and needed at least 8G of RAM to not run out of memory.
- # Increased to 10GB on 19th Nov 2019 due to significant number of OOMKilled failures on PR builds.
- CPU: 6
- MEMORY: 10G
- SHOULD_UPDATE_PACKAGES: "FALSE"
- script:
- - (cd packages/flutter_tools; dart pub get)
- - (cd dev/bots; dart pub get)
- - dart --enable-asserts ./dev/bots/test.dart
-
- - name: docs-linux # linux-only
- environment:
- CPU: 4
- MEMORY: 12G
- only_if: "$CIRRUS_PR != '' && $CIRRUS_BASE_BRANCH == 'master'"
- script:
- - ./dev/bots/docs.sh
-
- - name: customer_testing-linux
- only_if: "$CIRRUS_PR != '' && $CIRRUS_BASE_BRANCH == 'master'"
- environment:
- # Empirically, this shard runs fine at 1 CPU and 4G RAM as of October 2019. We will probably
- # want to grow this container when we invite people to add their tests in large numbers.
- SHOULD_UPDATE_PACKAGES: "FALSE"
- script:
- # Cirrus doesn't give us the master branch, so we have to fetch it for ourselves,
- # otherwise we won't be able to figure out how old or new our current branch is.
- - git config user.email "cirrus-bot@invalid"
- - git fetch origin master:master
- # The actual logic is in a shell script so that it can be shared between CIs.
- - (cd dev/customer_testing/; ./ci.sh)
diff --git a/.github/ISSUE_TEMPLATE/4_performance_others.md b/.github/ISSUE_TEMPLATE/4_performance_others.md
index 748786a2959c1..6777d05ce28f6 100644
--- a/.github/ISSUE_TEMPLATE/4_performance_others.md
+++ b/.github/ISSUE_TEMPLATE/4_performance_others.md
@@ -1,8 +1,8 @@
---
-name: My app has some non-speed performance issues.
+name: My app has some non-speed performance issues
about: You are writing an application but have discovered that it uses too much memory, too much energy (e.g., CPU/GPU usage is high), or its app size is too large.
title: ''
-labels: 'created via performance template'
+labels: 'from: performance template'
assignees: ''
---
diff --git a/.github/ISSUE_TEMPLATE/5_performance_speed.md b/.github/ISSUE_TEMPLATE/5_performance_speed.md
index ba7f3178adf14..0c7054c535829 100644
--- a/.github/ISSUE_TEMPLATE/5_performance_speed.md
+++ b/.github/ISSUE_TEMPLATE/5_performance_speed.md
@@ -1,9 +1,9 @@
---
-name: My app is slow or missing frames.
+name: My app is slow or missing frames
about: You are writing an application but have discovered that it is slow, you are
not hitting 60Hz, or you are getting jank (missed frames).
title: ''
-labels: 'created via performance template'
+labels: 'from: performance template'
assignees: ''
---
diff --git a/.github/ISSUE_TEMPLATE/6_infrastructure.md b/.github/ISSUE_TEMPLATE/6_infrastructure.md
index 802371e4d7d70..d12e41ae11aac 100644
--- a/.github/ISSUE_TEMPLATE/6_infrastructure.md
+++ b/.github/ISSUE_TEMPLATE/6_infrastructure.md
@@ -15,8 +15,8 @@ assignees: ''
If you are filing a feature request, please describe the use case and a proposal.
- If you are requesting a small infra task with P0 or P1 priority, please add it to the
- "Infra Ticket Queue" project with "New" column, explain why the task is needed and what
- actions need to perform (if you happen to know). No need to set an assignee; the infra oncall
+ If you are requesting a small infra task with P0 priority, please add it to the
+ "Infra Ticket Queue" project with "New" column, explain why the task is urgent and what
+ actions need to be performed (if you happen to know). No need to set an assignee; the infra oncall
will triage and process the infra ticket queue.
-->
diff --git a/.github/ISSUE_TEMPLATE/7_cherry_pick.yml b/.github/ISSUE_TEMPLATE/7_cherry_pick.yml
index 1d43ea734ee86..8fd172ab4a914 100644
--- a/.github/ISSUE_TEMPLATE/7_cherry_pick.yml
+++ b/.github/ISSUE_TEMPLATE/7_cherry_pick.yml
@@ -1,4 +1,4 @@
-name: Request a cherry-pick.
+name: Request a cherry-pick
description: As a contributor, you would like to request that a feature be cherry-picked into a release.
title: '[CP]
'
labels: ['cp: review']
@@ -6,21 +6,10 @@ assignees:
- itsjustkevin
- caseyhillers
body:
-- type: markdown
- attributes:
- value: |
-
- type: input
id: issue_link
attributes:
- label: issue_link
+ label: Issue Link
description: What is the link to the issue this cherry-pick is addressing?
validations:
required: true
@@ -44,7 +33,7 @@ Flutter releases generally follow the given timeline:
- type: input
id: pr_link
attributes:
- label: pr_link
+ label: PR Link
description: >-
Link to an open PR that cherrypick's this into the target release branch.
The current branches can be found under release-caniddate-branch.version for [beta](https://github.com/flutter/flutter/blob/beta/bin/internal/release-candidate-branch.version) and [stable](https://github.com/flutter/flutter/blob/stable/bin/internal/release-candidate-branch.version)
diff --git a/.github/ISSUE_TEMPLATE/8_design_doc.yml b/.github/ISSUE_TEMPLATE/8_design_doc.yml
new file mode 100644
index 0000000000000..76e435697d7d2
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/8_design_doc.yml
@@ -0,0 +1,32 @@
+name: Share a Flutter design document
+description: As a contributor, I would like to share a design document.
+labels: ['design doc']
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thank you for your interest in contributing to Flutter!
+
+ Please ensure that you are following
+ https://github.com/flutter/flutter/wiki/Design-Documents
+ when sharing a design document.
+
+ Please fill out the sections below to the best of your ability.
+ - type: input
+ id: document_link
+ attributes:
+ label: Document Link
+ description: |
+ Insert the "https://flutter.dev/go" link for your document here.
+ For details on creating a link, see the instructions in
+ https://flutter.dev/go/template
+ validations:
+ required: true
+ - type: textarea
+ id: proposal_description
+ attributes:
+ label: What problem are you solving?
+ description: |
+ Please provide a brief description of the problem you are solving.
+ validations:
+ required: true
diff --git a/.github/labeler.yml b/.github/labeler.yml
index f2091cdd95e40..b134dfdbc907f 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -4,111 +4,100 @@
# See https://github.com/actions/labeler/blob/main/README.md for docs.
'a: accessibility':
- - any:
- - accessibility
- - semantics
+ - '**/accessibility/*'
+ - '**/*accessibility*'
+ - '**/semantics/*'
+ - '**/*semantics*'
'a: animation':
- - any:
- - animation
+ - '**/animation/*'
+ - '**/*animation*'
'a: internationalization':
- - any:
- - packages/flutter_localizations/**
+ - packages/flutter_localizations/**/*
-'a: test':
- - any:
- - packages/flutter_driver/**
- - packages/flutter_goldens/**
- - packages/flutter_goldens_client/**
- - packages/flutter_test/**
+'a: tests':
+ - packages/flutter_driver/**/*
+ - packages/flutter_goldens/**/*
+ - packages/flutter_goldens_client/**/*
+ - packages/flutter_test/**/*
'a: text input':
- - any:
- - text
+ - '**/text/*'
+ - '**/*text*'
'd: api docs':
- - any:
- - examples/api/**
+ - examples/api/**/*
'd: examples':
- - any:
- - examples/**
-
-documentation:
- - any:
- - examples/api/**
+ - examples/**/*
engine:
- - any:
- - bin/internal/engine.version
+ - bin/internal/engine.version
'f: cupertino':
- - any:
- - cupertino
+ - '**/cupertino/*'
+ - '**/*cupertino*'
'f: focus':
- - any:
- - focus
+ - '**/focus/*'
+ - '**/*focus*'
'f: gestures':
- - any:
- - gestures
+ - '**/gestures/*'
+ - '**/*gestures*'
-'f: material':
- - any:
- - material
+'f: material design':
+ - '**/material/*'
+ - '**/*material*'
'f: routes':
- - any:
- - navigator
- - route
+ - '**/navigator/*'
+ - '**/*navigator*'
+ - '**/route/*'
+ - '**/*route*'
'f: scrolling':
- - any:
- - scroll
- - sliver
- - viewport
+ - '**/*scroll*'
+ - '**/scroll/*'
+ - '**/*sliver*'
+ - '**/sliver/*'
+ - '**/*viewport*'
+ - '**/viewport/*'
framework:
- - any:
- - packages/flutter/**
- - packages/flutter_driver/**
- - packages/flutter_goldens/**
- - packages/flutter_goldens_client/**
- - packages/flutter_test/**
- - packages/integration_test/**
-
-integration_test:
- - any:
- - packages/integration_test/**
+ - packages/flutter/**/*
+ - packages/flutter_driver/**/*
+ - packages/flutter_goldens/**/*
+ - packages/flutter_goldens_client/**/*
+ - packages/flutter_test/**/*
+ - packages/integration_test/**/*
+
+'f: integration_test':
+ - packages/integration_test/**/*
platform-ios:
- - any:
- - packages/flutter_tools/lib/src/ios/**
+ - packages/flutter_tools/lib/src/ios/**/*
team:
- - any:
- - '**/pubspec.yaml'
- - '**/fix_data.yaml'
- - '**/*.expect'
- - '**/*test_fixes*'
- - dev/**
- - examples/**
- - packages/flutter_goldens/**
- - packages/flutter_goldens_client/**
-
-'team: gallery':
- - any:
- - examples/flutter_gallery/**
+ - '**/pubspec.yaml'
+ - '**/fix_data.yaml'
+ - '**/*.expect'
+ - '**/*test_fixes*'
+ - .github/**/*
+ - dev/**/*
+ - examples/**/*
+ - packages/flutter_goldens/**/*
+ - packages/flutter_goldens_client/**/*
+
+'customer: gallery':
+ - examples/flutter_gallery/**/*
tech-debt:
- - any:
- - '**/fix_data.yaml'
- - '**/*.expect'
- - '**/*test_fixes*'
+ - '**/fix_data.yaml'
+ - '**/*.expect'
+ - '**/*test_fixes*'
tool:
- - any:
- - packages/flutter_tools/**
- - packages/fuchsia_remote_debug_protocol/**
+ - packages/flutter_tools/**/*
+ - packages/fuchsia_remote_debug_protocol/**/*
diff --git a/.github/move.yml b/.github/move.yml
deleted file mode 100644
index ba4009ec3fa80..0000000000000
--- a/.github/move.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-# Configuration for move-issues - https://github.com/dessant/move-issues
-
-# Delete the command comment when it contains no other content.
-deleteCommand: true
-
-# Close the source issue after moving.
-closeSourceIssue: true
-
-# Lock the source issue after moving.
-lockSourceIssue: false
-
-# Mention issue and comment authors.
-mentionAuthors: true
-
-# Preserve mentions in the issue content.
-keepContentMentions: true
-
-# Set custom aliases for targets
-aliases:
- ide: flutter-intellij
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000000000..b204fadf0463f
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,40 @@
+name: ci
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+on:
+ pull_request:
+ push:
+ branches:
+ - main
+
+jobs:
+ test:
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest, macos-latest, windows-latest]
+
+ runs-on: ${{ matrix.os }}
+
+ name: 🧪 Test
+
+ env:
+ FLUTTER_STORAGE_BASE_URL: https://download.shorebird.dev
+
+ steps:
+ - name: 📚 Git Checkout
+ uses: actions/checkout@v4
+
+ - name: 🎯 Setup Dart
+ uses: dart-lang/setup-dart@v1
+
+ - name: 📦 Install Dependencies
+ run: |
+ dart pub get -C ./dev/bots
+ dart pub get -C ./dev/tools
+
+ - name: 🧪 Run Tests
+ run: dart ./dev/bots/test.dart
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index ace9b15820418..3d5816c9aef03 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.repository == 'flutter/flutter' }}
steps:
- - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
+ - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: ./bin/flutter test --coverage
run: pushd packages/flutter;../../bin/flutter test --coverage -j 1;popd
- name: upload coverage
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index 3a5577155a088..336d04f809a15 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -17,4 +17,6 @@ jobs:
runs-on: ubuntu-latest
steps:
# Source available at https://github.com/actions/labeler/blob/main/README.md
- - uses: actions/labeler@0776a679364a9a16110aac8d0f40f5e11009e327
+ - uses: actions/labeler@0967ca812e7fdc8f5f71402a1b486d5bd061fe20
+ with:
+ sync-labels: false
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index ad0e8bfc68c81..31e4e434b4244 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -23,12 +23,12 @@ jobs:
steps:
- name: "Checkout code"
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
+ uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
persist-credentials: false
- name: "Run analysis"
- uses: ossf/scorecard-action@80e868c13c90f172d68d1f4501dee99e2479f7af
+ uses: ossf/scorecard-action@08b4669551908b1024bb425080c797723083c031
with:
results_file: results.sarif
results_format: sarif
diff --git a/.gitignore b/.gitignore
index 9a78642e8ce47..c21169b36a8b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
+# Do not remove or rename entries in this file, only add new ones
+# See https://github.com/flutter/flutter/issues/128635 for more context.
+
# Miscellaneous
*.class
*.lock
@@ -32,6 +35,7 @@
/dev/bots/android_tools/
/dev/devicelab/ABresults*.json
/dev/docs/doc/
+/dev/docs/api_docs.zip
/dev/docs/flutter.docs.zip
/dev/docs/lib/
/dev/docs/pubspec.yaml
@@ -52,6 +56,7 @@ analysis_benchmark.json
**/generated_plugin_registrant.dart
.packages
.pub-preload-cache/
+.pub-cache/
.pub/
build/
flutter_*.png
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index cf1c28ed39fe5..1d73e488ea62e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -121,6 +121,7 @@ presented.
5. [Flutter design doc template](https://flutter.dev/go/template),
which should be used when proposing a new technical design. This is a good
practice to do before coding more intricate changes.
+ See also our [guidance for writing design docs](https://github.com/flutter/flutter/wiki/Design-Documents).
[](https://www.youtube.com/watch?v=4yBgOBAOx_A)
diff --git a/TESTOWNERS b/TESTOWNERS
index 8456415d84dff..18b3626990c39 100644
--- a/TESTOWNERS
+++ b/TESTOWNERS
@@ -61,7 +61,7 @@
/dev/devicelab/bin/tasks/gradient_dynamic_perf__e2e_summary.dart @flar @flutter/engine
/dev/devicelab/bin/tasks/gradient_static_perf__e2e_summary.dart @flar @flutter/engine
/dev/devicelab/bin/tasks/gradle_java8_compile_test.dart @reidbaker @flutter/tool
-/dev/devicelab/bin/tasks/hot_mode_dev_cycle_linux__benchmark.dart @zanderso @flutter/tool
+/dev/devicelab/bin/tasks/hot_mode_dev_cycle_linux__benchmark.dart @christopherfujino @flutter/tool
/dev/devicelab/bin/tasks/image_list_jit_reported_duration.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/image_list_reported_duration.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/large_image_changer_perf_android.dart @zanderso @flutter/engine
@@ -81,10 +81,12 @@
/dev/devicelab/bin/tasks/picture_cache_perf__e2e_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/platform_channels_benchmarks.dart @gaaclarke @flutter/engine
/dev/devicelab/bin/tasks/platform_views_scroll_perf__timeline_summary.dart @zanderso @flutter/engine
+/dev/devicelab/bin/tasks/platform_views_scroll_perf_impeller__timeline_summary.dart @bdero @flutter/engine
/dev/devicelab/bin/tasks/plugin_dependencies_test.dart @stuartmorgan @flutter/tool
/dev/devicelab/bin/tasks/raster_cache_use_memory_perf__e2e_summary.dart @flar @flutter/engine
/dev/devicelab/bin/tasks/routing_test.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/shader_mask_cache_perf__e2e_summary.dart @flar @flutter/engine
+/dev/devicelab/bin/tasks/spell_check_test_ios.dart @camsim99 @flutter/android
/dev/devicelab/bin/tasks/spell_check_test.dart @camsim99 @flutter/android
/dev/devicelab/bin/tasks/textfield_perf__e2e_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/web_size__compile_test.dart @yjbanov @flutter/web
@@ -98,7 +100,7 @@
/dev/devicelab/bin/tasks/complex_layout_win__compile.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/flavors_test_win.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/flutter_gallery_win__compile.dart @zanderso @flutter/tool
-/dev/devicelab/bin/tasks/hot_mode_dev_cycle_win__benchmark.dart @zanderso @flutter/tool
+/dev/devicelab/bin/tasks/hot_mode_dev_cycle_win__benchmark.dart @andrewkolos @flutter/tool
/dev/devicelab/bin/tasks/windows_chrome_dev_mode.dart @yjbanov @flutter/web
## Mac Android DeviceLab tests
@@ -123,7 +125,7 @@
/dev/devicelab/bin/tasks/hello_world__memory.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/hello_world_android__compile.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/home_scroll_perf__timeline_summary.dart @zanderso @flutter/engine
-/dev/devicelab/bin/tasks/hot_mode_dev_cycle__benchmark.dart @zanderso @flutter/tool
+/dev/devicelab/bin/tasks/hot_mode_dev_cycle__benchmark.dart @eliasyishak @flutter/tool
/dev/devicelab/bin/tasks/hybrid_android_views_integration_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/imagefiltered_transform_animation_perf__timeline_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/integration_test_test.dart @zanderso @flutter/tool
@@ -145,59 +147,62 @@
/dev/devicelab/bin/tasks/tiles_scroll_perf__timeline_summary.dart @zanderso @flutter/engine
## Mac iOS DeviceLab tests
-/dev/devicelab/bin/tasks/animated_complex_opacity_perf_ios__e2e_summary.dart @vashworth @flutter/engine
+/dev/devicelab/bin/tasks/animated_complex_opacity_perf_ios__e2e_summary.dart @cyanglaz @flutter/engine
/dev/devicelab/bin/tasks/animation_with_microtasks_perf_ios__timeline_summary.dart @iskakaushik @flutter/engine
-/dev/devicelab/bin/tasks/backdrop_filter_perf_ios__timeline_summary.dart @vashworth @flutter/engine
+/dev/devicelab/bin/tasks/backdrop_filter_perf_ios__timeline_summary.dart @cyanglaz @flutter/engine
/dev/devicelab/bin/tasks/basic_material_app_ios__compile.dart @vashworth @flutter/tool
-/dev/devicelab/bin/tasks/channels_integration_test_ios.dart @vashworth @flutter/engine
+/dev/devicelab/bin/tasks/channels_integration_test_ios.dart @cyanglaz @flutter/engine
/dev/devicelab/bin/tasks/codegen_integration_mac.dart @zanderso @flutter/tool
-/dev/devicelab/bin/tasks/color_filter_and_fade_perf_ios__e2e_summary.dart @vashworth @flutter/engine
-/dev/devicelab/bin/tasks/complex_layout_ios__compile.dart @vashworth @flutter/engine
-/dev/devicelab/bin/tasks/complex_layout_ios__start_up.dart @vashworth @flutter/engine
+/dev/devicelab/bin/tasks/color_filter_and_fade_perf_ios__e2e_summary.dart @cyanglaz @flutter/engine
+/dev/devicelab/bin/tasks/complex_layout_ios__compile.dart @cyanglaz @flutter/engine
+/dev/devicelab/bin/tasks/complex_layout_ios__start_up.dart @cyanglaz @flutter/engine
/dev/devicelab/bin/tasks/complex_layout_scroll_perf_bad_ios__timeline_summary.dart @jonahwilliams @flutter/engine
-/dev/devicelab/bin/tasks/complex_layout_scroll_perf_ios__timeline_summary.dart @vashworth @flutter/engine
+/dev/devicelab/bin/tasks/complex_layout_scroll_perf_ios__timeline_summary.dart @cyanglaz @flutter/engine
/dev/devicelab/bin/tasks/cubic_bezier_perf_ios_sksl_warmup__timeline_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/external_ui_integration_test_ios.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/flavors_test_ios.dart @vashworth @flutter/tool
/dev/devicelab/bin/tasks/flutter_gallery__transition_perf_e2e_ios.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/flutter_gallery_ios__compile.dart @vashworth @flutter/engine
/dev/devicelab/bin/tasks/flutter_gallery_ios__start_up.dart @vashworth @flutter/engine
+/dev/devicelab/bin/tasks/flutter_gallery_ios__start_up_xcode_debug.dart @vashworth @flutter/engine
/dev/devicelab/bin/tasks/flutter_gallery_ios_sksl_warmup__transition_perf.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/flutter_view_ios__start_up.dart @zanderso @flutter/engine
-/dev/devicelab/bin/tasks/fullscreen_textfield_perf_ios__e2e_summary.dart @vashworth @flutter/engine
+/dev/devicelab/bin/tasks/fullscreen_textfield_perf_ios__e2e_summary.dart @cyanglaz @flutter/engine
/dev/devicelab/bin/tasks/hello_world_ios__compile.dart @vashworth @flutter/engine
-/dev/devicelab/bin/tasks/hot_mode_dev_cycle_ios__benchmark.dart @zanderso @flutter/tool
-/dev/devicelab/bin/tasks/hot_mode_dev_cycle_ios_simulator.dart @vashworth @flutter/tool
+/dev/devicelab/bin/tasks/hot_mode_dev_cycle_ios__benchmark.dart @cyanglaz @flutter/tool
+/dev/devicelab/bin/tasks/hot_mode_dev_cycle_ios_simulator.dart @cyanglaz @flutter/tool
/dev/devicelab/bin/tasks/hot_mode_dev_cycle_macos_target__benchmark.dart @cbracken @flutter/tool
-/dev/devicelab/bin/tasks/imagefiltered_transform_animation_perf_ios__timeline_summary.dart @vashworth @flutter/engine
-/dev/devicelab/bin/tasks/integration_test_test_ios.dart @vashworth @flutter/engine
-/dev/devicelab/bin/tasks/integration_ui_ios_driver.dart @vashworth @flutter/tool
+/dev/devicelab/bin/tasks/imagefiltered_transform_animation_perf_ios__timeline_summary.dart @cyanglaz @flutter/engine
+/dev/devicelab/bin/tasks/integration_test_test_ios.dart @cyanglaz @flutter/engine
+/dev/devicelab/bin/tasks/integration_ui_ios_driver.dart @cyanglaz @flutter/tool
+/dev/devicelab/bin/tasks/integration_ui_ios_driver_xcode_debug.dart @vashworth @flutter/tool
/dev/devicelab/bin/tasks/integration_ui_ios_frame_number.dart @iskakaushik @flutter/engine
-/dev/devicelab/bin/tasks/integration_ui_ios_keyboard_resize.dart @vashworth @flutter/engine
-/dev/devicelab/bin/tasks/integration_ui_ios_screenshot.dart @vashworth @flutter/tool
-/dev/devicelab/bin/tasks/integration_ui_ios_textfield.dart @vashworth @flutter/tool
-/dev/devicelab/bin/tasks/ios_app_with_extensions_test.dart @vashworth @flutter/tool
+/dev/devicelab/bin/tasks/integration_ui_ios_keyboard_resize.dart @cyanglaz @flutter/engine
+/dev/devicelab/bin/tasks/integration_ui_ios_screenshot.dart @cyanglaz @flutter/tool
+/dev/devicelab/bin/tasks/integration_ui_ios_textfield.dart @cyanglaz @flutter/tool
+/dev/devicelab/bin/tasks/ios_app_with_extensions_test.dart @cyanglaz @flutter/tool
/dev/devicelab/bin/tasks/ios_content_validation_test.dart @christopherfujino @flutter/tool
/dev/devicelab/bin/tasks/ios_defines_test.dart @vashworth @flutter/tool
/dev/devicelab/bin/tasks/ios_picture_cache_complexity_scoring_perf__timeline_summary.dart @flar @flutter/engine
/dev/devicelab/bin/tasks/ios_platform_view_tests.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/large_image_changer_perf_ios.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/macos_chrome_dev_mode.dart @zanderso @flutter/tool
-/dev/devicelab/bin/tasks/microbenchmarks_ios.dart @vashworth @flutter/engine
+/dev/devicelab/bin/tasks/microbenchmarks_ios.dart @cyanglaz @flutter/engine
+/dev/devicelab/bin/tasks/microbenchmarks_ios_xcode_debug.dart @vashworth @flutter/engine
/dev/devicelab/bin/tasks/native_platform_view_ui_tests_ios.dart @hellohuanlin @flutter/ios
/dev/devicelab/bin/tasks/new_gallery_ios__transition_perf.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/new_gallery_skia_ios__transition_perf.dart @zanderso @flutter/engine
-/dev/devicelab/bin/tasks/platform_channel_sample_test_ios.dart @vashworth @flutter/engine
-/dev/devicelab/bin/tasks/platform_channel_sample_test_swift.dart @vashworth @flutter/engine
+/dev/devicelab/bin/tasks/platform_channel_sample_test_ios.dart @cyanglaz @flutter/engine
+/dev/devicelab/bin/tasks/platform_channel_sample_test_swift.dart @cyanglaz @flutter/engine
/dev/devicelab/bin/tasks/platform_channels_benchmarks_ios.dart @gaaclarke @flutter/engine
-/dev/devicelab/bin/tasks/platform_interaction_test_ios.dart @vashworth @flutter/engine
+/dev/devicelab/bin/tasks/platform_interaction_test_ios.dart @cyanglaz @flutter/engine
/dev/devicelab/bin/tasks/platform_view_ios__start_up.dart @stuartmorgan @flutter/plugin
-/dev/devicelab/bin/tasks/platform_views_scroll_perf_ios__timeline_summary.dart @vashworth @flutter/engine
+/dev/devicelab/bin/tasks/platform_views_scroll_perf_ios__timeline_summary.dart @cyanglaz @flutter/engine
/dev/devicelab/bin/tasks/platform_views_scroll_perf_non_intersecting_impeller_ios__timeline_summary.dart @jonahwilliams @flutter/engine
-/dev/devicelab/bin/tasks/post_backdrop_filter_perf_ios__timeline_summary.dart @vashworth @flutter/engine
+/dev/devicelab/bin/tasks/post_backdrop_filter_perf_ios__timeline_summary.dart @cyanglaz @flutter/engine
/dev/devicelab/bin/tasks/route_test_ios.dart @vashworth @flutter/tool
-/dev/devicelab/bin/tasks/simple_animation_perf_ios.dart @vashworth @flutter/engine
-/dev/devicelab/bin/tasks/tiles_scroll_perf_ios__timeline_summary.dart @vashworth @flutter/engine
+/dev/devicelab/bin/tasks/simple_animation_perf_ios.dart @cyanglaz @flutter/engine
+/dev/devicelab/bin/tasks/tiles_scroll_perf_ios__timeline_summary.dart @cyanglaz @flutter/engine
/dev/devicelab/bin/tasks/animated_blur_backdrop_filter_perf_ios__timeline_summary.dart @jonahwilliams @flutter/engine
/dev/devicelab/bin/tasks/draw_points_perf_ios__timeline_summary.dart @jonahwilliams @flutter/engine
@@ -219,6 +224,7 @@
/dev/devicelab/bin/tasks/flutter_gallery_macos__start_up.dart @cbracken @flutter/desktop
/dev/devicelab/bin/tasks/flutter_gallery_win_desktop__compile.dart @yaakovschectman @flutter/desktop
/dev/devicelab/bin/tasks/flutter_gallery_win_desktop__start_up.dart @yaakovschectman @flutter/desktop
+/dev/devicelab/bin/tasks/flutter_tool_startup.dart @jensjoha @flutter/tool
/dev/devicelab/bin/tasks/flutter_tool_startup__linux.dart @jensjoha @flutter/tool
/dev/devicelab/bin/tasks/flutter_tool_startup__macos.dart @jensjoha @flutter/tool
/dev/devicelab/bin/tasks/flutter_tool_startup__windows.dart @jensjoha @flutter/tool
@@ -263,6 +269,7 @@
/dev/devicelab/bin/tasks/technical_debt__cost.dart @HansMuller @flutter/framework
/dev/devicelab/bin/tasks/web_benchmarks_canvaskit.dart @yjbanov @flutter/web
/dev/devicelab/bin/tasks/web_benchmarks_html.dart @yjbanov @flutter/web
+/dev/devicelab/bin/tasks/web_benchmarks_skwasm.dart @jacksongardner @flutter/web
/dev/devicelab/bin/tasks/windows_home_scroll_perf__timeline_summary.dart @jonahwilliams @flutter/engine
/dev/devicelab/bin/tasks/windows_startup_test.dart @loic-sharma @flutter/desktop
@@ -295,21 +302,21 @@
# TODO(keyonghan): add files/paths for below framework host only testss.
# https://github.com/flutter/flutter/issues/82068
#
-# build_tests @zanderso @flutter/tool
+# build_tests @eliasyishak @flutter/tool
# ci_yaml flutter roller @caseyhillers @flutter/infra
# coverage @godofredoc @flutter/infra
# flutter_packaging @godofredoc @flutter/infra
# flutter_plugins @stuartmorgan @flutter/plugin
# framework_tests @HansMuller @flutter/framework
-# fuchsia_precache @zanderso @flutter/tool
+# fuchsia_precache @christopherfujino @flutter/tool
# skp_generator @Hixie
# test_ownership @keyonghan
-# tool_host_cross_arch_tests @zanderso @flutter/tool
-# tool_integration_tests @zanderso @flutter/tool
-# tool_tests @zanderso @flutter/tool
-# verify_binaries_codesigned @christopherfujino @flutter/releases
+# tool_host_cross_arch_tests @andrewkolos @flutter/tool
+# tool_integration_tests @christopherfujino @flutter/tool
+# tool_tests @andrewkolos @flutter/tool
+# verify_binaries_codesigned @xilaizhang @flutter/releases
# web_canvaskit_tests @yjbanov @flutter/web
# web_integration_tests @yjbanov @flutter/web
# web_long_running_tests @yjbanov @flutter/web
# web_tests @yjbanov @flutter/web
-# web_tool_tests @zanderso @flutter/tool
+# web_tool_tests @eliasyishak @flutter/tool
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 1eab21a2243e5..747d8e24b4750 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -1,16 +1,15 @@
# Specify analysis options.
#
-# For a list of lints, see: http://dart-lang.github.io/linter/lints/
-# See the configuration guide for more
-# https://github.com/dart-lang/sdk/tree/main/pkg/analyzer#configuring-the-analyzer
+# For a list of lints, see: https://dart.dev/lints
+# For guidelines on configuring static analysis, see:
+# https://dart.dev/guides/language/analysis-options
#
# There are other similar analysis options files in the flutter repos,
# which should be kept in sync with this file:
#
# - analysis_options.yaml (this file)
-# - https://github.com/flutter/plugins/blob/master/analysis_options.yaml
-# - https://github.com/flutter/engine/blob/master/analysis_options.yaml
-# - https://github.com/flutter/packages/blob/master/analysis_options.yaml
+# - https://github.com/flutter/engine/blob/main/analysis_options.yaml
+# - https://github.com/flutter/packages/blob/main/analysis_options.yaml
#
# This file contains the analysis options used for code in the flutter/flutter
# repository.
@@ -31,7 +30,7 @@ analyzer:
linter:
rules:
# This list is derived from the list of all available lints located at
- # https://github.com/dart-lang/linter/blob/master/example/all.yaml
+ # https://github.com/dart-lang/linter/blob/main/example/all.yaml
- always_declare_return_types
- always_put_control_body_on_new_line
# - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219
@@ -110,7 +109,6 @@ linter:
- implicit_call_tearoffs
- implicit_reopen
- invalid_case_patterns
- - iterable_contains_unrelated_type
# - join_return_with_assignment # not required by flutter style
- leading_newlines_in_multiline_strings
- library_annotations
@@ -118,7 +116,6 @@ linter:
- library_prefixes
- library_private_types_in_public_api
# - lines_longer_than_80_chars # not required by flutter style
- - list_remove_unrelated_type
# - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/linter/issues/453
# - matching_super_parameters # blocked on https://github.com/dart-lang/language/issues/2509
- missing_whitespace_between_adjacent_strings
@@ -130,6 +127,8 @@ linter:
- no_literal_bool_comparisons
- no_logic_in_create_state
# - no_runtimeType_toString # ok in tests; we enable this only in packages/
+ - no_self_assignments
+ - no_wildcard_variable_uses
- non_constant_identifier_names
- noop_primitive_operations
- null_check_on_nullable_type_parameter
@@ -224,7 +223,7 @@ linter:
- unnecessary_string_interpolations
- unnecessary_this
- unnecessary_to_list_in_spreads
- # - unreachable_from_main # Do not enable this rule until it is un-marked as "experimental" and carefully re-evaluated.
+ - unreachable_from_main
- unrelated_type_equality_checks
- unsafe_html
- use_build_context_synchronously
diff --git a/bin/internal/engine.version b/bin/internal/engine.version
index 4311d66dfc2f1..354e60cd50630 100644
--- a/bin/internal/engine.version
+++ b/bin/internal/engine.version
@@ -1 +1 @@
-6ff02c17268ff8d0dc0cf33c7df0ef76c66cecff
+7cf74ca79c3a332497b31afe28cbec935e897a85
diff --git a/bin/internal/flutter_packages.version b/bin/internal/flutter_packages.version
index 6e55c855ebb93..3999e9c238279 100644
--- a/bin/internal/flutter_packages.version
+++ b/bin/internal/flutter_packages.version
@@ -1 +1 @@
-995bfc5f98572224cbe9776ae037697ff44c45cf
+771ec9b42a382b2282d2a18f99e96b6276d7063c
diff --git a/bin/internal/fuchsia-linux.version b/bin/internal/fuchsia-linux.version
index 72a39fbdc4a11..11f77a582348c 100644
--- a/bin/internal/fuchsia-linux.version
+++ b/bin/internal/fuchsia-linux.version
@@ -1 +1 @@
-nLnQzTesaABpgroOlhBeASv01MRL0Jc8PYKa6rU42hkC
+iwgWLB4KaXslnaGwKuAD5S9wamgkF0Mj9a411131XdkC
diff --git a/bin/internal/fuchsia-mac.version b/bin/internal/fuchsia-mac.version
index 3c348f7b60365..40252d6d5a90b 100644
--- a/bin/internal/fuchsia-mac.version
+++ b/bin/internal/fuchsia-mac.version
@@ -1 +1 @@
-X4uS4T6_J-VUh9M4AOEc6qP0HLS0HpuLm1nDElf---0C
+C3Q7MJBYkiin8zw-fLJ9QmM-8anKHqabR7B2KFuBYUgC
diff --git a/bin/internal/release-candidate-branch.version b/bin/internal/release-candidate-branch.version
new file mode 100644
index 0000000000000..e9546287aea5d
--- /dev/null
+++ b/bin/internal/release-candidate-branch.version
@@ -0,0 +1 @@
+flutter-3.13-candidate.0
diff --git a/bin/internal/shared.bat b/bin/internal/shared.bat
index d2f41602e2c6b..421868a9ee580 100644
--- a/bin/internal/shared.bat
+++ b/bin/internal/shared.bat
@@ -128,6 +128,7 @@ GOTO :after_subroutine
:do_snapshot
IF EXIST "%FLUTTER_ROOT%\version" DEL "%FLUTTER_ROOT%\version"
+ IF EXIST "%FLUTTER_ROOT%\bin\cache\flutter.version.json" DEL "%FLUTTER_ROOT%\bin\cache\flutter.version.json"
ECHO: > "%cache_dir%\.dartignore"
ECHO Building flutter tool... 1>&2
PUSHD "%flutter_tools_dir%"
diff --git a/bin/internal/shared.sh b/bin/internal/shared.sh
index 93dc7d7a7567a..3532c23114a57 100644
--- a/bin/internal/shared.sh
+++ b/bin/internal/shared.sh
@@ -123,7 +123,10 @@ function upgrade_flutter () (
# * STAMP_PATH is an empty file, or
# * Contents of STAMP_PATH is not what we are going to compile, or
# * pubspec.yaml last modified after pubspec.lock
- if [[ ! -f "$SNAPSHOT_PATH" || ! -s "$STAMP_PATH" || "$(cat "$STAMP_PATH")" != "$compilekey" || "$FLUTTER_TOOLS_DIR/pubspec.yaml" -nt "$FLUTTER_TOOLS_DIR/pubspec.lock" ]]; then
+ if [[ ! -f "$SNAPSHOT_PATH" || \
+ ! -s "$STAMP_PATH" || \
+ "$(cat "$STAMP_PATH")" != "$compilekey" || \
+ "$FLUTTER_TOOLS_DIR/pubspec.yaml" -nt "$FLUTTER_TOOLS_DIR/pubspec.lock" ]]; then
# Waits for the update lock to be acquired. Placing this check inside the
# conditional allows the majority of flutter/dart installations to bypass
# the lock entirely, but as a result this required a second verification that
@@ -137,6 +140,7 @@ function upgrade_flutter () (
# Fetch Dart...
rm -f "$FLUTTER_ROOT/version"
+ rm -f "$FLUTTER_ROOT/bin/cache/flutter.version.json"
touch "$FLUTTER_ROOT/bin/cache/.dartignore"
"$FLUTTER_ROOT/bin/internal/update_dart_sdk.sh"
diff --git a/dev/automated_tests/flutter_test/print_correct_local_widget_test.dart b/dev/automated_tests/flutter_test/print_correct_local_widget_test.dart
index c24a2555f3593..f00ceb52b5d25 100644
--- a/dev/automated_tests/flutter_test/print_correct_local_widget_test.dart
+++ b/dev/automated_tests/flutter_test/print_correct_local_widget_test.dart
@@ -10,6 +10,7 @@ void main() {
// This should fail with user created widget = Row.
await tester.pumpWidget(
MaterialApp(
+ theme: ThemeData(useMaterial3: false),
home: Scaffold(
appBar: AppBar(
title: const Text('RenderFlex OverFlow'),
diff --git a/dev/automated_tests/pubspec.yaml b/dev/automated_tests/pubspec.yaml
index 984c014abadaa..e930a775edacd 100644
--- a/dev/automated_tests/pubspec.yaml
+++ b/dev/automated_tests/pubspec.yaml
@@ -13,11 +13,11 @@ dependencies:
integration_test:
sdk: flutter
platform: 3.1.0
- test: 1.24.2
+ test: 1.24.3
- _fe_analyzer_shared: 60.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- analyzer: 5.12.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- args: 2.4.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ _fe_analyzer_shared: 61.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ analyzer: 5.13.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -29,13 +29,13 @@ dependencies:
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- glob: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
http_parser: 4.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
io: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
js: 0.6.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- logging: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- matcher: 0.12.15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ logging: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ matcher: 0.12.16 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
material_color_utilities: 0.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
meta: 1.9.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
mime: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -56,12 +56,13 @@ dependencies:
stream_channel: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
string_scanner: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
term_glyph: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- test_api: 0.5.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- test_core: 0.5.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ test_api: 0.6.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ test_core: 0.5.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
typed_data: 1.3.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- vm_service: 11.6.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ vm_service: 11.7.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
watcher: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ web: 0.1.4-beta # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
web_socket_channel: 2.4.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -71,4 +72,4 @@ flutter:
assets:
- icon/test.png
-# PUBSPEC CHECKSUM: bff1
+# PUBSPEC CHECKSUM: 8050
diff --git a/dev/benchmarks/complex_layout/ios/Runner/Info.plist b/dev/benchmarks/complex_layout/ios/Runner/Info.plist
index acf7d7bff061a..dd132e4c2a7c1 100644
--- a/dev/benchmarks/complex_layout/ios/Runner/Info.plist
+++ b/dev/benchmarks/complex_layout/ios/Runner/Info.plist
@@ -39,8 +39,6 @@
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
- UIViewControllerBasedStatusBarAppearance
-
CADisableMinimumFrameDurationOnPhone
UIApplicationSupportsIndirectInputEvents
diff --git a/dev/benchmarks/complex_layout/pubspec.yaml b/dev/benchmarks/complex_layout/pubspec.yaml
index 2add711796def..fe6ed3df54dc5 100644
--- a/dev/benchmarks/complex_layout/pubspec.yaml
+++ b/dev/benchmarks/complex_layout/pubspec.yaml
@@ -21,8 +21,7 @@ dependencies:
characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
collection: 1.17.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- js: 0.6.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- matcher: 0.12.15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ matcher: 0.12.16 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
material_color_utilities: 0.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
meta: 1.9.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
path: 1.8.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -32,32 +31,34 @@ dependencies:
string_scanner: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
sync_http: 0.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
term_glyph: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- test_api: 0.5.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ test_api: 0.6.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- vm_service: 11.6.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ vm_service: 11.7.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ web: 0.1.4-beta # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
webdriver: 3.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dev_dependencies:
flutter_test:
sdk: flutter
- test: 1.24.2
+ test: 1.24.3
integration_test:
sdk: flutter
- _fe_analyzer_shared: 60.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- analyzer: 5.12.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- args: 2.4.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ _fe_analyzer_shared: 61.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ analyzer: 5.13.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- glob: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
http_parser: 4.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
io: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- logging: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ js: 0.6.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ logging: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
mime: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
node_preamble: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
package_config: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -69,7 +70,7 @@ dev_dependencies:
shelf_web_socket: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
source_map_stack_trace: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
source_maps: 0.10.12 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
- test_core: 0.5.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+ test_core: 0.5.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
typed_data: 1.3.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
watcher: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
web_socket_channel: 2.4.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -82,4 +83,4 @@ flutter:
- packages/flutter_gallery_assets/people/square/ali.png
- packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png
-# PUBSPEC CHECKSUM: 09ca
+# PUBSPEC CHECKSUM: 1c29
diff --git a/dev/benchmarks/complex_layout/windows/flutter/generated_plugins.cmake b/dev/benchmarks/complex_layout/windows/flutter/generated_plugins.cmake
deleted file mode 100644
index b93c4c30c1670..0000000000000
--- a/dev/benchmarks/complex_layout/windows/flutter/generated_plugins.cmake
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# Generated file, do not edit.
-#
-
-list(APPEND FLUTTER_PLUGIN_LIST
-)
-
-list(APPEND FLUTTER_FFI_PLUGIN_LIST
-)
-
-set(PLUGIN_BUNDLED_LIBRARIES)
-
-foreach(plugin ${FLUTTER_PLUGIN_LIST})
- add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
- target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
- list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
- list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
-endforeach(plugin)
-
-foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
- add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
- list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
-endforeach(ffi_plugin)
diff --git a/dev/benchmarks/macrobenchmarks/ios/Runner/Info.plist b/dev/benchmarks/macrobenchmarks/ios/Runner/Info.plist
index 6a54a91263e39..3e5abf1294736 100644
--- a/dev/benchmarks/macrobenchmarks/ios/Runner/Info.plist
+++ b/dev/benchmarks/macrobenchmarks/ios/Runner/Info.plist
@@ -39,8 +39,6 @@
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
- UIViewControllerBasedStatusBarAppearance
-
CADisableMinimumFrameDurationOnPhone
UIApplicationSupportsIndirectInputEvents
diff --git a/dev/benchmarks/macrobenchmarks/lib/src/opacity_peephole.dart b/dev/benchmarks/macrobenchmarks/lib/src/opacity_peephole.dart
index a596050a03ee0..9e792c05c227f 100644
--- a/dev/benchmarks/macrobenchmarks/lib/src/opacity_peephole.dart
+++ b/dev/benchmarks/macrobenchmarks/lib/src/opacity_peephole.dart
@@ -21,7 +21,7 @@ class OpacityPeepholePage extends StatelessWidget {
body: ListView(
key: const Key(kOpacityScrollableName),
children: [
- for (OpacityPeepholeCase variant in allOpacityPeepholeCases)
+ for (final OpacityPeepholeCase variant in allOpacityPeepholeCases)
ElevatedButton(
key: Key(variant.route),
child: Text(variant.name),
diff --git a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_image_decoding.dart b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_image_decoding.dart
index fc478993ce450..b68ecc9bcf0ab 100644
--- a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_image_decoding.dart
+++ b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_image_decoding.dart
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-import 'dart:html' as html;
+import 'dart:js_interop';
import 'dart:typed_data';
import 'dart:ui' as ui;
+import 'package:web/web.dart' as web;
+
import 'recorder.dart';
// Measures the performance of image decoding.
@@ -43,8 +45,11 @@ class BenchImageDecoding extends RawRecorder {
return;
}
for (final String imageUrl in _imageUrls) {
- final html.Body image = await html.window.fetch(imageUrl) as html.Body;
- _imageData.add((await image.arrayBuffer() as ByteBuffer).asUint8List());
+ final Future fetchFuture = web.window.fetch(imageUrl.toJS).toDart;
+ final web.Body image = (await fetchFuture)! as web.Body;
+ final Future imageFuture = image.arrayBuffer().toDart;
+ final JSArrayBuffer imageBuffer = (await imageFuture)! as JSArrayBuffer;
+ _imageData.add(imageBuffer.toDart.asUint8List());
}
}
diff --git a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_material_3.dart b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_material_3.dart
index a531281c6d468..882ae9266ff5f 100644
--- a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_material_3.dart
+++ b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_material_3.dart
@@ -3,8 +3,8 @@
// found in the LICENSE file.
import 'package:flutter/material.dart';
-import 'package:flutter/services.dart';
+import 'material3.dart';
import 'recorder.dart';
/// Measures how expensive it is to construct the material 3 components screen.
@@ -15,2330 +15,6 @@ class BenchMaterial3Components extends WidgetBuildRecorder {
@override
Widget createWidget() {
- return const Material3Components();
- }
-}
-
-const SizedBox rowDivider = SizedBox(width: 20);
-const SizedBox colDivider = SizedBox(height: 10);
-const double smallSpacing = 10.0;
-const double cardWidth = 115;
-const double widthConstraint = 450;
-
-class Material3Components extends StatefulWidget {
- const Material3Components({super.key});
-
- @override
- State createState() => _Material3ComponentsState();
-}
-
-class _Material3ComponentsState extends State {
- final GlobalKey scaffoldKey = GlobalKey();
-
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- home: Scaffold(
- key: scaffoldKey,
- body: Row(
- children: [
- Expanded(
- child: FirstComponentList(
- showNavBottomBar: true,
- scaffoldKey: scaffoldKey,
- showSecondList: true,
- ),
- ),
- Expanded(
- child: SecondComponentList(scaffoldKey: scaffoldKey),
- ),
- ],
- ),
- ),
- );
- }
-}
-
-class FirstComponentList extends StatelessWidget {
- const FirstComponentList({
- super.key,
- required this.showNavBottomBar,
- required this.scaffoldKey,
- required this.showSecondList,
- });
-
- final bool showNavBottomBar;
- final GlobalKey scaffoldKey;
- final bool showSecondList;
-
- @override
- Widget build(BuildContext context) {
- // Fully traverse this list before moving on.
- return FocusTraversalGroup(
- child: ListView(
- padding: showSecondList
- ? const EdgeInsetsDirectional.only(end: smallSpacing)
- : EdgeInsets.zero,
- children: [
- const Actions(),
- colDivider,
- const Communication(),
- colDivider,
- const Containment(),
- if (!showSecondList) ...[
- colDivider,
- Navigation(scaffoldKey: scaffoldKey),
- colDivider,
- const Selection(),
- colDivider,
- const TextInputs()
- ],
- ],
- ),
- );
- }
-}
-
-class SecondComponentList extends StatelessWidget {
- const SecondComponentList({
- super.key,
- required this.scaffoldKey,
- });
-
- final GlobalKey scaffoldKey;
-
- @override
- Widget build(BuildContext context) {
- // Fully traverse this list before moving on.
- return FocusTraversalGroup(
- child: ListView(
- padding: const EdgeInsetsDirectional.only(end: smallSpacing),
- children: [
- Navigation(scaffoldKey: scaffoldKey),
- colDivider,
- const Selection(),
- colDivider,
- const TextInputs(),
- ],
- ),
- );
- }
-}
-
-class Actions extends StatelessWidget {
- const Actions({super.key});
-
- @override
- Widget build(BuildContext context) {
- return const ComponentGroupDecoration(label: 'Actions', children: [
- Buttons(),
- FloatingActionButtons(),
- IconToggleButtons(),
- SegmentedButtons(),
- ]);
- }
-}
-
-class Communication extends StatelessWidget {
- const Communication({super.key});
-
- @override
- Widget build(BuildContext context) {
- return const ComponentGroupDecoration(label: 'Communication', children: [
- NavigationBars(
- selectedIndex: 1,
- isExampleBar: true,
- isBadgeExample: true,
- ),
- ProgressIndicators(),
- SnackBarSection(),
- ]);
- }
-}
-
-class Containment extends StatelessWidget {
- const Containment({super.key});
-
- @override
- Widget build(BuildContext context) {
- return const ComponentGroupDecoration(label: 'Containment', children: [
- BottomSheetSection(),
- Cards(),
- Dialogs(),
- Dividers(),
- ]);
- }
-}
-
-class Navigation extends StatelessWidget {
- const Navigation({super.key, required this.scaffoldKey});
-
- final GlobalKey scaffoldKey;
-
- @override
- Widget build(BuildContext context) {
- return ComponentGroupDecoration(label: 'Navigation', children: [
- const BottomAppBars(),
- const NavigationBars(
- selectedIndex: 0,
- isExampleBar: true,
- ),
- NavigationDrawers(scaffoldKey: scaffoldKey),
- const NavigationRails(),
- const Tabs(),
- const TopAppBars(),
- ]);
- }
-}
-
-class Selection extends StatelessWidget {
- const Selection({super.key});
-
- @override
- Widget build(BuildContext context) {
- return const ComponentGroupDecoration(label: 'Selection', children: [
- Checkboxes(),
- Chips(),
- Menus(),
- Radios(),
- Sliders(),
- Switches(),
- ]);
- }
-}
-
-class TextInputs extends StatelessWidget {
- const TextInputs({super.key});
-
- @override
- Widget build(BuildContext context) {
- return const ComponentGroupDecoration(
- label: 'Text inputs',
- children: [TextFields()],
- );
- }
-}
-
-class Buttons extends StatefulWidget {
- const Buttons({super.key});
-
- @override
- State createState() => _ButtonsState();
-}
-
-class _ButtonsState extends State {
- @override
- Widget build(BuildContext context) {
- return const ComponentDecoration(
- label: 'Common buttons',
- tooltipMessage:
- 'Use ElevatedButton, FilledButton, FilledButton.tonal, OutlinedButton, or TextButton',
- child: SingleChildScrollView(
- scrollDirection: Axis.horizontal,
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- children: [
- ButtonsWithoutIcon(isDisabled: false),
- ButtonsWithIcon(),
- ButtonsWithoutIcon(isDisabled: true),
- ],
- ),
- ),
- );
- }
-}
-
-class ButtonsWithoutIcon extends StatelessWidget {
- const ButtonsWithoutIcon({super.key, required this.isDisabled});
-
- final bool isDisabled;
-
- @override
- Widget build(BuildContext context) {
- return Padding(
- padding: const EdgeInsets.symmetric(horizontal: 5.0),
- child: IntrinsicWidth(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: [
- ElevatedButton(
- onPressed: isDisabled ? null : () {},
- child: const Text('Elevated'),
- ),
- colDivider,
- FilledButton(
- onPressed: isDisabled ? null : () {},
- child: const Text('Filled'),
- ),
- colDivider,
- FilledButton.tonal(
- onPressed: isDisabled ? null : () {},
- child: const Text('Filled tonal'),
- ),
- colDivider,
- OutlinedButton(
- onPressed: isDisabled ? null : () {},
- child: const Text('Outlined'),
- ),
- colDivider,
- TextButton(
- onPressed: isDisabled ? null : () {},
- child: const Text('Text'),
- ),
- ],
- ),
- ),
- );
- }
-}
-
-class ButtonsWithIcon extends StatelessWidget {
- const ButtonsWithIcon({super.key});
-
- @override
- Widget build(BuildContext context) {
- return Padding(
- padding: const EdgeInsets.symmetric(horizontal: 10.0),
- child: IntrinsicWidth(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: [
- ElevatedButton.icon(
- onPressed: () {},
- icon: const Icon(Icons.add),
- label: const Text('Icon'),
- ),
- colDivider,
- FilledButton.icon(
- onPressed: () {},
- label: const Text('Icon'),
- icon: const Icon(Icons.add),
- ),
- colDivider,
- FilledButton.tonalIcon(
- onPressed: () {},
- label: const Text('Icon'),
- icon: const Icon(Icons.add),
- ),
- colDivider,
- OutlinedButton.icon(
- onPressed: () {},
- icon: const Icon(Icons.add),
- label: const Text('Icon'),
- ),
- colDivider,
- TextButton.icon(
- onPressed: () {},
- icon: const Icon(Icons.add),
- label: const Text('Icon'),
- )
- ],
- ),
- ),
- );
- }
-}
-
-class FloatingActionButtons extends StatelessWidget {
- const FloatingActionButtons({super.key});
-
- @override
- Widget build(BuildContext context) {
- return ComponentDecoration(
- label: 'Floating action buttons',
- tooltipMessage:
- 'Use FloatingActionButton or FloatingActionButton.extended',
- child: Wrap(
- crossAxisAlignment: WrapCrossAlignment.center,
- runSpacing: smallSpacing,
- spacing: smallSpacing,
- children: [
- FloatingActionButton.small(
- onPressed: () {},
- tooltip: 'Small',
- child: const Icon(Icons.add),
- ),
- FloatingActionButton.extended(
- onPressed: () {},
- tooltip: 'Extended',
- icon: const Icon(Icons.add),
- label: const Text('Create'),
- ),
- FloatingActionButton(
- onPressed: () {},
- tooltip: 'Standard',
- child: const Icon(Icons.add),
- ),
- FloatingActionButton.large(
- onPressed: () {},
- tooltip: 'Large',
- child: const Icon(Icons.add),
- ),
- ],
- ),
- );
- }
-}
-
-class Cards extends StatelessWidget {
- const Cards({super.key});
-
- @override
- Widget build(BuildContext context) {
- return ComponentDecoration(
- label: 'Cards',
- tooltipMessage: 'Use Card',
- child: Wrap(
- alignment: WrapAlignment.spaceEvenly,
- children: [
- SizedBox(
- width: cardWidth,
- child: Card(
- child: Container(
- padding: const EdgeInsets.fromLTRB(10, 5, 5, 10),
- child: Column(
- children: [
- Align(
- alignment: Alignment.topRight,
- child: IconButton(
- icon: const Icon(Icons.more_vert),
- onPressed: () {},
- ),
- ),
- const SizedBox(height: 20),
- const Align(
- alignment: Alignment.bottomLeft,
- child: Text('Elevated'),
- )
- ],
- ),
- ),
- ),
- ),
- SizedBox(
- width: cardWidth,
- child: Card(
- color: Theme.of(context).colorScheme.surfaceVariant,
- elevation: 0,
- child: Container(
- padding: const EdgeInsets.fromLTRB(10, 5, 5, 10),
- child: Column(
- children: [
- Align(
- alignment: Alignment.topRight,
- child: IconButton(
- icon: const Icon(Icons.more_vert),
- onPressed: () {},
- ),
- ),
- const SizedBox(height: 20),
- const Align(
- alignment: Alignment.bottomLeft,
- child: Text('Filled'),
- )
- ],
- ),
- ),
- ),
- ),
- SizedBox(
- width: cardWidth,
- child: Card(
- elevation: 0,
- shape: RoundedRectangleBorder(
- side: BorderSide(
- color: Theme.of(context).colorScheme.outline,
- ),
- borderRadius: const BorderRadius.all(Radius.circular(12)),
- ),
- child: Container(
- padding: const EdgeInsets.fromLTRB(10, 5, 5, 10),
- child: Column(
- children: [
- Align(
- alignment: Alignment.topRight,
- child: IconButton(
- icon: const Icon(Icons.more_vert),
- onPressed: () {},
- ),
- ),
- const SizedBox(height: 20),
- const Align(
- alignment: Alignment.bottomLeft,
- child: Text('Outlined'),
- )
- ],
- ),
- ),
- ),
- ),
- ],
- ),
- );
- }
-}
-
-class _ClearButton extends StatelessWidget {
- const _ClearButton({required this.controller});
-
- final TextEditingController controller;
-
- @override
- Widget build(BuildContext context) => IconButton(
- icon: const Icon(Icons.clear),
- onPressed: () => controller.clear(),
- );
-}
-
-class TextFields extends StatefulWidget {
- const TextFields({super.key});
-
- @override
- State createState() => _TextFieldsState();
-}
-
-class _TextFieldsState extends State {
- final TextEditingController _controllerFilled = TextEditingController();
- final TextEditingController _controllerOutlined = TextEditingController();
-
- @override
- Widget build(BuildContext context) {
- return ComponentDecoration(
- label: 'Text fields',
- tooltipMessage: 'Use TextField with different InputDecoration',
- child: Column(
- children: [
- Padding(
- padding: const EdgeInsets.all(smallSpacing),
- child: TextField(
- controller: _controllerFilled,
- decoration: InputDecoration(
- prefixIcon: const Icon(Icons.search),
- suffixIcon: _ClearButton(controller: _controllerFilled),
- labelText: 'Filled',
- hintText: 'hint text',
- helperText: 'supporting text',
- filled: true,
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsets.all(smallSpacing),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Flexible(
- child: SizedBox(
- width: 200,
- child: TextField(
- maxLength: 10,
- maxLengthEnforcement: MaxLengthEnforcement.none,
- controller: _controllerFilled,
- decoration: InputDecoration(
- prefixIcon: const Icon(Icons.search),
- suffixIcon: _ClearButton(controller: _controllerFilled),
- labelText: 'Filled',
- hintText: 'hint text',
- helperText: 'supporting text',
- filled: true,
- errorText: 'error text',
- ),
- ),
- ),
- ),
- const SizedBox(width: smallSpacing),
- Flexible(
- child: SizedBox(
- width: 200,
- child: TextField(
- controller: _controllerFilled,
- enabled: false,
- decoration: InputDecoration(
- prefixIcon: const Icon(Icons.search),
- suffixIcon: _ClearButton(controller: _controllerFilled),
- labelText: 'Disabled',
- hintText: 'hint text',
- helperText: 'supporting text',
- filled: true,
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Padding(
- padding: const EdgeInsets.all(smallSpacing),
- child: TextField(
- controller: _controllerOutlined,
- decoration: InputDecoration(
- prefixIcon: const Icon(Icons.search),
- suffixIcon: _ClearButton(controller: _controllerOutlined),
- labelText: 'Outlined',
- hintText: 'hint text',
- helperText: 'supporting text',
- border: const OutlineInputBorder(),
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsets.all(smallSpacing),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Flexible(
- child: SizedBox(
- width: 200,
- child: TextField(
- controller: _controllerOutlined,
- decoration: InputDecoration(
- prefixIcon: const Icon(Icons.search),
- suffixIcon:
- _ClearButton(controller: _controllerOutlined),
- labelText: 'Outlined',
- hintText: 'hint text',
- helperText: 'supporting text',
- errorText: 'error text',
- border: const OutlineInputBorder(),
- filled: true,
- ),
- ),
- ),
- ),
- const SizedBox(width: smallSpacing),
- Flexible(
- child: SizedBox(
- width: 200,
- child: TextField(
- controller: _controllerOutlined,
- enabled: false,
- decoration: InputDecoration(
- prefixIcon: const Icon(Icons.search),
- suffixIcon:
- _ClearButton(controller: _controllerOutlined),
- labelText: 'Disabled',
- hintText: 'hint text',
- helperText: 'supporting text',
- border: const OutlineInputBorder(),
- filled: true,
- ),
- ),
- ),
- ),
- ])),
- ],
- ),
- );
- }
-}
-
-class Dialogs extends StatefulWidget {
- const Dialogs({super.key});
-
- @override
- State createState() => _DialogsState();
-}
-
-class _DialogsState extends State {
- void openDialog(BuildContext context) {
- showDialog(
- context: context,
- builder: (BuildContext context) => AlertDialog(
- title: const Text('What is a dialog?'),
- content: const Text(
- 'A dialog is a type of modal window that appears in front of app content to provide critical information, or prompt for a decision to be made.'),
- actions: [
- TextButton(
- child: const Text('Okay'),
- onPressed: () => Navigator.of(context).pop(),
- ),
- FilledButton(
- child: const Text('Dismiss'),
- onPressed: () => Navigator.of(context).pop(),
- ),
- ],
- ),
- );
- }
-
- void openFullscreenDialog(BuildContext context) {
- showDialog(
- context: context,
- builder: (BuildContext context) => Dialog.fullscreen(
- child: Padding(
- padding: const EdgeInsets.all(20.0),
- child: Scaffold(
- appBar: AppBar(
- title: const Text('Full-screen dialog'),
- centerTitle: false,
- leading: IconButton(
- icon: const Icon(Icons.close),
- onPressed: () => Navigator.of(context).pop(),
- ),
- actions: [
- TextButton(
- child: const Text('Close'),
- onPressed: () => Navigator.of(context).pop(),
- ),
- ],
- ),
- ),
- ),
- ),
- );
- }
-
- @override
- Widget build(BuildContext context) {
- return ComponentDecoration(
- label: 'Dialog',
- tooltipMessage:
- 'Use showDialog with Dialog.fullscreen, AlertDialog, or SimpleDialog',
- child: Wrap(
- alignment: WrapAlignment.spaceBetween,
- children: [
- TextButton(
- child: const Text(
- 'Show dialog',
- style: TextStyle(fontWeight: FontWeight.bold),
- ),
- onPressed: () => openDialog(context),
- ),
- TextButton(
- child: const Text(
- 'Show full-screen dialog',
- style: TextStyle(fontWeight: FontWeight.bold),
- ),
- onPressed: () => openFullscreenDialog(context),
- ),
- ],
- ),
- );
- }
-}
-
-class Dividers extends StatelessWidget {
- const Dividers({super.key});
-
- @override
- Widget build(BuildContext context) {
- return const ComponentDecoration(
- label: 'Dividers',
- tooltipMessage: 'Use Divider or VerticalDivider',
- child: Column(
- children: [
- Divider(key: Key('divider')),
- ],
- ),
- );
- }
-}
-
-class Switches extends StatelessWidget {
- const Switches({super.key});
-
- @override
- Widget build(BuildContext context) {
- return const ComponentDecoration(
- label: 'Switches',
- tooltipMessage: 'Use SwitchListTile or Switch',
- child: Column(
- children: [
- SwitchRow(isEnabled: true),
- SwitchRow(isEnabled: false),
- ],
- ),
- );
- }
-}
-
-class SwitchRow extends StatefulWidget {
- const SwitchRow({super.key, required this.isEnabled});
-
- final bool isEnabled;
-
- @override
- State createState() => _SwitchRowState();
-}
-
-class _SwitchRowState extends State {
- bool value0 = false;
- bool value1 = true;
-
- final MaterialStateProperty thumbIcon =
- MaterialStateProperty.resolveWith((Set states) {
- if (states.contains(MaterialState.selected)) {
- return const Icon(Icons.check);
- }
- return const Icon(Icons.close);
- });
-
- @override
- Widget build(BuildContext context) {
- return Row(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- children: [
- Switch(
- value: value0,
- onChanged: widget.isEnabled
- ? (bool value) {
- setState(() {
- value0 = value;
- });
- }
- : null,
- ),
- Switch(
- thumbIcon: thumbIcon,
- value: value1,
- onChanged: widget.isEnabled
- ? (bool value) {
- setState(() {
- value1 = value;
- });
- }
- : null,
- ),
- ],
- );
- }
-}
-
-class Checkboxes extends StatefulWidget {
- const Checkboxes({super.key});
-
- @override
- State createState() => _CheckboxesState();
-}
-
-class _CheckboxesState extends State {
- bool? isChecked0 = true;
- bool? isChecked1;
- bool? isChecked2 = false;
-
- @override
- Widget build(BuildContext context) {
- return ComponentDecoration(
- label: 'Checkboxes',
- tooltipMessage: 'Use CheckboxListTile or Checkbox',
- child: Column(
- children: [
- CheckboxListTile(
- tristate: true,
- value: isChecked0,
- title: const Text('Option 1'),
- onChanged: (bool? value) {
- setState(() {
- isChecked0 = value;
- });
- },
- ),
- CheckboxListTile(
- tristate: true,
- value: isChecked1,
- title: const Text('Option 2'),
- onChanged: (bool? value) {
- setState(() {
- isChecked1 = value;
- });
- },
- ),
- CheckboxListTile(
- tristate: true,
- value: isChecked2,
- title: const Text('Option 3'),
- onChanged: (bool? value) {
- setState(() {
- isChecked2 = value;
- });
- },
- ),
- const CheckboxListTile(
- tristate: true,
- title: Text('Option 4'),
- value: true,
- onChanged: null,
- ),
- ],
- ),
- );
- }
-}
-
-enum Value { first, second }
-
-class Radios extends StatefulWidget {
- const Radios({super.key});
-
- @override
- State createState() => _RadiosState();
-}
-
-enum Options { option1, option2, option3 }
-
-class _RadiosState extends State {
- Options? _selectedOption = Options.option1;
-
- @override
- Widget build(BuildContext context) {
- return ComponentDecoration(
- label: 'Radio buttons',
- tooltipMessage: 'Use RadioListTile or Radio',
- child: Column(
- children: [
- RadioListTile(
- title: const Text('Option 1'),
- value: Options.option1,
- groupValue: _selectedOption,
- onChanged: (Options? value) {
- setState(() {
- _selectedOption = value;
- });
- },
- ),
- RadioListTile(
- title: const Text('Option 2'),
- value: Options.option2,
- groupValue: _selectedOption,
- onChanged: (Options? value) {
- setState(() {
- _selectedOption = value;
- });
- },
- ),
- RadioListTile(
- title: const Text('Option 3'),
- value: Options.option3,
- groupValue: _selectedOption,
- onChanged: null,
- ),
- ],
- ),
- );
- }
-}
-
-class ProgressIndicators extends StatefulWidget {
- const ProgressIndicators({super.key});
-
- @override
- State createState() => _ProgressIndicatorsState();
-}
-
-class _ProgressIndicatorsState extends State {
- bool playProgressIndicator = false;
-
- @override
- Widget build(BuildContext context) {
- final double? progressValue = playProgressIndicator ? null : 0.7;
-
- return ComponentDecoration(
- label: 'Progress indicators',
- tooltipMessage:
- 'Use CircularProgressIndicator or LinearProgressIndicator',
- child: Column(
- children: [
- Row(
- children: [
- IconButton(
- isSelected: playProgressIndicator,
- selectedIcon: const Icon(Icons.pause),
- icon: const Icon(Icons.play_arrow),
- onPressed: () {
- setState(() {
- playProgressIndicator = !playProgressIndicator;
- });
- },
- ),
- Expanded(
- child: Row(
- children: [
- rowDivider,
- CircularProgressIndicator(
- value: progressValue,
- ),
- rowDivider,
- Expanded(
- child: LinearProgressIndicator(
- value: progressValue,
- ),
- ),
- rowDivider,
- ],
- ),
- ),
- ],
- ),
- ],
- ),
- );
- }
-}
-
-const List appBarDestinations = [
- NavigationDestination(
- tooltip: '',
- icon: Icon(Icons.widgets_outlined),
- label: 'Components',
- selectedIcon: Icon(Icons.widgets),
- ),
- NavigationDestination(
- tooltip: '',
- icon: Icon(Icons.format_paint_outlined),
- label: 'Color',
- selectedIcon: Icon(Icons.format_paint),
- ),
- NavigationDestination(
- tooltip: '',
- icon: Icon(Icons.text_snippet_outlined),
- label: 'Typography',
- selectedIcon: Icon(Icons.text_snippet),
- ),
- NavigationDestination(
- tooltip: '',
- icon: Icon(Icons.invert_colors_on_outlined),
- label: 'Elevation',
- selectedIcon: Icon(Icons.opacity),
- )
-];
-
-const List exampleBarDestinations = [
- NavigationDestination(
- tooltip: '',
- icon: Icon(Icons.explore_outlined),
- label: 'Explore',
- selectedIcon: Icon(Icons.explore),
- ),
- NavigationDestination(
- tooltip: '',
- icon: Icon(Icons.pets_outlined),
- label: 'Pets',
- selectedIcon: Icon(Icons.pets),
- ),
- NavigationDestination(
- tooltip: '',
- icon: Icon(Icons.account_box_outlined),
- label: 'Account',
- selectedIcon: Icon(Icons.account_box),
- )
-];
-
-List barWithBadgeDestinations = [
- NavigationDestination(
- tooltip: '',
- icon: Badge.count(count: 1000, child: const Icon(Icons.mail_outlined)),
- label: 'Mail',
- selectedIcon: Badge.count(count: 1000, child: const Icon(Icons.mail)),
- ),
- const NavigationDestination(
- tooltip: '',
- icon: Badge(label: Text('10'), child: Icon(Icons.chat_bubble_outline)),
- label: 'Chat',
- selectedIcon: Badge(label: Text('10'), child: Icon(Icons.chat_bubble)),
- ),
- const NavigationDestination(
- tooltip: '',
- icon: Badge(child: Icon(Icons.group_outlined)),
- label: 'Rooms',
- selectedIcon: Badge(child: Icon(Icons.group_rounded)),
- ),
- NavigationDestination(
- tooltip: '',
- icon: Badge.count(count: 3, child: const Icon(Icons.videocam_outlined)),
- label: 'Meet',
- selectedIcon: Badge.count(count: 3, child: const Icon(Icons.videocam)),
- )
-];
-
-class NavigationBars extends StatefulWidget {
- const NavigationBars({
- super.key,
- this.onSelectItem,
- required this.selectedIndex,
- required this.isExampleBar,
- this.isBadgeExample = false,
- });
-
- final void Function(int)? onSelectItem;
- final int selectedIndex;
- final bool isExampleBar;
- final bool isBadgeExample;
-
- @override
- State createState() => _NavigationBarsState();
-}
-
-class _NavigationBarsState extends State {
- late int selectedIndex;
-
- @override
- void initState() {
- super.initState();
- selectedIndex = widget.selectedIndex;
- }
-
- @override
- void didUpdateWidget(covariant NavigationBars oldWidget) {
- super.didUpdateWidget(oldWidget);
- if (widget.selectedIndex != oldWidget.selectedIndex) {
- selectedIndex = widget.selectedIndex;
- }
- }
-
- @override
- Widget build(BuildContext context) {
- // App NavigationBar should get first focus.
- Widget navigationBar = Focus(
- autofocus: !(widget.isExampleBar || widget.isBadgeExample),
- child: NavigationBar(
- selectedIndex: selectedIndex,
- onDestinationSelected: (int index) {
- setState(() {
- selectedIndex = index;
- });
- if (!widget.isExampleBar) {
- widget.onSelectItem!(index);
- }
- },
- destinations: widget.isExampleBar && widget.isBadgeExample
- ? barWithBadgeDestinations
- : widget.isExampleBar
- ? exampleBarDestinations
- : appBarDestinations,
- ),
- );
-
- if (widget.isExampleBar && widget.isBadgeExample) {
- navigationBar = ComponentDecoration(
- label: 'Badges',
- tooltipMessage: 'Use Badge or Badge.count',
- child: navigationBar);
- } else if (widget.isExampleBar) {
- navigationBar = ComponentDecoration(
- label: 'Navigation bar',
- tooltipMessage: 'Use NavigationBar',
- child: navigationBar);
- }
-
- return navigationBar;
- }
-}
-
-class IconToggleButtons extends StatefulWidget {
- const IconToggleButtons({super.key});
-
- @override
- State createState() => _IconToggleButtonsState();
-}
-
-class _IconToggleButtonsState extends State {
- @override
- Widget build(BuildContext context) {
- return const ComponentDecoration(
- label: 'Icon buttons',
- tooltipMessage: 'Use IconButton',
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- children: [
- Column(
- // Standard IconButton
- children: [
- IconToggleButton(
- isEnabled: true,
- tooltip: 'Standard',
- ),
- colDivider,
- IconToggleButton(
- isEnabled: false,
- tooltip: 'Standard (disabled)',
- ),
- ],
- ),
- Column(
- children: [
- // Filled IconButton
- IconToggleButton(
- isEnabled: true,
- tooltip: 'Filled',
- getDefaultStyle: enabledFilledButtonStyle,
- ),
- colDivider,
- IconToggleButton(
- isEnabled: false,
- tooltip: 'Filled (disabled)',
- getDefaultStyle: disabledFilledButtonStyle,
- ),
- ],
- ),
- Column(
- children: [
- // Filled Tonal IconButton
- IconToggleButton(
- isEnabled: true,
- tooltip: 'Filled tonal',
- getDefaultStyle: enabledFilledTonalButtonStyle,
- ),
- colDivider,
- IconToggleButton(
- isEnabled: false,
- tooltip: 'Filled tonal (disabled)',
- getDefaultStyle: disabledFilledTonalButtonStyle,
- ),
- ],
- ),
- Column(
- children: [
- // Outlined IconButton
- IconToggleButton(
- isEnabled: true,
- tooltip: 'Outlined',
- getDefaultStyle: enabledOutlinedButtonStyle,
- ),
- colDivider,
- IconToggleButton(
- isEnabled: false,
- tooltip: 'Outlined (disabled)',
- getDefaultStyle: disabledOutlinedButtonStyle,
- ),
- ],
- ),
- ],
- ),
- );
- }
-}
-
-class IconToggleButton extends StatefulWidget {
- const IconToggleButton({
- required this.isEnabled,
- required this.tooltip,
- this.getDefaultStyle,
- super.key,
- });
-
- final bool isEnabled;
- final String tooltip;
- final ButtonStyle? Function(bool, ColorScheme)? getDefaultStyle;
-
- @override
- State createState() => _IconToggleButtonState();
-}
-
-class _IconToggleButtonState extends State {
- bool selected = false;
-
- @override
- Widget build(BuildContext context) {
- final ColorScheme colors = Theme.of(context).colorScheme;
- final VoidCallback? onPressed = widget.isEnabled
- ? () {
- setState(() {
- selected = !selected;
- });
- }
- : null;
- final ButtonStyle? style = widget.getDefaultStyle?.call(selected, colors);
-
- return IconButton(
- visualDensity: VisualDensity.standard,
- isSelected: selected,
- tooltip: widget.tooltip,
- icon: const Icon(Icons.settings_outlined),
- selectedIcon: const Icon(Icons.settings),
- onPressed: onPressed,
- style: style,
- );
- }
-}
-
-ButtonStyle enabledFilledButtonStyle(bool selected, ColorScheme colors) {
- return IconButton.styleFrom(
- foregroundColor: selected ? colors.onPrimary : colors.primary,
- backgroundColor: selected ? colors.primary : colors.surfaceVariant,
- disabledForegroundColor: colors.onSurface.withOpacity(0.38),
- disabledBackgroundColor: colors.onSurface.withOpacity(0.12),
- hoverColor: selected
- ? colors.onPrimary.withOpacity(0.08)
- : colors.primary.withOpacity(0.08),
- focusColor: selected
- ? colors.onPrimary.withOpacity(0.12)
- : colors.primary.withOpacity(0.12),
- highlightColor: selected
- ? colors.onPrimary.withOpacity(0.12)
- : colors.primary.withOpacity(0.12),
- );
-}
-
-ButtonStyle disabledFilledButtonStyle(bool selected, ColorScheme colors) {
- return IconButton.styleFrom(
- disabledForegroundColor: colors.onSurface.withOpacity(0.38),
- disabledBackgroundColor: colors.onSurface.withOpacity(0.12),
- );
-}
-
-ButtonStyle enabledFilledTonalButtonStyle(bool selected, ColorScheme colors) {
- return IconButton.styleFrom(
- foregroundColor:
- selected ? colors.onSecondaryContainer : colors.onSurfaceVariant,
- backgroundColor:
- selected ? colors.secondaryContainer : colors.surfaceVariant,
- hoverColor: selected
- ? colors.onSecondaryContainer.withOpacity(0.08)
- : colors.onSurfaceVariant.withOpacity(0.08),
- focusColor: selected
- ? colors.onSecondaryContainer.withOpacity(0.12)
- : colors.onSurfaceVariant.withOpacity(0.12),
- highlightColor: selected
- ? colors.onSecondaryContainer.withOpacity(0.12)
- : colors.onSurfaceVariant.withOpacity(0.12),
- );
-}
-
-ButtonStyle disabledFilledTonalButtonStyle(bool selected, ColorScheme colors) {
- return IconButton.styleFrom(
- disabledForegroundColor: colors.onSurface.withOpacity(0.38),
- disabledBackgroundColor: colors.onSurface.withOpacity(0.12),
- );
-}
-
-ButtonStyle enabledOutlinedButtonStyle(bool selected, ColorScheme colors) {
- return IconButton.styleFrom(
- backgroundColor: selected ? colors.inverseSurface : null,
- hoverColor: selected
- ? colors.onInverseSurface.withOpacity(0.08)
- : colors.onSurfaceVariant.withOpacity(0.08),
- focusColor: selected
- ? colors.onInverseSurface.withOpacity(0.12)
- : colors.onSurfaceVariant.withOpacity(0.12),
- highlightColor: selected
- ? colors.onInverseSurface.withOpacity(0.12)
- : colors.onSurface.withOpacity(0.12),
- side: BorderSide(color: colors.outline),
- ).copyWith(
- foregroundColor: MaterialStateProperty.resolveWith((Set states) {
- if (states.contains(MaterialState.selected)) {
- return colors.onInverseSurface;
- }
- if (states.contains(MaterialState.pressed)) {
- return colors.onSurface;
- }
- return null;
- }),
- );
-}
-
-ButtonStyle disabledOutlinedButtonStyle(bool selected, ColorScheme colors) {
- return IconButton.styleFrom(
- disabledForegroundColor: colors.onSurface.withOpacity(0.38),
- disabledBackgroundColor:
- selected ? colors.onSurface.withOpacity(0.12) : null,
- side: selected ? null : BorderSide(color: colors.outline.withOpacity(0.12)),
- );
-}
-
-class Chips extends StatefulWidget {
- const Chips({super.key});
-
- @override
- State createState() => _ChipsState();
-}
-
-class _ChipsState extends State {
- bool isFiltered = true;
-
- @override
- Widget build(BuildContext context) {
- return ComponentDecoration(
- label: 'Chips',
- tooltipMessage:
- 'Use ActionChip, FilterChip, or InputChip. \nActionChip can also be used for suggestion chip',
- child: Column(
- children: [
- Wrap(
- spacing: smallSpacing,
- runSpacing: smallSpacing,
- children: [
- ActionChip(
- label: const Text('Assist'),
- avatar: const Icon(Icons.event),
- onPressed: () {},
- ),
- FilterChip(
- label: const Text('Filter'),
- selected: isFiltered,
- onSelected: (bool selected) {
- setState(() => isFiltered = selected);
- },
- ),
- InputChip(
- label: const Text('Input'),
- onPressed: () {},
- onDeleted: () {},
- ),
- ActionChip(
- label: const Text('Suggestion'),
- onPressed: () {},
- ),
- ],
- ),
- colDivider,
- Wrap(
- spacing: smallSpacing,
- runSpacing: smallSpacing,
- children: [
- const ActionChip(
- label: Text('Assist'),
- avatar: Icon(Icons.event),
- ),
- FilterChip(
- label: const Text('Filter'),
- selected: isFiltered,
- onSelected: null,
- ),
- InputChip(
- label: const Text('Input'),
- onDeleted: () {},
- isEnabled: false,
- ),
- const ActionChip(
- label: Text('Suggestion'),
- ),
- ],
- ),
- ],
- ),
- );
- }
-}
-
-class SegmentedButtons extends StatelessWidget {
- const SegmentedButtons({super.key});
-
- @override
- Widget build(BuildContext context) {
- return const ComponentDecoration(
- label: 'Segmented buttons',
- tooltipMessage: 'Use SegmentedButton',
- child: Column(
- children: [
- SingleChoice(),
- colDivider,
- MultipleChoice(),
- ],
- ),
- );
- }
-}
-
-enum Calendar { day, week, month, year }
-
-class SingleChoice extends StatefulWidget {
- const SingleChoice({super.key});
-
- @override
- State createState() => _SingleChoiceState();
-}
-
-class _SingleChoiceState extends State {
- Calendar calendarView = Calendar.day;
-
- @override
- Widget build(BuildContext context) {
- return SegmentedButton(
- segments: const >[
- ButtonSegment(
- value: Calendar.day,
- label: Text('Day'),
- icon: Icon(Icons.calendar_view_day)),
- ButtonSegment(
- value: Calendar.week,
- label: Text('Week'),
- icon: Icon(Icons.calendar_view_week)),
- ButtonSegment(
- value: Calendar.month,
- label: Text('Month'),
- icon: Icon(Icons.calendar_view_month)),
- ButtonSegment(
- value: Calendar.year,
- label: Text('Year'),
- icon: Icon(Icons.calendar_today)),
- ],
- selected: {calendarView},
- onSelectionChanged: (Set newSelection) {
- setState(() {
- // By default there is only a single segment that can be
- // selected at one time, so its value is always the first
- // item in the selected set.
- calendarView = newSelection.first;
- });
- },
- );
- }
-}
-
-enum Sizes { extraSmall, small, medium, large, extraLarge }
-
-class MultipleChoice extends StatefulWidget {
- const MultipleChoice({super.key});
-
- @override
- State createState() => _MultipleChoiceState();
-}
-
-class _MultipleChoiceState extends State {
- Set selection = {Sizes.large, Sizes.extraLarge};
-
- @override
- Widget build(BuildContext context) {
- return SegmentedButton(
- segments: const >[
- ButtonSegment(value: Sizes.extraSmall, label: Text('XS')),
- ButtonSegment(value: Sizes.small, label: Text('S')),
- ButtonSegment(value: Sizes.medium, label: Text('M')),
- ButtonSegment(
- value: Sizes.large,
- label: Text('L'),
- ),
- ButtonSegment(value: Sizes.extraLarge, label: Text('XL')),
- ],
- selected: selection,
- onSelectionChanged: (Set newSelection) {
- setState(() {
- selection = newSelection;
- });
- },
- multiSelectionEnabled: true,
- );
- }
-}
-
-class SnackBarSection extends StatelessWidget {
- const SnackBarSection({super.key});
-
- @override
- Widget build(BuildContext context) {
- return ComponentDecoration(
- label: 'Snackbar',
- tooltipMessage:
- 'Use ScaffoldMessenger.of(context).showSnackBar with SnackBar',
- child: TextButton(
- onPressed: () {
- final SnackBar snackBar = SnackBar(
- behavior: SnackBarBehavior.floating,
- width: 400.0,
- content: const Text('This is a snackbar'),
- action: SnackBarAction(
- label: 'Close',
- onPressed: () {},
- ),
- );
-
- ScaffoldMessenger.of(context).hideCurrentSnackBar();
- ScaffoldMessenger.of(context).showSnackBar(snackBar);
- },
- child: const Text(
- 'Show snackbar',
- style: TextStyle(fontWeight: FontWeight.bold),
- ),
- ),
- );
- }
-}
-
-class BottomSheetSection extends StatefulWidget {
- const BottomSheetSection({super.key});
-
- @override
- State createState() => _BottomSheetSectionState();
-}
-
-class _BottomSheetSectionState extends State {
- bool isNonModalBottomSheetOpen = false;
- PersistentBottomSheetController? _nonModalBottomSheetController;
-
- @override
- Widget build(BuildContext context) {
- List buttonList = [
- IconButton(onPressed: () {}, icon: const Icon(Icons.share_outlined)),
- IconButton(onPressed: () {}, icon: const Icon(Icons.add)),
- IconButton(onPressed: () {}, icon: const Icon(Icons.delete_outline)),
- IconButton(onPressed: () {}, icon: const Icon(Icons.archive_outlined)),
- IconButton(onPressed: () {}, icon: const Icon(Icons.settings_outlined)),
- IconButton(onPressed: () {}, icon: const Icon(Icons.favorite_border)),
- ];
- const List labelList = [
- Text('Share'),
- Text('Add to'),
- Text('Trash'),
- Text('Archive'),
- Text('Settings'),
- Text('Favorite')
- ];
-
- buttonList = List.generate(
- buttonList.length,
- (int index) => Padding(
- padding: const EdgeInsets.fromLTRB(20.0, 30.0, 20.0, 20.0),
- child: Column(
- children: [
- buttonList[index],
- labelList[index],
- ],
- ),
- ));
-
- return ComponentDecoration(
- label: 'Bottom sheet',
- tooltipMessage: 'Use showModalBottomSheet or showBottomSheet',
- child: Wrap(
- alignment: WrapAlignment.spaceEvenly,
- children: [
- TextButton(
- child: const Text(
- 'Show modal bottom sheet',
- style: TextStyle(fontWeight: FontWeight.bold),
- ),
- onPressed: () {
- showModalBottomSheet(
- context: context,
- constraints: const BoxConstraints(maxWidth: 640),
- builder: (BuildContext context) {
- return SizedBox(
- height: 150,
- child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 32.0),
- child: ListView(
- shrinkWrap: true,
- scrollDirection: Axis.horizontal,
- children: buttonList,
- ),
- ),
- );
- },
- );
- },
- ),
- TextButton(
- child: Text(
- isNonModalBottomSheetOpen
- ? 'Hide bottom sheet'
- : 'Show bottom sheet',
- style: const TextStyle(fontWeight: FontWeight.bold),
- ),
- onPressed: () {
- if (isNonModalBottomSheetOpen) {
- _nonModalBottomSheetController?.close();
- setState(() {
- isNonModalBottomSheetOpen = false;
- });
- return;
- } else {
- setState(() {
- isNonModalBottomSheetOpen = true;
- });
- }
-
- _nonModalBottomSheetController = showBottomSheet(
- elevation: 8.0,
- context: context,
- constraints: const BoxConstraints(maxWidth: 640),
- builder: (BuildContext context) {
- return SizedBox(
- height: 150,
- child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 32.0),
- child: ListView(
- shrinkWrap: true,
- scrollDirection: Axis.horizontal,
- children: buttonList,
- ),
- ),
- );
- },
- );
- },
- ),
- ],
- ),
- );
- }
-}
-
-class BottomAppBars extends StatelessWidget {
- const BottomAppBars({super.key});
-
- @override
- Widget build(BuildContext context) {
- return ComponentDecoration(
- label: 'Bottom app bar',
- tooltipMessage: 'Use BottomAppBar',
- child: Column(
- children: [
- SizedBox(
- height: 80,
- child: Scaffold(
- floatingActionButton: FloatingActionButton(
- onPressed: () {},
- elevation: 0.0,
- child: const Icon(Icons.add),
- ),
- floatingActionButtonLocation:
- FloatingActionButtonLocation.endContained,
- bottomNavigationBar: BottomAppBar(
- child: Row(
- children: [
- const IconButtonAnchorExample(),
- IconButton(
- tooltip: 'Search',
- icon: const Icon(Icons.search),
- onPressed: () {},
- ),
- IconButton(
- tooltip: 'Favorite',
- icon: const Icon(Icons.favorite),
- onPressed: () {},
- ),
- ],
- ),
- ),
- ),
- ),
- ],
- ),
- );
- }
-}
-
-class IconButtonAnchorExample extends StatelessWidget {
- const IconButtonAnchorExample({super.key});
-
- @override
- Widget build(BuildContext context) {
- return MenuAnchor(
- builder: (BuildContext context, MenuController controller, Widget? child) {
- return IconButton(
- onPressed: () {
- if (controller.isOpen) {
- controller.close();
- } else {
- controller.open();
- }
- },
- icon: const Icon(Icons.more_vert),
- );
- },
- menuChildren: [
- MenuItemButton(
- child: const Text('Menu 1'),
- onPressed: () {},
- ),
- MenuItemButton(
- child: const Text('Menu 2'),
- onPressed: () {},
- ),
- SubmenuButton(
- menuChildren: [
- MenuItemButton(
- onPressed: () {},
- child: const Text('Menu 3.1'),
- ),
- MenuItemButton(
- onPressed: () {},
- child: const Text('Menu 3.2'),
- ),
- MenuItemButton(
- onPressed: () {},
- child: const Text('Menu 3.3'),
- ),
- ],
- child: const Text('Menu 3'),
- ),
- ],
- );
- }
-}
-
-class ButtonAnchorExample extends StatelessWidget {
- const ButtonAnchorExample({super.key});
-
- @override
- Widget build(BuildContext context) {
- return MenuAnchor(
- builder: (BuildContext context, MenuController controller, Widget? child) {
- return FilledButton.tonal(
- onPressed: () {
- if (controller.isOpen) {
- controller.close();
- } else {
- controller.open();
- }
- },
- child: const Text('Show menu'),
- );
- },
- menuChildren: [
- MenuItemButton(
- leadingIcon: const Icon(Icons.people_alt_outlined),
- child: const Text('Item 1'),
- onPressed: () {},
- ),
- MenuItemButton(
- leadingIcon: const Icon(Icons.remove_red_eye_outlined),
- child: const Text('Item 2'),
- onPressed: () {},
- ),
- MenuItemButton(
- leadingIcon: const Icon(Icons.refresh),
- onPressed: () {},
- child: const Text('Item 3'),
- ),
- ],
- );
- }
-}
-
-class NavigationDrawers extends StatelessWidget {
- const NavigationDrawers({super.key, required this.scaffoldKey});
- final GlobalKey scaffoldKey;
-
- @override
- Widget build(BuildContext context) {
- return ComponentDecoration(
- label: 'Navigation drawer',
- tooltipMessage:
- 'Use NavigationDrawer. For modal navigation drawers, see Scaffold.endDrawer',
- child: Column(
- children: [
- const SizedBox(height: 520, child: NavigationDrawerSection()),
- colDivider,
- colDivider,
- TextButton(
- child: const Text('Show modal navigation drawer',
- style: TextStyle(fontWeight: FontWeight.bold)),
- onPressed: () {
- scaffoldKey.currentState!.openEndDrawer();
- },
- ),
- ],
- ),
- );
- }
-}
-
-class NavigationDrawerSection extends StatefulWidget {
- const NavigationDrawerSection({super.key});
-
- @override
- State createState() =>
- _NavigationDrawerSectionState();
-}
-
-class _NavigationDrawerSectionState extends State {
- int navDrawerIndex = 0;
-
- @override
- Widget build(BuildContext context) {
- return NavigationDrawer(
- onDestinationSelected: (int selectedIndex) {
- setState(() {
- navDrawerIndex = selectedIndex;
- });
- },
- selectedIndex: navDrawerIndex,
- children: [
- Padding(
- padding: const EdgeInsets.fromLTRB(28, 16, 16, 10),
- child: Text(
- 'Mail',
- style: Theme.of(context).textTheme.titleSmall,
- ),
- ),
- ...destinations.map((ExampleDestination destination) {
- return NavigationDrawerDestination(
- label: Text(destination.label),
- icon: destination.icon,
- selectedIcon: destination.selectedIcon,
- );
- }),
- const Divider(indent: 28, endIndent: 28),
- Padding(
- padding: const EdgeInsets.fromLTRB(28, 16, 16, 10),
- child: Text(
- 'Labels',
- style: Theme.of(context).textTheme.titleSmall,
- ),
- ),
- ...labelDestinations.map((ExampleDestination destination) {
- return NavigationDrawerDestination(
- label: Text(destination.label),
- icon: destination.icon,
- selectedIcon: destination.selectedIcon,
- );
- }),
- ],
- );
- }
-}
-
-class ExampleDestination {
- const ExampleDestination(this.label, this.icon, this.selectedIcon);
-
- final String label;
- final Widget icon;
- final Widget selectedIcon;
-}
-
-const List destinations = [
- ExampleDestination('Inbox', Icon(Icons.inbox_outlined), Icon(Icons.inbox)),
- ExampleDestination('Outbox', Icon(Icons.send_outlined), Icon(Icons.send)),
- ExampleDestination(
- 'Favorites', Icon(Icons.favorite_outline), Icon(Icons.favorite)),
- ExampleDestination('Trash', Icon(Icons.delete_outline), Icon(Icons.delete)),
-];
-
-const List labelDestinations = [
- ExampleDestination(
- 'Family', Icon(Icons.bookmark_border), Icon(Icons.bookmark)),
- ExampleDestination(
- 'School', Icon(Icons.bookmark_border), Icon(Icons.bookmark)),
- ExampleDestination('Work', Icon(Icons.bookmark_border), Icon(Icons.bookmark)),
-];
-
-class NavigationRails extends StatelessWidget {
- const NavigationRails({super.key});
-
- @override
- Widget build(BuildContext context) {
- return const ComponentDecoration(
- label: 'Navigation rail',
- tooltipMessage: 'Use NavigationRail',
- child: IntrinsicWidth(
- child: SizedBox(height: 420, child: NavigationRailSection())),
- );
- }
-}
-
-class NavigationRailSection extends StatefulWidget {
- const NavigationRailSection({super.key});
-
- @override
- State createState() => _NavigationRailSectionState();
-}
-
-class _NavigationRailSectionState extends State {
- int navRailIndex = 0;
-
- @override
- Widget build(BuildContext context) {
- return NavigationRail(
- onDestinationSelected: (int selectedIndex) {
- setState(() {
- navRailIndex = selectedIndex;
- });
- },
- elevation: 4,
- leading: FloatingActionButton(
- child: const Icon(Icons.create), onPressed: () {}),
- groupAlignment: 0.0,
- selectedIndex: navRailIndex,
- labelType: NavigationRailLabelType.selected,
- destinations: [
- ...destinations.map((ExampleDestination destination) {
- return NavigationRailDestination(
- label: Text(destination.label),
- icon: destination.icon,
- selectedIcon: destination.selectedIcon,
- );
- }),
- ],
- );
- }
-}
-
-class Tabs extends StatefulWidget {
- const Tabs({super.key});
-
- @override
- State createState() => _TabsState();
-}
-
-class _TabsState extends State with TickerProviderStateMixin {
- late TabController _tabController;
-
- @override
- void initState() {
- super.initState();
- _tabController = TabController(length: 3, vsync: this);
- }
-
- @override
- Widget build(BuildContext context) {
- return ComponentDecoration(
- label: 'Tabs',
- tooltipMessage: 'Use TabBar',
- child: SizedBox(
- height: 80,
- child: Scaffold(
- appBar: AppBar(
- bottom: TabBar(
- controller: _tabController,
- tabs: const [
- Tab(
- icon: Icon(Icons.videocam_outlined),
- text: 'Video',
- iconMargin: EdgeInsets.zero,
- ),
- Tab(
- icon: Icon(Icons.photo_outlined),
- text: 'Photos',
- iconMargin: EdgeInsets.zero,
- ),
- Tab(
- icon: Icon(Icons.audiotrack_sharp),
- text: 'Audio',
- iconMargin: EdgeInsets.zero,
- ),
- ],
- ),
- ),
- ),
- ),
- );
- }
-}
-
-class TopAppBars extends StatelessWidget {
- const TopAppBars({super.key});
-
- static final List actions = [
- IconButton(icon: const Icon(Icons.attach_file), onPressed: () {}),
- IconButton(icon: const Icon(Icons.event), onPressed: () {}),
- IconButton(icon: const Icon(Icons.more_vert), onPressed: () {}),
- ];
-
- @override
- Widget build(BuildContext context) {
- return ComponentDecoration(
- label: 'Top app bars',
- tooltipMessage:
- 'Use AppBar, SliverAppBar, SliverAppBar.medium, or SliverAppBar.large',
- child: Column(
- children: [
- AppBar(
- title: const Text('Center-aligned'),
- leading: const BackButton(),
- actions: [
- IconButton(
- iconSize: 32,
- icon: const Icon(Icons.account_circle_outlined),
- onPressed: () {},
- ),
- ],
- centerTitle: true,
- ),
- colDivider,
- AppBar(
- title: const Text('Small'),
- leading: const BackButton(),
- actions: actions,
- centerTitle: false,
- ),
- colDivider,
- SizedBox(
- height: 100,
- child: CustomScrollView(
- slivers: [
- SliverAppBar.medium(
- title: const Text('Medium'),
- leading: const BackButton(),
- actions: actions,
- ),
- const SliverFillRemaining(),
- ],
- ),
- ),
- colDivider,
- SizedBox(
- height: 130,
- child: CustomScrollView(
- slivers: [
- SliverAppBar.large(
- title: const Text('Large'),
- leading: const BackButton(),
- actions: actions,
- ),
- const SliverFillRemaining(),
- ],
- ),
- ),
- ],
- ),
- );
- }
-}
-
-class Menus extends StatefulWidget {
- const Menus({super.key});
-
- @override
- State createState() => _MenusState();
-}
-
-class _MenusState extends State {
- final TextEditingController colorController = TextEditingController();
- final TextEditingController iconController = TextEditingController();
- IconLabel? selectedIcon = IconLabel.smile;
- ColorLabel? selectedColor;
-
- @override
- Widget build(BuildContext context) {
- final List> colorEntries =
- >[];
- for (final ColorLabel color in ColorLabel.values) {
- colorEntries.add(DropdownMenuEntry(
- value: color, label: color.label, enabled: color.label != 'Grey'));
- }
-
- final List> iconEntries =
- >[];
- for (final IconLabel icon in IconLabel.values) {
- iconEntries
- .add(DropdownMenuEntry(value: icon, label: icon.label));
- }
-
- return ComponentDecoration(
- label: 'Menus',
- tooltipMessage: 'Use MenuAnchor or DropdownMenu',
- child: Column(
- children: [
- const Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- ButtonAnchorExample(),
- rowDivider,
- IconButtonAnchorExample(),
- ],
- ),
- colDivider,
- Wrap(
- alignment: WrapAlignment.spaceAround,
- runAlignment: WrapAlignment.center,
- crossAxisAlignment: WrapCrossAlignment.center,
- spacing: smallSpacing,
- runSpacing: smallSpacing,
- children: [
- DropdownMenu(
- controller: colorController,
- label: const Text('Color'),
- enableFilter: true,
- dropdownMenuEntries: colorEntries,
- inputDecorationTheme: const InputDecorationTheme(filled: true),
- onSelected: (ColorLabel? color) {
- setState(() {
- selectedColor = color;
- });
- },
- ),
- DropdownMenu(
- initialSelection: IconLabel.smile,
- controller: iconController,
- leadingIcon: const Icon(Icons.search),
- label: const Text('Icon'),
- dropdownMenuEntries: iconEntries,
- onSelected: (IconLabel? icon) {
- setState(() {
- selectedIcon = icon;
- });
- },
- ),
- Icon(
- selectedIcon?.icon,
- color: selectedColor?.color ?? Colors.grey.withOpacity(0.5),
- )
- ],
- ),
- ],
- ),
- );
- }
-}
-
-enum ColorLabel {
- blue('Blue', Colors.blue),
- pink('Pink', Colors.pink),
- green('Green', Colors.green),
- yellow('Yellow', Colors.yellow),
- grey('Grey', Colors.grey);
-
- const ColorLabel(this.label, this.color);
- final String label;
- final Color color;
-}
-
-enum IconLabel {
- smile('Smile', Icons.sentiment_satisfied_outlined),
- cloud(
- 'Cloud',
- Icons.cloud_outlined,
- ),
- brush('Brush', Icons.brush_outlined),
- heart('Heart', Icons.favorite);
-
- const IconLabel(this.label, this.icon);
- final String label;
- final IconData icon;
-}
-
-class Sliders extends StatefulWidget {
- const Sliders({super.key});
-
- @override
- State createState() => _SlidersState();
-}
-
-class _SlidersState extends State {
- double sliderValue0 = 30.0;
- double sliderValue1 = 20.0;
-
- @override
- Widget build(BuildContext context) {
- return ComponentDecoration(
- label: 'Sliders',
- tooltipMessage: 'Use Slider or RangeSlider',
- child: Column(
- children: [
- Slider(
- max: 100,
- value: sliderValue0,
- onChanged: (double value) {
- setState(() {
- sliderValue0 = value;
- });
- },
- ),
- const SizedBox(height: 20),
- Slider(
- max: 100,
- divisions: 5,
- value: sliderValue1,
- label: sliderValue1.round().toString(),
- onChanged: (double value) {
- setState(() {
- sliderValue1 = value;
- });
- },
- ),
- ],
- ));
- }
-}
-
-class ComponentDecoration extends StatefulWidget {
- const ComponentDecoration({
- super.key,
- required this.label,
- required this.child,
- this.tooltipMessage = '',
- });
-
- final String label;
- final Widget child;
- final String? tooltipMessage;
-
- @override
- State createState() => _ComponentDecorationState();
-}
-
-class _ComponentDecorationState extends State {
- final FocusNode focusNode = FocusNode();
-
- @override
- Widget build(BuildContext context) {
- return RepaintBoundary(
- child: Padding(
- padding: const EdgeInsets.symmetric(vertical: smallSpacing),
- child: Column(
- children: [
- Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Text(widget.label,
- style: Theme.of(context).textTheme.titleSmall),
- Tooltip(
- message: widget.tooltipMessage,
- child: const Padding(
- padding: EdgeInsets.symmetric(horizontal: 5.0),
- child: Icon(Icons.info_outline, size: 16)),
- ),
- ],
- ),
- ConstrainedBox(
- constraints:
- const BoxConstraints.tightFor(width: widthConstraint),
- // Tapping within the a component card should request focus
- // for that component's children.
- child: Focus(
- focusNode: focusNode,
- canRequestFocus: true,
- child: GestureDetector(
- onTapDown: (_) {
- focusNode.requestFocus();
- },
- behavior: HitTestBehavior.opaque,
- child: Card(
- elevation: 0,
- shape: RoundedRectangleBorder(
- side: BorderSide(
- color: Theme.of(context).colorScheme.outlineVariant,
- ),
- borderRadius: const BorderRadius.all(Radius.circular(12)),
- ),
- child: Padding(
- padding: const EdgeInsets.symmetric(
- horizontal: 5.0, vertical: 20.0),
- child: Center(
- child: widget.child,
- ),
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- );
- }
-}
-
-class ComponentGroupDecoration extends StatelessWidget {
- const ComponentGroupDecoration(
- {super.key, required this.label, required this.children});
-
- final String label;
- final List children;
-
- @override
- Widget build(BuildContext context) {
- // Fully traverse this component group before moving on
- return FocusTraversalGroup(
- child: Card(
- margin: EdgeInsets.zero,
- elevation: 0,
- color: Theme.of(context).colorScheme.surfaceVariant.withOpacity(0.3),
- child: Padding(
- padding: const EdgeInsets.symmetric(vertical: 20.0),
- child: Center(
- child: Column(
- children: [
- Text(label, style: Theme.of(context).textTheme.titleLarge),
- colDivider,
- ...children
- ],
- ),
- ),
- ),
- ),
- );
+ return const TwoColumnMaterial3Components();
}
}
diff --git a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_material_3_semantics.dart b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_material_3_semantics.dart
new file mode 100644
index 0000000000000..8b230803c83d7
--- /dev/null
+++ b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_material_3_semantics.dart
@@ -0,0 +1,147 @@
+// Copyright 2014 The Flutter Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:flutter/foundation.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/scheduler.dart';
+import 'package:flutter/semantics.dart';
+
+import 'material3.dart';
+import 'recorder.dart';
+
+/// Measures the cost of semantics when constructing screens containing
+/// Material 3 widgets.
+class BenchMaterial3Semantics extends WidgetBuildRecorder {
+ BenchMaterial3Semantics() : super(name: benchmarkName);
+
+ static const String benchmarkName = 'bench_material3_semantics';
+
+ @override
+ Future setUpAll() async {
+ FlutterTimeline.debugCollectionEnabled = true;
+ super.setUpAll();
+ SemanticsBinding.instance.ensureSemantics();
+ }
+
+ @override
+ Future tearDownAll() async {
+ FlutterTimeline.debugReset();
+ }
+
+ @override
+ void frameDidDraw() {
+ // Only record frames that show the widget. Frames that remove the widget
+ // are not interesting.
+ if (showWidget) {
+ final AggregatedTimings timings = FlutterTimeline.debugCollect();
+ final AggregatedTimedBlock semanticsBlock = timings.getAggregated('SEMANTICS');
+ final AggregatedTimedBlock getFragmentBlock = timings.getAggregated('Semantics.GetFragment');
+ final AggregatedTimedBlock compileChildrenBlock = timings.getAggregated('Semantics.compileChildren');
+ profile!.addTimedBlock(semanticsBlock, reported: true);
+ profile!.addTimedBlock(getFragmentBlock, reported: true);
+ profile!.addTimedBlock(compileChildrenBlock, reported: true);
+ }
+
+ super.frameDidDraw();
+ FlutterTimeline.debugReset();
+ }
+
+ @override
+ Widget createWidget() {
+ return const SingleColumnMaterial3Components();
+ }
+}
+
+/// Measures the cost of semantics when scrolling screens containing Material 3
+/// widgets.
+///
+/// The implementation uses a ListView that jumps the scroll position between
+/// 0 and 1 every frame. Such a small delta is not enough for lazy rendering to
+/// add/remove widgets, but its enough to trigger the framework to recompute
+/// some of the semantics.
+///
+/// The expected output numbers of this benchmarks should be very small as
+/// scrolling a list view should be a matter of shifting some widgets and
+/// updating the projected clip imposed by the viewport. As of June 2023, the
+/// numbers are not great. Semantics consumes >50% of frame time.
+class BenchMaterial3ScrollSemantics extends WidgetRecorder {
+ BenchMaterial3ScrollSemantics() : super(name: benchmarkName);
+
+ static const String benchmarkName = 'bench_material3_scroll_semantics';
+
+ @override
+ Future setUpAll() async {
+ FlutterTimeline.debugCollectionEnabled = true;
+ super.setUpAll();
+ SemanticsBinding.instance.ensureSemantics();
+ }
+
+ @override
+ Future tearDownAll() async {
+ FlutterTimeline.debugReset();
+ }
+
+ @override
+ void frameDidDraw() {
+ final AggregatedTimings timings = FlutterTimeline.debugCollect();
+ final AggregatedTimedBlock semanticsBlock = timings.getAggregated('SEMANTICS');
+ final AggregatedTimedBlock getFragmentBlock = timings.getAggregated('Semantics.GetFragment');
+ final AggregatedTimedBlock compileChildrenBlock = timings.getAggregated('Semantics.compileChildren');
+ profile!.addTimedBlock(semanticsBlock, reported: true);
+ profile!.addTimedBlock(getFragmentBlock, reported: true);
+ profile!.addTimedBlock(compileChildrenBlock, reported: true);
+
+ super.frameDidDraw();
+ FlutterTimeline.debugReset();
+ }
+
+ @override
+ Widget createWidget() => _ScrollTest();
+}
+
+class _ScrollTest extends StatefulWidget {
+ @override
+ State<_ScrollTest> createState() => _ScrollTestState();
+}
+
+class _ScrollTestState extends State<_ScrollTest> with SingleTickerProviderStateMixin {
+ late final Ticker ticker;
+ late final ScrollController scrollController;
+
+ @override
+ void initState() {
+ super.initState();
+
+ scrollController = ScrollController();
+
+ bool forward = true;
+
+ // A one-off timer is necessary to allow the framework to measure the
+ // available scroll extents before the scroll controller can be exercised
+ // to change the scroll position.
+ Timer.run(() {
+ ticker = createTicker((_) {
+ scrollController.jumpTo(forward ? 1 : 0);
+ forward = !forward;
+ });
+ ticker.start();
+ });
+ }
+
+ @override
+ void dispose() {
+ ticker.dispose();
+ scrollController.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return SingleColumnMaterial3Components(
+ scrollController: scrollController,
+ );
+ }
+}
diff --git a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_mouse_region_grid_scroll.dart b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_mouse_region_grid_scroll.dart
index 6eabda48ed6bc..7fbb80e1992ca 100644
--- a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_mouse_region_grid_scroll.dart
+++ b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_mouse_region_grid_scroll.dart
@@ -130,10 +130,10 @@ class _Tester {
final int frameDurationMs = fullFrameDuration.inMilliseconds;
final int fullFrames = duration.inMilliseconds ~/ frameDurationMs;
- final Offset fullFrameOffset = offset * ((frameDurationMs as double) / durationMs);
+ final Offset fullFrameOffset = offset * (frameDurationMs.toDouble() / durationMs);
final Duration finalFrameDuration = duration - fullFrameDuration * fullFrames;
- final Offset finalFrameOffset = offset - fullFrameOffset * (fullFrames as double);
+ final Offset finalFrameOffset = offset - fullFrameOffset * fullFrames.toDouble();
await gesture.down(start, timeStamp: currentTime);
diff --git a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_platform_view_infinite_scroll.dart b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_platform_view_infinite_scroll.dart
index 01bcecd746c27..378127476f071 100644
--- a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_platform_view_infinite_scroll.dart
+++ b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_platform_view_infinite_scroll.dart
@@ -3,10 +3,10 @@
// found in the LICENSE file.
import 'dart:async';
-import 'dart:html' as html;
import 'dart:ui_web' as ui_web;
import 'package:flutter/material.dart';
+import 'package:web/web.dart' as web;
import 'recorder.dart';
@@ -14,16 +14,17 @@ const String benchmarkViewType = 'benchmark_element';
void _registerFactory() {
ui_web.platformViewRegistry.registerViewFactory(benchmarkViewType, (int viewId) {
- final html.Element htmlElement = html.DivElement();
+ final web.HTMLElement htmlElement =
+ web.document.createElement('div') as web.HTMLDivElement;
htmlElement.id = '${benchmarkViewType}_$viewId';
htmlElement.innerText = 'Google';
htmlElement.style
- ..width = '100%'
- ..height = '100%'
- ..color = 'black'
- ..backgroundColor = 'rgba(0, 255, 0, .5)'
- ..textAlign = 'center'
- ..border = '1px solid black';
+ ..setProperty('width', '100%')
+ ..setProperty('height', '100%')
+ ..setProperty('color', 'black')
+ ..setProperty('backgroundColor', 'rgba(0, 255, 0, .5)')
+ ..setProperty('textAlign', 'center')
+ ..setProperty('border', '1px solid black');
return htmlElement;
});
}
diff --git a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_text_layout.dart b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_text_layout.dart
index e1156dd383044..6788ec8b71232 100644
--- a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_text_layout.dart
+++ b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_text_layout.dart
@@ -203,6 +203,7 @@ class BenchBuildColorsGrid extends WidgetBuildRecorder {
@override
Future setUpAll() async {
+ super.setUpAll();
registerEngineBenchmarkValueListener('text_layout', (num value) {
_textLayoutMicros += value;
});
diff --git a/dev/benchmarks/macrobenchmarks/lib/src/web/material3.dart b/dev/benchmarks/macrobenchmarks/lib/src/web/material3.dart
new file mode 100644
index 0000000000000..1ec8ae15bf062
--- /dev/null
+++ b/dev/benchmarks/macrobenchmarks/lib/src/web/material3.dart
@@ -0,0 +1,2369 @@
+// Copyright 2014 The Flutter Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+
+const SizedBox rowDivider = SizedBox(width: 20);
+const SizedBox colDivider = SizedBox(height: 10);
+const double smallSpacing = 10.0;
+const double cardWidth = 115;
+const double widthConstraint = 450;
+final GlobalKey scaffoldKey = GlobalKey();
+
+class SingleColumnMaterial3Components extends StatelessWidget {
+ const SingleColumnMaterial3Components({
+ super.key,
+ this.scrollController,
+ });
+
+ final ScrollController? scrollController;
+
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ home: Scaffold(
+ key: scaffoldKey,
+ body: ListView(
+ controller: scrollController,
+ children: [
+ const Actions(),
+ colDivider,
+ const Communication(),
+ colDivider,
+ const Containment(),
+ colDivider,
+ Navigation(scaffoldKey: scaffoldKey),
+ colDivider,
+ const Selection(),
+ colDivider,
+ const TextInputs(),
+ colDivider,
+ Navigation(scaffoldKey: scaffoldKey),
+ colDivider,
+ const Selection(),
+ colDivider,
+ const TextInputs(),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+class TwoColumnMaterial3Components extends StatefulWidget {
+ const TwoColumnMaterial3Components({super.key});
+
+ @override
+ State createState() => _TwoColumnMaterial3ComponentsState();
+}
+
+class _TwoColumnMaterial3ComponentsState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ home: Scaffold(
+ key: scaffoldKey,
+ body: Row(
+ children: [
+ Expanded(
+ child: FirstComponentList(
+ showNavBottomBar: true,
+ scaffoldKey: scaffoldKey,
+ showSecondList: true,
+ ),
+ ),
+ Expanded(
+ child: SecondComponentList(scaffoldKey: scaffoldKey),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+class FirstComponentList extends StatelessWidget {
+ const FirstComponentList({
+ super.key,
+ required this.showNavBottomBar,
+ required this.scaffoldKey,
+ required this.showSecondList,
+ });
+
+ final bool showNavBottomBar;
+ final GlobalKey scaffoldKey;
+ final bool showSecondList;
+
+ @override
+ Widget build(BuildContext context) {
+ // Fully traverse this list before moving on.
+ return FocusTraversalGroup(
+ child: ListView(
+ padding: showSecondList
+ ? const EdgeInsetsDirectional.only(end: smallSpacing)
+ : EdgeInsets.zero,
+ children: [
+ const Actions(),
+ colDivider,
+ const Communication(),
+ colDivider,
+ const Containment(),
+ if (!showSecondList) ...[
+ colDivider,
+ Navigation(scaffoldKey: scaffoldKey),
+ colDivider,
+ const Selection(),
+ colDivider,
+ const TextInputs()
+ ],
+ ],
+ ),
+ );
+ }
+}
+
+class SecondComponentList extends StatelessWidget {
+ const SecondComponentList({
+ super.key,
+ required this.scaffoldKey,
+ });
+
+ final GlobalKey scaffoldKey;
+
+ @override
+ Widget build(BuildContext context) {
+ // Fully traverse this list before moving on.
+ return FocusTraversalGroup(
+ child: ListView(
+ padding: const EdgeInsetsDirectional.only(end: smallSpacing),
+ children: [
+ Navigation(scaffoldKey: scaffoldKey),
+ colDivider,
+ const Selection(),
+ colDivider,
+ const TextInputs(),
+ ],
+ ),
+ );
+ }
+}
+
+class Actions extends StatelessWidget {
+ const Actions({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return const ComponentGroupDecoration(label: 'Actions', children: [
+ Buttons(),
+ FloatingActionButtons(),
+ IconToggleButtons(),
+ SegmentedButtons(),
+ ]);
+ }
+}
+
+class Communication extends StatelessWidget {
+ const Communication({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return const ComponentGroupDecoration(label: 'Communication', children: [
+ NavigationBars(
+ selectedIndex: 1,
+ isExampleBar: true,
+ isBadgeExample: true,
+ ),
+ ProgressIndicators(),
+ SnackBarSection(),
+ ]);
+ }
+}
+
+class Containment extends StatelessWidget {
+ const Containment({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return const ComponentGroupDecoration(label: 'Containment', children: [
+ BottomSheetSection(),
+ Cards(),
+ Dialogs(),
+ Dividers(),
+ ]);
+ }
+}
+
+class Navigation extends StatelessWidget {
+ const Navigation({super.key, required this.scaffoldKey});
+
+ final GlobalKey scaffoldKey;
+
+ @override
+ Widget build(BuildContext context) {
+ return ComponentGroupDecoration(label: 'Navigation', children: [
+ const BottomAppBars(),
+ const NavigationBars(
+ selectedIndex: 0,
+ isExampleBar: true,
+ ),
+ NavigationDrawers(scaffoldKey: scaffoldKey),
+ const NavigationRails(),
+ const Tabs(),
+ const TopAppBars(),
+ ]);
+ }
+}
+
+class Selection extends StatelessWidget {
+ const Selection({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return const ComponentGroupDecoration(label: 'Selection', children: [
+ Checkboxes(),
+ Chips(),
+ Menus(),
+ Radios(),
+ Sliders(),
+ Switches(),
+ ]);
+ }
+}
+
+class TextInputs extends StatelessWidget {
+ const TextInputs({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return const ComponentGroupDecoration(
+ label: 'Text inputs',
+ children: [TextFields()],
+ );
+ }
+}
+
+class Buttons extends StatefulWidget {
+ const Buttons({super.key});
+
+ @override
+ State createState() => _ButtonsState();
+}
+
+class _ButtonsState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return const ComponentDecoration(
+ label: 'Common buttons',
+ tooltipMessage:
+ 'Use ElevatedButton, FilledButton, FilledButton.tonal, OutlinedButton, or TextButton',
+ child: SingleChildScrollView(
+ scrollDirection: Axis.horizontal,
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ children: [
+ ButtonsWithoutIcon(isDisabled: false),
+ ButtonsWithIcon(),
+ ButtonsWithoutIcon(isDisabled: true),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+class ButtonsWithoutIcon extends StatelessWidget {
+ const ButtonsWithoutIcon({super.key, required this.isDisabled});
+
+ final bool isDisabled;
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 5.0),
+ child: IntrinsicWidth(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ ElevatedButton(
+ onPressed: isDisabled ? null : () {},
+ child: const Text('Elevated'),
+ ),
+ colDivider,
+ FilledButton(
+ onPressed: isDisabled ? null : () {},
+ child: const Text('Filled'),
+ ),
+ colDivider,
+ FilledButton.tonal(
+ onPressed: isDisabled ? null : () {},
+ child: const Text('Filled tonal'),
+ ),
+ colDivider,
+ OutlinedButton(
+ onPressed: isDisabled ? null : () {},
+ child: const Text('Outlined'),
+ ),
+ colDivider,
+ TextButton(
+ onPressed: isDisabled ? null : () {},
+ child: const Text('Text'),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+class ButtonsWithIcon extends StatelessWidget {
+ const ButtonsWithIcon({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 10.0),
+ child: IntrinsicWidth(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ ElevatedButton.icon(
+ onPressed: () {},
+ icon: const Icon(Icons.add),
+ label: const Text('Icon'),
+ ),
+ colDivider,
+ FilledButton.icon(
+ onPressed: () {},
+ label: const Text('Icon'),
+ icon: const Icon(Icons.add),
+ ),
+ colDivider,
+ FilledButton.tonalIcon(
+ onPressed: () {},
+ label: const Text('Icon'),
+ icon: const Icon(Icons.add),
+ ),
+ colDivider,
+ OutlinedButton.icon(
+ onPressed: () {},
+ icon: const Icon(Icons.add),
+ label: const Text('Icon'),
+ ),
+ colDivider,
+ TextButton.icon(
+ onPressed: () {},
+ icon: const Icon(Icons.add),
+ label: const Text('Icon'),
+ )
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+class FloatingActionButtons extends StatelessWidget {
+ const FloatingActionButtons({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return ComponentDecoration(
+ label: 'Floating action buttons',
+ tooltipMessage:
+ 'Use FloatingActionButton or FloatingActionButton.extended',
+ child: Wrap(
+ crossAxisAlignment: WrapCrossAlignment.center,
+ runSpacing: smallSpacing,
+ spacing: smallSpacing,
+ children: [
+ FloatingActionButton.small(
+ onPressed: () {},
+ tooltip: 'Small',
+ child: const Icon(Icons.add),
+ ),
+ FloatingActionButton.extended(
+ onPressed: () {},
+ tooltip: 'Extended',
+ icon: const Icon(Icons.add),
+ label: const Text('Create'),
+ ),
+ FloatingActionButton(
+ onPressed: () {},
+ tooltip: 'Standard',
+ child: const Icon(Icons.add),
+ ),
+ FloatingActionButton.large(
+ onPressed: () {},
+ tooltip: 'Large',
+ child: const Icon(Icons.add),
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+class Cards extends StatelessWidget {
+ const Cards({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return ComponentDecoration(
+ label: 'Cards',
+ tooltipMessage: 'Use Card',
+ child: Wrap(
+ alignment: WrapAlignment.spaceEvenly,
+ children: [
+ SizedBox(
+ width: cardWidth,
+ child: Card(
+ child: Container(
+ padding: const EdgeInsets.fromLTRB(10, 5, 5, 10),
+ child: Column(
+ children: [
+ Align(
+ alignment: Alignment.topRight,
+ child: IconButton(
+ icon: const Icon(Icons.more_vert),
+ onPressed: () {},
+ ),
+ ),
+ const SizedBox(height: 20),
+ const Align(
+ alignment: Alignment.bottomLeft,
+ child: Text('Elevated'),
+ )
+ ],
+ ),
+ ),
+ ),
+ ),
+ SizedBox(
+ width: cardWidth,
+ child: Card(
+ color: Theme.of(context).colorScheme.surfaceVariant,
+ elevation: 0,
+ child: Container(
+ padding: const EdgeInsets.fromLTRB(10, 5, 5, 10),
+ child: Column(
+ children: [
+ Align(
+ alignment: Alignment.topRight,
+ child: IconButton(
+ icon: const Icon(Icons.more_vert),
+ onPressed: () {},
+ ),
+ ),
+ const SizedBox(height: 20),
+ const Align(
+ alignment: Alignment.bottomLeft,
+ child: Text('Filled'),
+ )
+ ],
+ ),
+ ),
+ ),
+ ),
+ SizedBox(
+ width: cardWidth,
+ child: Card(
+ elevation: 0,
+ shape: RoundedRectangleBorder(
+ side: BorderSide(
+ color: Theme.of(context).colorScheme.outline,
+ ),
+ borderRadius: const BorderRadius.all(Radius.circular(12)),
+ ),
+ child: Container(
+ padding: const EdgeInsets.fromLTRB(10, 5, 5, 10),
+ child: Column(
+ children: [
+ Align(
+ alignment: Alignment.topRight,
+ child: IconButton(
+ icon: const Icon(Icons.more_vert),
+ onPressed: () {},
+ ),
+ ),
+ const SizedBox(height: 20),
+ const Align(
+ alignment: Alignment.bottomLeft,
+ child: Text('Outlined'),
+ )
+ ],
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+class _ClearButton extends StatelessWidget {
+ const _ClearButton({required this.controller});
+
+ final TextEditingController controller;
+
+ @override
+ Widget build(BuildContext context) => IconButton(
+ icon: const Icon(Icons.clear),
+ onPressed: () => controller.clear(),
+ );
+}
+
+class TextFields extends StatefulWidget {
+ const TextFields({super.key});
+
+ @override
+ State createState() => _TextFieldsState();
+}
+
+class _TextFieldsState extends State {
+ final TextEditingController _controllerFilled = TextEditingController();
+ final TextEditingController _controllerOutlined = TextEditingController();
+
+ @override
+ Widget build(BuildContext context) {
+ return ComponentDecoration(
+ label: 'Text fields',
+ tooltipMessage: 'Use TextField with different InputDecoration',
+ child: Column(
+ children: [
+ Padding(
+ padding: const EdgeInsets.all(smallSpacing),
+ child: TextField(
+ controller: _controllerFilled,
+ decoration: InputDecoration(
+ prefixIcon: const Icon(Icons.search),
+ suffixIcon: _ClearButton(controller: _controllerFilled),
+ labelText: 'Filled',
+ hintText: 'hint text',
+ helperText: 'supporting text',
+ filled: true,
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsets.all(smallSpacing),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Flexible(
+ child: SizedBox(
+ width: 200,
+ child: TextField(
+ maxLength: 10,
+ maxLengthEnforcement: MaxLengthEnforcement.none,
+ controller: _controllerFilled,
+ decoration: InputDecoration(
+ prefixIcon: const Icon(Icons.search),
+ suffixIcon: _ClearButton(controller: _controllerFilled),
+ labelText: 'Filled',
+ hintText: 'hint text',
+ helperText: 'supporting text',
+ filled: true,
+ errorText: 'error text',
+ ),
+ ),
+ ),
+ ),
+ const SizedBox(width: smallSpacing),
+ Flexible(
+ child: SizedBox(
+ width: 200,
+ child: TextField(
+ controller: _controllerFilled,
+ enabled: false,
+ decoration: InputDecoration(
+ prefixIcon: const Icon(Icons.search),
+ suffixIcon: _ClearButton(controller: _controllerFilled),
+ labelText: 'Disabled',
+ hintText: 'hint text',
+ helperText: 'supporting text',
+ filled: true,
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsets.all(smallSpacing),
+ child: TextField(
+ controller: _controllerOutlined,
+ decoration: InputDecoration(
+ prefixIcon: const Icon(Icons.search),
+ suffixIcon: _ClearButton(controller: _controllerOutlined),
+ labelText: 'Outlined',
+ hintText: 'hint text',
+ helperText: 'supporting text',
+ border: const OutlineInputBorder(),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsets.all(smallSpacing),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Flexible(
+ child: SizedBox(
+ width: 200,
+ child: TextField(
+ controller: _controllerOutlined,
+ decoration: InputDecoration(
+ prefixIcon: const Icon(Icons.search),
+ suffixIcon:
+ _ClearButton(controller: _controllerOutlined),
+ labelText: 'Outlined',
+ hintText: 'hint text',
+ helperText: 'supporting text',
+ errorText: 'error text',
+ border: const OutlineInputBorder(),
+ filled: true,
+ ),
+ ),
+ ),
+ ),
+ const SizedBox(width: smallSpacing),
+ Flexible(
+ child: SizedBox(
+ width: 200,
+ child: TextField(
+ controller: _controllerOutlined,
+ enabled: false,
+ decoration: InputDecoration(
+ prefixIcon: const Icon(Icons.search),
+ suffixIcon:
+ _ClearButton(controller: _controllerOutlined),
+ labelText: 'Disabled',
+ hintText: 'hint text',
+ helperText: 'supporting text',
+ border: const OutlineInputBorder(),
+ filled: true,
+ ),
+ ),
+ ),
+ ),
+ ])),
+ ],
+ ),
+ );
+ }
+}
+
+class Dialogs extends StatefulWidget {
+ const Dialogs({super.key});
+
+ @override
+ State createState() => _DialogsState();
+}
+
+class _DialogsState extends State {
+ void openDialog(BuildContext context) {
+ showDialog(
+ context: context,
+ builder: (BuildContext context) => AlertDialog(
+ title: const Text('What is a dialog?'),
+ content: const Text(
+ 'A dialog is a type of modal window that appears in front of app content to provide critical information, or prompt for a decision to be made.'),
+ actions: [
+ TextButton(
+ child: const Text('Okay'),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ FilledButton(
+ child: const Text('Dismiss'),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ ],
+ ),
+ );
+ }
+
+ void openFullscreenDialog(BuildContext context) {
+ showDialog(
+ context: context,
+ builder: (BuildContext context) => Dialog.fullscreen(
+ child: Padding(
+ padding: const EdgeInsets.all(20.0),
+ child: Scaffold(
+ appBar: AppBar(
+ title: const Text('Full-screen dialog'),
+ centerTitle: false,
+ leading: IconButton(
+ icon: const Icon(Icons.close),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ actions: [
+ TextButton(
+ child: const Text('Close'),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return ComponentDecoration(
+ label: 'Dialog',
+ tooltipMessage:
+ 'Use showDialog with Dialog.fullscreen, AlertDialog, or SimpleDialog',
+ child: Wrap(
+ alignment: WrapAlignment.spaceBetween,
+ children: [
+ TextButton(
+ child: const Text(
+ 'Show dialog',
+ style: TextStyle(fontWeight: FontWeight.bold),
+ ),
+ onPressed: () => openDialog(context),
+ ),
+ TextButton(
+ child: const Text(
+ 'Show full-screen dialog',
+ style: TextStyle(fontWeight: FontWeight.bold),
+ ),
+ onPressed: () => openFullscreenDialog(context),
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+class Dividers extends StatelessWidget {
+ const Dividers({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return const ComponentDecoration(
+ label: 'Dividers',
+ tooltipMessage: 'Use Divider or VerticalDivider',
+ child: Column(
+ children: [
+ Divider(key: Key('divider')),
+ ],
+ ),
+ );
+ }
+}
+
+class Switches extends StatelessWidget {
+ const Switches({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return const ComponentDecoration(
+ label: 'Switches',
+ tooltipMessage: 'Use SwitchListTile or Switch',
+ child: Column(
+ children: [
+ SwitchRow(isEnabled: true),
+ SwitchRow(isEnabled: false),
+ ],
+ ),
+ );
+ }
+}
+
+class SwitchRow extends StatefulWidget {
+ const SwitchRow({super.key, required this.isEnabled});
+
+ final bool isEnabled;
+
+ @override
+ State createState() => _SwitchRowState();
+}
+
+class _SwitchRowState extends State {
+ bool value0 = false;
+ bool value1 = true;
+
+ final MaterialStateProperty thumbIcon =
+ MaterialStateProperty.resolveWith((Set states) {
+ if (states.contains(MaterialState.selected)) {
+ return const Icon(Icons.check);
+ }
+ return const Icon(Icons.close);
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return Row(
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ children: [
+ Switch(
+ value: value0,
+ onChanged: widget.isEnabled
+ ? (bool value) {
+ setState(() {
+ value0 = value;
+ });
+ }
+ : null,
+ ),
+ Switch(
+ thumbIcon: thumbIcon,
+ value: value1,
+ onChanged: widget.isEnabled
+ ? (bool value) {
+ setState(() {
+ value1 = value;
+ });
+ }
+ : null,
+ ),
+ ],
+ );
+ }
+}
+
+class Checkboxes extends StatefulWidget {
+ const Checkboxes({super.key});
+
+ @override
+ State createState() => _CheckboxesState();
+}
+
+class _CheckboxesState extends State {
+ bool? isChecked0 = true;
+ bool? isChecked1;
+ bool? isChecked2 = false;
+
+ @override
+ Widget build(BuildContext context) {
+ return ComponentDecoration(
+ label: 'Checkboxes',
+ tooltipMessage: 'Use CheckboxListTile or Checkbox',
+ child: Column(
+ children: [
+ CheckboxListTile(
+ tristate: true,
+ value: isChecked0,
+ title: const Text('Option 1'),
+ onChanged: (bool? value) {
+ setState(() {
+ isChecked0 = value;
+ });
+ },
+ ),
+ CheckboxListTile(
+ tristate: true,
+ value: isChecked1,
+ title: const Text('Option 2'),
+ onChanged: (bool? value) {
+ setState(() {
+ isChecked1 = value;
+ });
+ },
+ ),
+ CheckboxListTile(
+ tristate: true,
+ value: isChecked2,
+ title: const Text('Option 3'),
+ onChanged: (bool? value) {
+ setState(() {
+ isChecked2 = value;
+ });
+ },
+ ),
+ const CheckboxListTile(
+ tristate: true,
+ title: Text('Option 4'),
+ value: true,
+ onChanged: null,
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+enum Value { first, second }
+
+class Radios extends StatefulWidget {
+ const Radios({super.key});
+
+ @override
+ State createState() => _RadiosState();
+}
+
+enum Options { option1, option2, option3 }
+
+class _RadiosState extends State {
+ Options? _selectedOption = Options.option1;
+
+ @override
+ Widget build(BuildContext context) {
+ return ComponentDecoration(
+ label: 'Radio buttons',
+ tooltipMessage: 'Use RadioListTile or Radio',
+ child: Column(
+ children: [
+ RadioListTile(
+ title: const Text('Option 1'),
+ value: Options.option1,
+ groupValue: _selectedOption,
+ onChanged: (Options? value) {
+ setState(() {
+ _selectedOption = value;
+ });
+ },
+ ),
+ RadioListTile(
+ title: const Text('Option 2'),
+ value: Options.option2,
+ groupValue: _selectedOption,
+ onChanged: (Options? value) {
+ setState(() {
+ _selectedOption = value;
+ });
+ },
+ ),
+ RadioListTile(
+ title: const Text('Option 3'),
+ value: Options.option3,
+ groupValue: _selectedOption,
+ onChanged: null,
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+class ProgressIndicators extends StatefulWidget {
+ const ProgressIndicators({super.key});
+
+ @override
+ State createState() => _ProgressIndicatorsState();
+}
+
+class _ProgressIndicatorsState extends State {
+ bool playProgressIndicator = false;
+
+ @override
+ Widget build(BuildContext context) {
+ final double? progressValue = playProgressIndicator ? null : 0.7;
+
+ return ComponentDecoration(
+ label: 'Progress indicators',
+ tooltipMessage:
+ 'Use CircularProgressIndicator or LinearProgressIndicator',
+ child: Column(
+ children: [
+ Row(
+ children: [
+ IconButton(
+ isSelected: playProgressIndicator,
+ selectedIcon: const Icon(Icons.pause),
+ icon: const Icon(Icons.play_arrow),
+ onPressed: () {
+ setState(() {
+ playProgressIndicator = !playProgressIndicator;
+ });
+ },
+ ),
+ Expanded(
+ child: Row(
+ children: [
+ rowDivider,
+ CircularProgressIndicator(
+ value: progressValue,
+ ),
+ rowDivider,
+ Expanded(
+ child: LinearProgressIndicator(
+ value: progressValue,
+ ),
+ ),
+ rowDivider,
+ ],
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+const List appBarDestinations = [
+ NavigationDestination(
+ tooltip: '',
+ icon: Icon(Icons.widgets_outlined),
+ label: 'Components',
+ selectedIcon: Icon(Icons.widgets),
+ ),
+ NavigationDestination(
+ tooltip: '',
+ icon: Icon(Icons.format_paint_outlined),
+ label: 'Color',
+ selectedIcon: Icon(Icons.format_paint),
+ ),
+ NavigationDestination(
+ tooltip: '',
+ icon: Icon(Icons.text_snippet_outlined),
+ label: 'Typography',
+ selectedIcon: Icon(Icons.text_snippet),
+ ),
+ NavigationDestination(
+ tooltip: '',
+ icon: Icon(Icons.invert_colors_on_outlined),
+ label: 'Elevation',
+ selectedIcon: Icon(Icons.opacity),
+ )
+];
+
+const List exampleBarDestinations = [
+ NavigationDestination(
+ tooltip: '',
+ icon: Icon(Icons.explore_outlined),
+ label: 'Explore',
+ selectedIcon: Icon(Icons.explore),
+ ),
+ NavigationDestination(
+ tooltip: '',
+ icon: Icon(Icons.pets_outlined),
+ label: 'Pets',
+ selectedIcon: Icon(Icons.pets),
+ ),
+ NavigationDestination(
+ tooltip: '',
+ icon: Icon(Icons.account_box_outlined),
+ label: 'Account',
+ selectedIcon: Icon(Icons.account_box),
+ )
+];
+
+List barWithBadgeDestinations = [
+ NavigationDestination(
+ tooltip: '',
+ icon: Badge.count(count: 1000, child: const Icon(Icons.mail_outlined)),
+ label: 'Mail',
+ selectedIcon: Badge.count(count: 1000, child: const Icon(Icons.mail)),
+ ),
+ const NavigationDestination(
+ tooltip: '',
+ icon: Badge(label: Text('10'), child: Icon(Icons.chat_bubble_outline)),
+ label: 'Chat',
+ selectedIcon: Badge(label: Text('10'), child: Icon(Icons.chat_bubble)),
+ ),
+ const NavigationDestination(
+ tooltip: '',
+ icon: Badge(child: Icon(Icons.group_outlined)),
+ label: 'Rooms',
+ selectedIcon: Badge(child: Icon(Icons.group_rounded)),
+ ),
+ NavigationDestination(
+ tooltip: '',
+ icon: Badge.count(count: 3, child: const Icon(Icons.videocam_outlined)),
+ label: 'Meet',
+ selectedIcon: Badge.count(count: 3, child: const Icon(Icons.videocam)),
+ )
+];
+
+class NavigationBars extends StatefulWidget {
+ const NavigationBars({
+ super.key,
+ this.onSelectItem,
+ required this.selectedIndex,
+ required this.isExampleBar,
+ this.isBadgeExample = false,
+ });
+
+ final void Function(int)? onSelectItem;
+ final int selectedIndex;
+ final bool isExampleBar;
+ final bool isBadgeExample;
+
+ @override
+ State