Merge branch 'master' of github.com:flutter/flutter into snackbar
diff --git a/.ci.yaml b/.ci.yaml
index 031f7a5..591cba6 100644
--- a/.ci.yaml
+++ b/.ci.yaml
@@ -2520,7 +2520,6 @@
       task_name: flutter_gallery_macos__start_up
 
   - name: Mac flutter_view_macos__start_up
-    bringup: true # New target https://github.com/flutter/flutter/issues/109633
     presubmit: false
     recipe: devicelab/devicelab_drone
     timeout: 60
@@ -2642,6 +2641,16 @@
         ["devicelab", "hostonly"]
       task_name: hello_world_macos__compile
 
+  - name: Mac integration_ui_test_test_macos
+    bringup: true
+    recipe: devicelab/devicelab_drone
+    presubmit: false
+    timeout: 60
+    properties:
+      tags: >
+        ["devicelab", "mac"]
+      task_name: integration_ui_test_test_macos
+
   - name: Mac module_custom_host_app_name_test
     recipe: devicelab/devicelab_drone
     timeout: 60
diff --git a/TESTOWNERS b/TESTOWNERS
index f30f239..9ae5008 100644
--- a/TESTOWNERS
+++ b/TESTOWNERS
@@ -219,10 +219,10 @@
 /dev/devicelab/bin/tasks/flutter_gallery_macos__start_up.dart @a-wallen @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_view_macos__start_up.dart @a-wallen @flutter/desktop
-/dev/devicelab/bin/tasks/flutter_tool_startup__windows.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
+/dev/devicelab/bin/tasks/flutter_view_macos__start_up.dart @a-wallen @flutter/desktop
 /dev/devicelab/bin/tasks/flutter_view_win_desktop__start_up.dart @yaakovschectman @flutter/desktop
 /dev/devicelab/bin/tasks/gradle_desugar_classes_test.dart @zanderso @flutter/tool
 /dev/devicelab/bin/tasks/gradle_non_android_plugin_test.dart @stuartmorgan @flutter/plugin
@@ -236,6 +236,7 @@
 /dev/devicelab/bin/tasks/hello_world_macos__compile.dart @a-wallen @flutter/desktop
 /dev/devicelab/bin/tasks/hello_world_win_desktop__compile.dart @yaakovschectman @flutter/desktop
 /dev/devicelab/bin/tasks/hot_mode_dev_cycle_win_target__benchmark.dart @cbracken @flutter/desktop
+/dev/devicelab/bin/tasks/integration_ui_test_test_macos.dart @a-wallen @flutter/desktop
 /dev/devicelab/bin/tasks/module_custom_host_app_name_test.dart @zanderso @flutter/tool
 /dev/devicelab/bin/tasks/module_host_with_custom_build_test.dart @zanderso @flutter/tool
 /dev/devicelab/bin/tasks/module_test_ios.dart @jmagman @flutter/tool
diff --git a/bin/internal/engine.version b/bin/internal/engine.version
index 6862695..eca476c 100644
--- a/bin/internal/engine.version
+++ b/bin/internal/engine.version
@@ -1 +1 @@
-6fc6f9b605fe452b23e7cbef8fe38b061cd94476
+e0e2958ea4f7328be5abf48a05dbe68a8f63b8c5
diff --git a/bin/internal/flutter_plugins.version b/bin/internal/flutter_plugins.version
index ddd54bc..9a92070 100644
--- a/bin/internal/flutter_plugins.version
+++ b/bin/internal/flutter_plugins.version
@@ -1 +1 @@
-3ba81503e7f71c5896ee2c1645f225086c082704
+fe3b542e5528a7d9bc1d8014885b55277d30caee
diff --git a/dev/automated_tests/pubspec.yaml b/dev/automated_tests/pubspec.yaml
index cbcab30..6aa5a88 100644
--- a/dev/automated_tests/pubspec.yaml
+++ b/dev/automated_tests/pubspec.yaml
@@ -15,8 +15,8 @@
   platform: 3.1.0
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -71,4 +71,4 @@
   assets:
     - icon/test.png
 
-# PUBSPEC CHECKSUM: fa86
+# PUBSPEC CHECKSUM: b088
diff --git a/dev/benchmarks/complex_layout/pubspec.yaml b/dev/benchmarks/complex_layout/pubspec.yaml
index c3d0943..d201cc2 100644
--- a/dev/benchmarks/complex_layout/pubspec.yaml
+++ b/dev/benchmarks/complex_layout/pubspec.yaml
@@ -39,8 +39,8 @@
   integration_test:
     sdk: flutter
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -83,4 +83,4 @@
     - packages/flutter_gallery_assets/people/square/ali.png
     - packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png
 
-# PUBSPEC CHECKSUM: cf90
+# PUBSPEC CHECKSUM: 3e92
diff --git a/dev/benchmarks/macrobenchmarks/pubspec.yaml b/dev/benchmarks/macrobenchmarks/pubspec.yaml
index 63e3a18..f1915fd 100644
--- a/dev/benchmarks/macrobenchmarks/pubspec.yaml
+++ b/dev/benchmarks/macrobenchmarks/pubspec.yaml
@@ -59,8 +59,8 @@
   integration_test:
     sdk: flutter
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   convert: 3.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   coverage: 1.6.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -219,4 +219,4 @@
       fonts:
         - asset: packages/flutter_gallery_assets/fonts/GalleryIcons.ttf
 
-# PUBSPEC CHECKSUM: d678
+# PUBSPEC CHECKSUM: 117a
diff --git a/dev/benchmarks/microbenchmarks/pubspec.yaml b/dev/benchmarks/microbenchmarks/pubspec.yaml
index 17e817d..abfcef2 100644
--- a/dev/benchmarks/microbenchmarks/pubspec.yaml
+++ b/dev/benchmarks/microbenchmarks/pubspec.yaml
@@ -15,8 +15,8 @@
   test: 1.21.6
   flutter_gallery_assets: 1.0.2
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -136,4 +136,4 @@
     - packages/flutter_gallery_assets/people/square/stella.png
     - packages/flutter_gallery_assets/people/square/trevor.png
 
-# PUBSPEC CHECKSUM: 0ad3
+# PUBSPEC CHECKSUM: 58d5
diff --git a/dev/benchmarks/platform_channels_benchmarks/pubspec.yaml b/dev/benchmarks/platform_channels_benchmarks/pubspec.yaml
index 146a348..017ba7d 100644
--- a/dev/benchmarks/platform_channels_benchmarks/pubspec.yaml
+++ b/dev/benchmarks/platform_channels_benchmarks/pubspec.yaml
@@ -16,8 +16,8 @@
     path: ../microbenchmarks
   cupertino_icons: 1.0.5
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -73,4 +73,4 @@
 flutter:
   uses-material-design: true
 
-# PUBSPEC CHECKSUM: 5fc1
+# PUBSPEC CHECKSUM: 6dc3
diff --git a/dev/benchmarks/platform_views_layout/pubspec.yaml b/dev/benchmarks/platform_views_layout/pubspec.yaml
index aa6b542..82fa330 100644
--- a/dev/benchmarks/platform_views_layout/pubspec.yaml
+++ b/dev/benchmarks/platform_views_layout/pubspec.yaml
@@ -37,8 +37,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -81,4 +81,4 @@
     - packages/flutter_gallery_assets/people/square/ali.png
     - packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png
 
-# PUBSPEC CHECKSUM: cf90
+# PUBSPEC CHECKSUM: 3e92
diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml b/dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml
index 43458c3..cde805d 100644
--- a/dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml
+++ b/dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml
@@ -37,8 +37,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -81,4 +81,4 @@
     - packages/flutter_gallery_assets/people/square/ali.png
     - packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png
 
-# PUBSPEC CHECKSUM: cf90
+# PUBSPEC CHECKSUM: 3e92
diff --git a/dev/benchmarks/test_apps/stocks/pubspec.yaml b/dev/benchmarks/test_apps/stocks/pubspec.yaml
index 1325f66..6bbc063 100644
--- a/dev/benchmarks/test_apps/stocks/pubspec.yaml
+++ b/dev/benchmarks/test_apps/stocks/pubspec.yaml
@@ -33,8 +33,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   archive: 3.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -76,4 +76,4 @@
 flutter:
   uses-material-design: true
 
-# PUBSPEC CHECKSUM: 60af
+# PUBSPEC CHECKSUM: f2b1
diff --git a/dev/bots/pubspec.yaml b/dev/bots/pubspec.yaml
index 00cc658..12d0327 100644
--- a/dev/bots/pubspec.yaml
+++ b/dev/bots/pubspec.yaml
@@ -18,8 +18,8 @@
   test: 1.21.6
 
   _discoveryapis_commons: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   archive: 3.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -71,4 +71,4 @@
 dev_dependencies:
   test_api: 0.4.14
 
-# PUBSPEC CHECKSUM: 7a48
+# PUBSPEC CHECKSUM: d54a
diff --git a/dev/conductor/core/pubspec.yaml b/dev/conductor/core/pubspec.yaml
index f7ba977..647aa7c 100644
--- a/dev/conductor/core/pubspec.yaml
+++ b/dev/conductor/core/pubspec.yaml
@@ -34,8 +34,8 @@
   test: 1.21.6
   test_api: 0.4.14
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   convert: 3.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   coverage: 1.6.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -65,4 +65,4 @@
   web_socket_channel: 2.2.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"
 
-# PUBSPEC CHECKSUM: 44b7
+# PUBSPEC CHECKSUM: b5b9
diff --git a/dev/customer_testing/pubspec.yaml b/dev/customer_testing/pubspec.yaml
index 27bee53..4dd9d03 100644
--- a/dev/customer_testing/pubspec.yaml
+++ b/dev/customer_testing/pubspec.yaml
@@ -20,8 +20,8 @@
 dev_dependencies:
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   convert: 3.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   coverage: 1.6.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -55,4 +55,4 @@
   webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   yaml: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
 
-# PUBSPEC CHECKSUM: e509
+# PUBSPEC CHECKSUM: a90b
diff --git a/dev/devicelab/bin/tasks/integration_ui_test_test_macos.dart b/dev/devicelab/bin/tasks/integration_ui_test_test_macos.dart
new file mode 100644
index 0000000..0026817
--- /dev/null
+++ b/dev/devicelab/bin/tasks/integration_ui_test_test_macos.dart
@@ -0,0 +1,12 @@
+// 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_devicelab/framework/devices.dart';
+import 'package:flutter_devicelab/framework/framework.dart';
+import 'package:flutter_devicelab/tasks/integration_tests.dart';
+
+Future<void> main() async {
+  deviceOperatingSystem = DeviceOperatingSystem.macos;
+  await task(createEndToEndIntegrationTest());
+}
diff --git a/dev/devicelab/pubspec.yaml b/dev/devicelab/pubspec.yaml
index ab20d3a..f65ba8f 100644
--- a/dev/devicelab/pubspec.yaml
+++ b/dev/devicelab/pubspec.yaml
@@ -47,8 +47,8 @@
 dev_dependencies:
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   coverage: 1.6.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   frontend_server_client: 3.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -69,4 +69,4 @@
   watcher: 1.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   web_socket_channel: 2.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
 
-# PUBSPEC CHECKSUM: 09b7
+# PUBSPEC CHECKSUM: 04b9
diff --git a/dev/integration_tests/android_semantics_testing/pubspec.yaml b/dev/integration_tests/android_semantics_testing/pubspec.yaml
index 9c25dbd..04407c9 100644
--- a/dev/integration_tests/android_semantics_testing/pubspec.yaml
+++ b/dev/integration_tests/android_semantics_testing/pubspec.yaml
@@ -13,8 +13,8 @@
   pub_semver: 2.1.1
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   archive: 3.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -68,4 +68,4 @@
 flutter:
   uses-material-design: true
 
-# PUBSPEC CHECKSUM: def5
+# PUBSPEC CHECKSUM: d8f7
diff --git a/dev/integration_tests/android_views/pubspec.yaml b/dev/integration_tests/android_views/pubspec.yaml
index bb03bca..c1fd839 100644
--- a/dev/integration_tests/android_views/pubspec.yaml
+++ b/dev/integration_tests/android_views/pubspec.yaml
@@ -51,8 +51,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -92,4 +92,4 @@
 flutter:
   uses-material-design: true
 
-# PUBSPEC CHECKSUM: f676
+# PUBSPEC CHECKSUM: a978
diff --git a/dev/integration_tests/channels/pubspec.yaml b/dev/integration_tests/channels/pubspec.yaml
index bb936cc..c518f3f 100644
--- a/dev/integration_tests/channels/pubspec.yaml
+++ b/dev/integration_tests/channels/pubspec.yaml
@@ -11,8 +11,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   archive: 3.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -65,4 +65,4 @@
 flutter:
   uses-material-design: true
 
-# PUBSPEC CHECKSUM: 8939
+# PUBSPEC CHECKSUM: 0f3b
diff --git a/dev/integration_tests/deferred_components_test/pubspec.yaml b/dev/integration_tests/deferred_components_test/pubspec.yaml
index 104ea22..3241988 100644
--- a/dev/integration_tests/deferred_components_test/pubspec.yaml
+++ b/dev/integration_tests/deferred_components_test/pubspec.yaml
@@ -32,8 +32,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -80,4 +80,4 @@
       assets:
         - customassets/flutter_logo.png
 
-# PUBSPEC CHECKSUM: def5
+# PUBSPEC CHECKSUM: d8f7
diff --git a/dev/integration_tests/external_ui/pubspec.yaml b/dev/integration_tests/external_ui/pubspec.yaml
index 18d38c8..0a0729d 100644
--- a/dev/integration_tests/external_ui/pubspec.yaml
+++ b/dev/integration_tests/external_ui/pubspec.yaml
@@ -11,8 +11,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   archive: 3.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -65,4 +65,4 @@
 flutter:
   uses-material-design: true
 
-# PUBSPEC CHECKSUM: 8939
+# PUBSPEC CHECKSUM: 0f3b
diff --git a/dev/integration_tests/flavors/pubspec.yaml b/dev/integration_tests/flavors/pubspec.yaml
index ccb1914..c2d14c8 100644
--- a/dev/integration_tests/flavors/pubspec.yaml
+++ b/dev/integration_tests/flavors/pubspec.yaml
@@ -13,8 +13,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   archive: 3.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -74,4 +74,4 @@
 flutter:
   uses-material-design: true
 
-# PUBSPEC CHECKSUM: def5
+# PUBSPEC CHECKSUM: d8f7
diff --git a/dev/integration_tests/flutter_gallery/pubspec.yaml b/dev/integration_tests/flutter_gallery/pubspec.yaml
index 45a5753..bd4a6d6 100644
--- a/dev/integration_tests/flutter_gallery/pubspec.yaml
+++ b/dev/integration_tests/flutter_gallery/pubspec.yaml
@@ -62,8 +62,8 @@
   integration_test:
     sdk: flutter
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   archive: 3.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -277,4 +277,4 @@
       - asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Regular.ttf
       - asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Light.ttf
 
-# PUBSPEC CHECKSUM: 05f7
+# PUBSPEC CHECKSUM: 90f9
diff --git a/dev/integration_tests/hybrid_android_views/pubspec.yaml b/dev/integration_tests/hybrid_android_views/pubspec.yaml
index ecbcf61..3b19ad0 100644
--- a/dev/integration_tests/hybrid_android_views/pubspec.yaml
+++ b/dev/integration_tests/hybrid_android_views/pubspec.yaml
@@ -51,8 +51,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -92,4 +92,4 @@
 flutter:
   uses-material-design: true
 
-# PUBSPEC CHECKSUM: f676
+# PUBSPEC CHECKSUM: a978
diff --git a/dev/integration_tests/ios_platform_view_tests/pubspec.yaml b/dev/integration_tests/ios_platform_view_tests/pubspec.yaml
index 4926a18..cf3c8fc 100644
--- a/dev/integration_tests/ios_platform_view_tests/pubspec.yaml
+++ b/dev/integration_tests/ios_platform_view_tests/pubspec.yaml
@@ -32,8 +32,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -77,4 +77,4 @@
   # the material Icons class.
   uses-material-design: true
 
-# PUBSPEC CHECKSUM: def5
+# PUBSPEC CHECKSUM: d8f7
diff --git a/dev/integration_tests/platform_interaction/pubspec.yaml b/dev/integration_tests/platform_interaction/pubspec.yaml
index 4e88a56..897e113 100644
--- a/dev/integration_tests/platform_interaction/pubspec.yaml
+++ b/dev/integration_tests/platform_interaction/pubspec.yaml
@@ -11,8 +11,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   archive: 3.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -65,4 +65,4 @@
 flutter:
   uses-material-design: true
 
-# PUBSPEC CHECKSUM: 8939
+# PUBSPEC CHECKSUM: 0f3b
diff --git a/dev/integration_tests/ui/integration_test/resize_integration_test.dart b/dev/integration_tests/ui/integration_test/resize_integration_test.dart
new file mode 100644
index 0000000..6dedbc1
--- /dev/null
+++ b/dev/integration_tests/ui/integration_test/resize_integration_test.dart
@@ -0,0 +1,57 @@
+// 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/widgets.dart' as widgets show Container, Size, runApp;
+import 'package:flutter_test/flutter_test.dart';
+import 'package:integration_test/integration_test.dart';
+import 'package:integration_ui/resize.dart' as app;
+
+void main() {
+  IntegrationTestWidgetsFlutterBinding.ensureInitialized();
+
+  group('end-to-end test', () {
+    testWidgets('Use button to resize window',
+        timeout: const Timeout(Duration(seconds: 5)),
+        (WidgetTester tester) async {
+      const app.ResizeApp resizeApp = app.ResizeApp();
+
+      widgets.runApp(resizeApp);
+      await tester.pumpAndSettle();
+
+      final Finder fab = find.byKey(app.ResizeApp.extendedFab);
+      expect(fab, findsOneWidget);
+
+      final Finder root = find.byWidget(resizeApp);
+      final widgets.Size sizeBefore = tester.getSize(root);
+
+      await tester.tap(fab);
+      await tester.pumpAndSettle();
+
+      final widgets.Size sizeAfter = tester.getSize(root);
+      expect(sizeAfter.width, equals(sizeBefore.width + app.ResizeApp.resizeBy));
+      expect(sizeAfter.height, equals(sizeBefore.height + app.ResizeApp.resizeBy));
+
+      final Finder widthLabel = find.byKey(app.ResizeApp.widthLabel);
+      expect(widthLabel, findsOneWidget);
+      expect(find.text('width: ${sizeAfter.width}'), findsOneWidget);
+
+      final Finder heightLabel = find.byKey(app.ResizeApp.heightLabel);
+      expect(heightLabel, findsOneWidget);
+      expect(find.text('height: ${sizeAfter.height}'), findsOneWidget);
+    });
+  });
+
+  testWidgets('resize window after calling runApp twice, the second with no content',
+      timeout: const Timeout(Duration(seconds: 5)),
+      (WidgetTester tester) async {
+    const app.ResizeApp root = app.ResizeApp();
+    widgets.runApp(root);
+    widgets.runApp(widgets.Container());
+
+    await tester.pumpAndSettle();
+
+    const widgets.Size expectedSize = widgets.Size(100, 100);
+    await app.ResizeApp.resize(expectedSize);
+  });
+}
diff --git a/dev/integration_tests/ui/lib/resize.dart b/dev/integration_tests/ui/lib/resize.dart
new file mode 100644
index 0000000..86359cf
--- /dev/null
+++ b/dev/integration_tests/ui/lib/resize.dart
@@ -0,0 +1,76 @@
+// 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';
+
+void main() async {
+  runApp(const ResizeApp());
+}
+
+class ResizeApp extends StatefulWidget {
+  const ResizeApp({super.key});
+
+  static const double resizeBy = 10.0;
+  static const Key heightLabel = Key('height label');
+  static const Key widthLabel = Key('width label');
+  static const Key extendedFab = Key('extended FAB');
+
+  static const MethodChannel platform =
+    MethodChannel('samples.flutter.dev/resize');
+
+  static Future<void> resize(Size size) async {
+    await ResizeApp.platform.invokeMethod<void>(
+      'resize',
+      <String, dynamic>{
+        'width': size.width,
+        'height': size.height,
+      }
+    );
+  }
+
+  @override
+  State<ResizeApp> createState() => _ResizeAppState();
+}
+
+class _ResizeAppState extends State<ResizeApp> {
+  @override
+  Widget build(BuildContext context) {
+    return MaterialApp(
+      home: Builder(
+        builder: (BuildContext context) {
+          final Size currentSize = MediaQuery.of(context).size;
+          return Scaffold(
+            floatingActionButton: FloatingActionButton.extended(
+              key: ResizeApp.extendedFab,
+              label: const Text('Resize'),
+              onPressed: () {
+                final Size nextSize = Size(
+                  currentSize.width + ResizeApp.resizeBy,
+                  currentSize.height + ResizeApp.resizeBy,
+                );
+                ResizeApp.resize(nextSize);
+              },
+            ),
+            body: Center(
+              child: Column(
+                mainAxisAlignment: MainAxisAlignment.center,
+                children: <Widget>[
+                  Text(
+                    key: ResizeApp.widthLabel,
+                    'width: ${currentSize.width}'
+                  ),
+                  Text(
+                    key: ResizeApp.heightLabel,
+                    'height: ${currentSize.height}',
+                  ),
+                ],
+              ),
+            ),
+          );
+        }
+      ),
+    );
+  }
+}
diff --git a/dev/integration_tests/ui/macos/Runner/MainFlutterWindow.swift b/dev/integration_tests/ui/macos/Runner/MainFlutterWindow.swift
index a97a962..a52288a 100644
--- a/dev/integration_tests/ui/macos/Runner/MainFlutterWindow.swift
+++ b/dev/integration_tests/ui/macos/Runner/MainFlutterWindow.swift
@@ -5,6 +5,12 @@
 import Cocoa
 import FlutterMacOS
 
+extension NSWindow {
+  var titlebarHeight: CGFloat {
+    frame.height - contentRect(forFrameRect: frame).height
+  }
+}
+
 class MainFlutterWindow: NSWindow {
   override func awakeFromNib() {
     let flutterViewController = FlutterViewController.init()
@@ -12,8 +18,35 @@
     self.contentViewController = flutterViewController
     self.setFrame(windowFrame, display: true)
 
+    RegisterMethodChannel(registry: flutterViewController)
     RegisterGeneratedPlugins(registry: flutterViewController)
 
     super.awakeFromNib()
   }
+
+    func RegisterMethodChannel(registry: FlutterPluginRegistry) {
+    let registrar = registry.registrar(forPlugin: "resize")
+    let channel = FlutterMethodChannel(name: "samples.flutter.dev/resize",
+                                       binaryMessenger: registrar.messenger)
+    channel.setMethodCallHandler({ (call, result) in
+      if call.method == "resize" {
+        if let args = call.arguments as? Dictionary<String, Any>,
+          let width = args["width"] as? Double,
+          var height = args["height"] as? Double {
+          height += self.titlebarHeight
+          let currentFrame: NSRect = self.frame
+          let nextFrame: NSRect = NSMakeRect(
+            currentFrame.minX - (width - currentFrame.width) / 2,
+            currentFrame.minY - (height - currentFrame.height) / 2,
+            width,
+            height
+          )
+          self.setFrame(nextFrame, display: true, animate: false)
+          result(true)
+        } else {
+          result(FlutterError.init(code: "bad args", message: nil, details: nil))
+        }
+      }
+    })
+  }
 }
diff --git a/dev/integration_tests/ui/pubspec.yaml b/dev/integration_tests/ui/pubspec.yaml
index 3ddad3d..5605f2d 100644
--- a/dev/integration_tests/ui/pubspec.yaml
+++ b/dev/integration_tests/ui/pubspec.yaml
@@ -17,8 +17,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   archive: 3.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -82,4 +82,4 @@
   assets:
     - assets/foo.png
 
-# PUBSPEC CHECKSUM: 7ceb
+# PUBSPEC CHECKSUM: 17ed
diff --git a/dev/integration_tests/web_e2e_tests/pubspec.yaml b/dev/integration_tests/web_e2e_tests/pubspec.yaml
index 531acfd..9902237 100644
--- a/dev/integration_tests/web_e2e_tests/pubspec.yaml
+++ b/dev/integration_tests/web_e2e_tests/pubspec.yaml
@@ -54,8 +54,8 @@
   http: 0.13.5
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   convert: 3.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   coverage: 1.6.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -84,4 +84,4 @@
   webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   yaml: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
 
-# PUBSPEC CHECKSUM: 10d9
+# PUBSPEC CHECKSUM: 23db
diff --git a/dev/integration_tests/windows_startup_test/pubspec.yaml b/dev/integration_tests/windows_startup_test/pubspec.yaml
index e51527b..619df74 100644
--- a/dev/integration_tests/windows_startup_test/pubspec.yaml
+++ b/dev/integration_tests/windows_startup_test/pubspec.yaml
@@ -11,8 +11,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   archive: 3.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -62,4 +62,4 @@
   webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   yaml: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
 
-# PUBSPEC CHECKSUM: 8939
+# PUBSPEC CHECKSUM: 0f3b
diff --git a/dev/tools/gen_defaults/bin/gen_defaults.dart b/dev/tools/gen_defaults/bin/gen_defaults.dart
index ef1f32a..00c6cd7 100644
--- a/dev/tools/gen_defaults/bin/gen_defaults.dart
+++ b/dev/tools/gen_defaults/bin/gen_defaults.dart
@@ -24,6 +24,7 @@
 import 'package:gen_defaults/card_template.dart';
 import 'package:gen_defaults/checkbox_template.dart';
 import 'package:gen_defaults/dialog_template.dart';
+import 'package:gen_defaults/divider_template.dart';
 import 'package:gen_defaults/fab_template.dart';
 import 'package:gen_defaults/filter_chip_template.dart';
 import 'package:gen_defaults/icon_button_template.dart';
@@ -65,6 +66,7 @@
     'date_picker_docked.json',
     'date_picker_modal.json',
     'dialog.json',
+    'divider.json',
     'dialog_fullscreen.json',
     'elevation.json',
     'fab_extended_primary.json',
@@ -121,6 +123,7 @@
   CardTemplate('Card', '$materialLib/card.dart', tokens).updateFile();
   CheckboxTemplate('Checkbox', '$materialLib/checkbox.dart', tokens).updateFile();
   DialogTemplate('Dialog', '$materialLib/dialog.dart', tokens).updateFile();
+  DividerTemplate('Divider', '$materialLib/divider.dart', tokens).updateFile();
   FABTemplate('FAB', '$materialLib/floating_action_button.dart', tokens).updateFile();
   FilterChipTemplate('ChoiceChip', '$materialLib/choice_chip.dart', tokens).updateFile();
   FilterChipTemplate('FilterChip', '$materialLib/filter_chip.dart', tokens).updateFile();
diff --git a/dev/tools/gen_defaults/lib/divider_template.dart b/dev/tools/gen_defaults/lib/divider_template.dart
new file mode 100644
index 0000000..2028dcb
--- /dev/null
+++ b/dev/tools/gen_defaults/lib/divider_template.dart
@@ -0,0 +1,24 @@
+// 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 'template.dart';
+
+class DividerTemplate extends TokenTemplate {
+  const DividerTemplate(super.blockName, super.fileName, super.tokens, {
+    super.colorSchemePrefix = '_colors.',
+    super.textThemePrefix = '_textTheme.'
+  });
+
+  @override
+  String generate() => '''
+class _${blockName}DefaultsM3 extends DividerThemeData {
+  _${blockName}DefaultsM3(this.context) : super(thickness: ${tokens["md.comp.divider.thickness"]});
+
+  final BuildContext context;
+  late final ColorScheme _colors = Theme.of(context).colorScheme;
+
+  @override Color? get color => ${componentColor("md.comp.divider")};
+}
+''';
+}
diff --git a/dev/tools/gen_defaults/pubspec.yaml b/dev/tools/gen_defaults/pubspec.yaml
index 88e033d..f9eecb0 100644
--- a/dev/tools/gen_defaults/pubspec.yaml
+++ b/dev/tools/gen_defaults/pubspec.yaml
@@ -11,8 +11,8 @@
   path: 1.8.2
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -55,4 +55,4 @@
   webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   yaml: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
 
-# PUBSPEC CHECKSUM: e509
+# PUBSPEC CHECKSUM: a90b
diff --git a/dev/tools/gen_keycodes/pubspec.yaml b/dev/tools/gen_keycodes/pubspec.yaml
index 8f8ebfc..412660c 100644
--- a/dev/tools/gen_keycodes/pubspec.yaml
+++ b/dev/tools/gen_keycodes/pubspec.yaml
@@ -23,8 +23,8 @@
   test: 1.21.6
   test_api: 0.4.14
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   convert: 3.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   coverage: 1.6.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -57,4 +57,4 @@
   webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   yaml: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
 
-# PUBSPEC CHECKSUM: 81fe
+# PUBSPEC CHECKSUM: b101
diff --git a/dev/tools/pubspec.yaml b/dev/tools/pubspec.yaml
index 274891a..ae91f9c 100644
--- a/dev/tools/pubspec.yaml
+++ b/dev/tools/pubspec.yaml
@@ -29,8 +29,8 @@
   test: 1.21.6
   test_api: 0.4.14
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   convert: 3.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   coverage: 1.6.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -61,4 +61,4 @@
   webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   yaml: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
 
-# PUBSPEC CHECKSUM: 0d16
+# PUBSPEC CHECKSUM: 0e18
diff --git a/examples/api/lib/material/divider/divider.0.dart b/examples/api/lib/material/divider/divider.0.dart
index 5912c1f..6672379 100644
--- a/examples/api/lib/material/divider/divider.0.dart
+++ b/examples/api/lib/material/divider/divider.0.dart
@@ -11,22 +11,19 @@
 class MyApp extends StatelessWidget {
   const MyApp({super.key});
 
-  static const String _title = 'Flutter Code Sample';
-
   @override
   Widget build(BuildContext context) {
     return MaterialApp(
-      title: _title,
       home: Scaffold(
-        appBar: AppBar(title: const Text(_title)),
-        body: const MyStatelessWidget(),
+        appBar: AppBar(title: const Text('Divider Sample')),
+        body: const DividerExample(),
       ),
     );
   }
 }
 
-class MyStatelessWidget extends StatelessWidget {
-  const MyStatelessWidget({super.key});
+class DividerExample extends StatelessWidget {
+  const DividerExample({super.key});
 
   @override
   Widget build(BuildContext context) {
diff --git a/examples/api/lib/material/divider/divider.1.dart b/examples/api/lib/material/divider/divider.1.dart
new file mode 100644
index 0000000..708e642
--- /dev/null
+++ b/examples/api/lib/material/divider/divider.1.dart
@@ -0,0 +1,52 @@
+// 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.
+
+/// Flutter code sample for [Divider].
+
+import 'package:flutter/material.dart';
+
+void main() => runApp(const MyApp());
+
+class MyApp extends StatelessWidget {
+  const MyApp({super.key});
+
+  @override
+  Widget build(BuildContext context) {
+    return MaterialApp(
+      theme: ThemeData(colorSchemeSeed: const Color(0xff6750a4), useMaterial3: true),
+      home: Scaffold(
+        appBar: AppBar(title: const Text('Divider Sample')),
+        body: const DividerExample(),
+      ),
+    );
+  }
+}
+
+class DividerExample extends StatelessWidget {
+  const DividerExample({super.key});
+
+  @override
+  Widget build(BuildContext context) {
+    return Center(
+      child: Padding(
+        padding: const EdgeInsets.all(16.0),
+        child: Column(
+          children: const <Widget>[
+            Expanded(
+              child: Card(
+                child: SizedBox.expand(),
+              ),
+            ),
+            Divider(),
+            Expanded(
+              child: Card(
+                child: SizedBox.expand(),
+              ),
+            ),
+          ],
+        ),
+      ),
+    );
+  }
+}
diff --git a/examples/api/lib/material/divider/vertical_divider.0.dart b/examples/api/lib/material/divider/vertical_divider.0.dart
index 0a9a5cb..2bb5ad1 100644
--- a/examples/api/lib/material/divider/vertical_divider.0.dart
+++ b/examples/api/lib/material/divider/vertical_divider.0.dart
@@ -11,22 +11,19 @@
 class MyApp extends StatelessWidget {
   const MyApp({super.key});
 
-  static const String _title = 'Flutter Code Sample';
-
   @override
   Widget build(BuildContext context) {
     return MaterialApp(
-      title: _title,
       home: Scaffold(
-        appBar: AppBar(title: const Text(_title)),
-        body: const MyStatelessWidget(),
+        appBar: AppBar(title: const Text('VerticalDivider Sample')),
+        body: const DividerExample(),
       ),
     );
   }
 }
 
-class MyStatelessWidget extends StatelessWidget {
-  const MyStatelessWidget({super.key});
+class DividerExample extends StatelessWidget {
+  const DividerExample({super.key});
 
   @override
   Widget build(BuildContext context) {
diff --git a/examples/api/lib/material/divider/vertical_divider.1.dart b/examples/api/lib/material/divider/vertical_divider.1.dart
new file mode 100644
index 0000000..47a7b54
--- /dev/null
+++ b/examples/api/lib/material/divider/vertical_divider.1.dart
@@ -0,0 +1,52 @@
+// 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.
+
+/// Flutter code sample for [Divider].
+
+import 'package:flutter/material.dart';
+
+void main() => runApp(const MyApp());
+
+class MyApp extends StatelessWidget {
+  const MyApp({super.key});
+
+  @override
+  Widget build(BuildContext context) {
+    return MaterialApp(
+      theme: ThemeData(colorSchemeSeed: const Color(0xff6750a4), useMaterial3: true),
+      home: Scaffold(
+        appBar: AppBar(title: const Text('Divider Sample')),
+        body: const DividerExample(),
+      ),
+    );
+  }
+}
+
+class DividerExample extends StatelessWidget {
+  const DividerExample({super.key});
+
+  @override
+  Widget build(BuildContext context) {
+    return Center(
+      child: Padding(
+        padding: const EdgeInsets.all(16.0),
+        child: Row(
+          children: const <Widget>[
+            Expanded(
+              child: Card(
+                child: SizedBox.expand(),
+              ),
+            ),
+            VerticalDivider(),
+            Expanded(
+              child: Card(
+                child: SizedBox.expand(),
+              ),
+            ),
+          ],
+        ),
+      ),
+    );
+  }
+}
diff --git a/examples/api/pubspec.yaml b/examples/api/pubspec.yaml
index 6eacd4d..da04feb 100644
--- a/examples/api/pubspec.yaml
+++ b/examples/api/pubspec.yaml
@@ -32,8 +32,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   archive: 3.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -85,4 +85,4 @@
 flutter:
   uses-material-design: true
 
-# PUBSPEC CHECKSUM: 73a4
+# PUBSPEC CHECKSUM: 3aa6
diff --git a/examples/api/test/material/divider/divider.0_test.dart b/examples/api/test/material/divider/divider.0_test.dart
new file mode 100644
index 0000000..825f0cb
--- /dev/null
+++ b/examples/api/test/material/divider/divider.0_test.dart
@@ -0,0 +1,28 @@
+// 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_api_samples/material/divider/divider.0.dart' as example;
+import 'package:flutter_test/flutter_test.dart';
+
+void main() {
+  testWidgets('Horizontal Divider', (WidgetTester tester) async {
+    await tester.pumpWidget(
+      const MaterialApp(
+        home: Scaffold(
+          body: example.MyApp(),
+        ),
+      ),
+    );
+
+    expect(find.byType(Divider), findsOneWidget);
+
+    // Divider is positioned horizintally.
+    final Offset container = tester.getBottomLeft(find.byType(Container).first);
+    expect(container.dy, tester.getTopLeft(find.byType(Divider)).dy);
+
+    final Offset subheader = tester.getTopLeft(find.text('Subheader'));
+    expect(subheader.dy, tester.getBottomLeft(find.byType(Divider)).dy);
+  });
+}
diff --git a/examples/api/test/material/divider/divider.1_test.dart b/examples/api/test/material/divider/divider.1_test.dart
new file mode 100644
index 0000000..a0cedbb
--- /dev/null
+++ b/examples/api/test/material/divider/divider.1_test.dart
@@ -0,0 +1,28 @@
+// 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_api_samples/material/divider/divider.1.dart' as example;
+import 'package:flutter_test/flutter_test.dart';
+
+void main() {
+  testWidgets('Horizontal Divider', (WidgetTester tester) async {
+    await tester.pumpWidget(
+      const MaterialApp(
+        home: Scaffold(
+          body: example.MyApp(),
+        ),
+      ),
+    );
+
+    expect(find.byType(Divider), findsOneWidget);
+
+    // Divider is positioned horizontally.
+    Offset card = tester.getBottomLeft(find.byType(Card).first);
+    expect(card.dy, tester.getTopLeft(find.byType(Divider)).dy);
+
+    card = tester.getTopLeft(find.byType(Card).last);
+    expect(card.dy, tester.getBottomLeft(find.byType(Divider)).dy);
+  });
+}
diff --git a/examples/api/test/material/divider/vertical_divider.0_test.dart b/examples/api/test/material/divider/vertical_divider.0_test.dart
new file mode 100644
index 0000000..63c7513
--- /dev/null
+++ b/examples/api/test/material/divider/vertical_divider.0_test.dart
@@ -0,0 +1,28 @@
+// 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_api_samples/material/divider/vertical_divider.0.dart' as example;
+import 'package:flutter_test/flutter_test.dart';
+
+void main() {
+  testWidgets('Vertical Divider', (WidgetTester tester) async {
+    await tester.pumpWidget(
+      const MaterialApp(
+        home: Scaffold(
+          body: example.MyApp(),
+        ),
+      ),
+    );
+
+    expect(find.byType(VerticalDivider), findsOneWidget);
+
+    // Divider is positioned horizintally.
+    Offset expanded = tester.getTopRight(find.byType(Expanded).first);
+    expect(expanded.dx, tester.getTopLeft(find.byType(VerticalDivider)).dx);
+
+    expanded = tester.getTopLeft(find.byType(Expanded).last);
+    expect(expanded.dx, tester.getTopRight(find.byType(VerticalDivider)).dx);
+  });
+}
diff --git a/examples/api/test/material/divider/vertical_divider.1_test.dart b/examples/api/test/material/divider/vertical_divider.1_test.dart
new file mode 100644
index 0000000..8840fee
--- /dev/null
+++ b/examples/api/test/material/divider/vertical_divider.1_test.dart
@@ -0,0 +1,28 @@
+// 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_api_samples/material/divider/vertical_divider.1.dart' as example;
+import 'package:flutter_test/flutter_test.dart';
+
+void main() {
+  testWidgets('Vertical Divider', (WidgetTester tester) async {
+    await tester.pumpWidget(
+      const MaterialApp(
+        home: Scaffold(
+          body: example.MyApp(),
+        ),
+      ),
+    );
+
+    expect(find.byType(VerticalDivider), findsOneWidget);
+
+    // Divider is positioned vertically.
+    Offset card = tester.getTopRight(find.byType(Card).first);
+    expect(card.dx, tester.getTopLeft(find.byType(VerticalDivider)).dx);
+
+    card = tester.getTopLeft(find.byType(Card).last);
+    expect(card.dx, tester.getTopRight(find.byType(VerticalDivider)).dx);
+  });
+}
diff --git a/examples/hello_world/pubspec.yaml b/examples/hello_world/pubspec.yaml
index ad880dd..2f47168 100644
--- a/examples/hello_world/pubspec.yaml
+++ b/examples/hello_world/pubspec.yaml
@@ -20,8 +20,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   archive: 3.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -68,4 +68,4 @@
   webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   yaml: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
 
-# PUBSPEC CHECKSUM: def5
+# PUBSPEC CHECKSUM: d8f7
diff --git a/examples/platform_channel/pubspec.yaml b/examples/platform_channel/pubspec.yaml
index 7bfa834..be8d680 100644
--- a/examples/platform_channel/pubspec.yaml
+++ b/examples/platform_channel/pubspec.yaml
@@ -20,8 +20,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   archive: 3.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -71,4 +71,4 @@
 flutter:
   uses-material-design: true
 
-# PUBSPEC CHECKSUM: def5
+# PUBSPEC CHECKSUM: d8f7
diff --git a/examples/platform_channel_swift/pubspec.yaml b/examples/platform_channel_swift/pubspec.yaml
index 3440ec3..83aa191 100644
--- a/examples/platform_channel_swift/pubspec.yaml
+++ b/examples/platform_channel_swift/pubspec.yaml
@@ -20,8 +20,8 @@
     sdk: flutter
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   archive: 3.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -71,4 +71,4 @@
 flutter:
   uses-material-design: true
 
-# PUBSPEC CHECKSUM: def5
+# PUBSPEC CHECKSUM: d8f7
diff --git a/packages/flutter/lib/src/material/divider.dart b/packages/flutter/lib/src/material/divider.dart
index 44b3f66..c3f30f4 100644
--- a/packages/flutter/lib/src/material/divider.dart
+++ b/packages/flutter/lib/src/material/divider.dart
@@ -4,6 +4,7 @@
 
 import 'package:flutter/widgets.dart';
 
+import 'color_scheme.dart';
 import 'divider_theme.dart';
 import 'theme.dart';
 
@@ -34,6 +35,13 @@
 /// ** See code in examples/api/lib/material/divider/divider.0.dart **
 /// {@end-tool}
 ///
+/// {@tool dartpad}
+/// This sample shows the creation of [Divider] widget, as described in:
+/// https://m3.material.io/components/divider/overview
+///
+/// ** See code in examples/api/lib/material/divider/divider.1.dart **
+/// {@end-tool}
+///
 /// See also:
 ///
 ///  * [PopupMenuDivider], which is the equivalent but for popup menus.
@@ -154,11 +162,14 @@
 
   @override
   Widget build(BuildContext context) {
+    final ThemeData theme = Theme.of(context);
     final DividerThemeData dividerTheme = DividerTheme.of(context);
+    final DividerThemeData defaults = theme.useMaterial3 ? _DividerDefaultsM3(context) : const _DividerDefaultsM2();
     final double height = this.height ?? dividerTheme.space ?? 16.0;
-    final double thickness = this.thickness ?? dividerTheme.thickness ?? 0.0;
+    final double thickness = this.thickness ?? dividerTheme.thickness ?? defaults.thickness!;
     final double indent = this.indent ?? dividerTheme.indent ?? 0.0;
     final double endIndent = this.endIndent ?? dividerTheme.endIndent ?? 0.0;
+    final Color? color = this.color ?? defaults.color;
 
     return SizedBox(
       height: height,
@@ -195,6 +206,13 @@
 /// ** See code in examples/api/lib/material/divider/vertical_divider.0.dart **
 /// {@end-tool}
 ///
+/// {@tool dartpad}
+/// This sample shows the creation of [VerticalDivider] widget, as described in:
+/// https://m3.material.io/components/divider/overview
+///
+/// ** See code in examples/api/lib/material/divider/vertical_divider.1.dart **
+/// {@end-tool}
+///
 /// See also:
 ///
 ///  * [ListView.separated], which can be used to generate vertical dividers.
@@ -264,11 +282,14 @@
 
   @override
   Widget build(BuildContext context) {
+    final ThemeData theme = Theme.of(context);
     final DividerThemeData dividerTheme = DividerTheme.of(context);
+    final DividerThemeData defaults = theme.useMaterial3 ? _DividerDefaultsM3(context) : const _DividerDefaultsM2();
     final double width = this.width ?? dividerTheme.space ?? 16.0;
-    final double thickness = this.thickness ?? dividerTheme.thickness ?? 0.0;
+    final double thickness = this.thickness ?? dividerTheme.thickness ?? defaults.thickness!;
     final double indent = this.indent ?? dividerTheme.indent ?? 0.0;
     final double endIndent = this.endIndent ?? dividerTheme.endIndent ?? 0.0;
+    final Color? color = this.color ?? defaults.color;
 
     return SizedBox(
       width: width,
@@ -286,3 +307,27 @@
     );
   }
 }
+
+class _DividerDefaultsM2 extends DividerThemeData {
+  const _DividerDefaultsM2() : super(thickness: 0.0);
+}
+
+// BEGIN GENERATED TOKEN PROPERTIES - Divider
+
+// Do not edit by hand. The code between the "BEGIN GENERATED" and
+// "END GENERATED" comments are generated from data in the Material
+// Design token database by the script:
+//   dev/tools/gen_defaults/bin/gen_defaults.dart.
+
+// Token database version: v0_132
+
+class _DividerDefaultsM3 extends DividerThemeData {
+  _DividerDefaultsM3(this.context) : super(thickness: 1.0);
+
+  final BuildContext context;
+  late final ColorScheme _colors = Theme.of(context).colorScheme;
+
+  @override Color? get color => _colors.outlineVariant;
+}
+
+// END GENERATED TOKEN PROPERTIES - Divider
diff --git a/packages/flutter/lib/src/painting/text_painter.dart b/packages/flutter/lib/src/painting/text_painter.dart
index 7cb35e2..0c893ec 100644
--- a/packages/flutter/lib/src/painting/text_painter.dart
+++ b/packages/flutter/lib/src/painting/text_painter.dart
@@ -1129,12 +1129,6 @@
   /// {@endtemplate}
   TextRange getWordBoundary(TextPosition position) {
     assert(_debugAssertTextLayoutIsValid);
-    // TODO(chunhtai): remove this workaround once ui.Paragraph.getWordBoundary
-    // can handle caret position.
-    // https://github.com/flutter/flutter/issues/111751.
-    if (position.affinity == TextAffinity.upstream) {
-      position = TextPosition(offset: position.offset - 1);
-    }
     return _paragraph!.getWordBoundary(position);
   }
 
diff --git a/packages/flutter/lib/src/services/text_boundary.dart b/packages/flutter/lib/src/services/text_boundary.dart
index 1c94847..cb8259a 100644
--- a/packages/flutter/lib/src/services/text_boundary.dart
+++ b/packages/flutter/lib/src/services/text_boundary.dart
@@ -38,6 +38,18 @@
       end: getTrailingTextBoundaryAt(position).offset,
     );
   }
+
+  /// Gets the boundary by calling the left-hand side and pipe the result to
+  /// right-hand side.
+  ///
+  /// Combining two text boundaries can be useful if one wants to ignore certain
+  /// text before finding the text boundary. For example, use
+  /// [WhitespaceBoundary] + [WordBoundary] to ignores any white space before
+  /// finding word boundary if the input position happens to be a whitespace
+  /// character.
+  TextBoundary operator +(TextBoundary other) {
+    return _ExpandedTextBoundary(inner: other, outer: this);
+  }
 }
 
 /// A text boundary that uses characters as logical boundaries.
@@ -110,7 +122,7 @@
 /// This class uses [UAX #29](https://unicode.org/reports/tr29/) defined word
 /// boundaries to calculate its logical boundaries.
 class WordBoundary extends TextBoundary {
-  /// Creates a [CharacterBoundary] with the text and layout information.
+  /// Creates a [WordBoundary] with the text and layout information.
   const WordBoundary(this._textLayout);
 
   final TextLayoutMetrics _textLayout;
@@ -122,6 +134,7 @@
       affinity: TextAffinity.downstream,  // ignore: avoid_redundant_argument_values
     );
   }
+
   @override
   TextPosition getTrailingTextBoundaryAt(TextPosition position) {
     return TextPosition(
@@ -129,6 +142,11 @@
       affinity: TextAffinity.upstream,
     );
   }
+
+  @override
+  TextRange getTextBoundaryAt(TextPosition position) {
+    return _textLayout.getWordBoundary(position);
+  }
 }
 
 /// A text boundary that uses line breaks as logical boundaries.
@@ -136,7 +154,7 @@
 /// The input [TextPosition]s will be interpreted as caret locations if
 /// [TextLayoutMetrics.getLineAtOffset] is text-affinity-aware.
 class LineBreak extends TextBoundary {
-  /// Creates a [CharacterBoundary] with the text and layout information.
+  /// Creates a [LineBreak] with the text and layout information.
   const LineBreak(this._textLayout);
 
   final TextLayoutMetrics _textLayout;
@@ -155,6 +173,11 @@
       affinity: TextAffinity.upstream,
     );
   }
+
+  @override
+  TextRange getTextBoundaryAt(TextPosition position) {
+    return _textLayout.getLineAtOffset(position);
+  }
 }
 
 /// A text boundary that uses the entire document as logical boundary.
@@ -162,7 +185,7 @@
 /// The document boundary is unique and is a constant function of the input
 /// position.
 class DocumentBoundary extends TextBoundary {
-  /// Creates a [CharacterBoundary] with the text
+  /// Creates a [DocumentBoundary] with the text
   const DocumentBoundary(this._text);
 
   final String _text;
@@ -177,3 +200,149 @@
     );
   }
 }
+
+/// A text boundary that uses the first non-whitespace character as the logical
+/// boundary.
+///
+/// This text boundary uses [TextLayoutMetrics.isWhitespace] to identify white
+/// spaces, this includes newline characters from ASCII and separators from the
+/// [unicode separator category](https://en.wikipedia.org/wiki/Whitespace_character).
+class WhitespaceBoundary extends TextBoundary {
+  /// Creates a [WhitespaceBoundary] with the text.
+  const WhitespaceBoundary(this._text);
+
+  final String _text;
+
+  @override
+  TextPosition getLeadingTextBoundaryAt(TextPosition position) {
+    // Handles outside of string end.
+    if (position.offset > _text.length || (position.offset == _text.length  && position.affinity == TextAffinity.downstream)) {
+      position = TextPosition(offset: _text.length, affinity: TextAffinity.upstream);
+    }
+    // Handles outside of string start.
+    if (position.offset <= 0) {
+      return const TextPosition(offset: 0);
+    }
+    int index = position.offset;
+    if (position.affinity == TextAffinity.downstream && !TextLayoutMetrics.isWhitespace(_text.codeUnitAt(index))) {
+      return position;
+    }
+
+    while ((index -= 1) >= 0) {
+      if (!TextLayoutMetrics.isWhitespace(_text.codeUnitAt(index))) {
+        return TextPosition(offset: index + 1, affinity: TextAffinity.upstream);
+      }
+    }
+    return const TextPosition(offset: 0);
+  }
+
+  @override
+  TextPosition getTrailingTextBoundaryAt(TextPosition position) {
+    // Handles outside of right bound.
+    if (position.offset >= _text.length) {
+      return TextPosition(offset: _text.length, affinity: TextAffinity.upstream);
+    }
+    // Handles outside of left bound.
+    if (position.offset < 0 || (position.offset == 0 && position.affinity == TextAffinity.upstream)) {
+      position = const TextPosition(offset: 0);
+    }
+
+    int index = position.offset;
+    if (position.affinity == TextAffinity.upstream && !TextLayoutMetrics.isWhitespace(_text.codeUnitAt(index - 1))) {
+      return position;
+    }
+
+    for (; index < _text.length; index += 1) {
+      if (!TextLayoutMetrics.isWhitespace(_text.codeUnitAt(index))) {
+        return TextPosition(offset: index);
+      }
+    }
+    return TextPosition(offset: _text.length, affinity: TextAffinity.upstream);
+  }
+}
+
+/// Gets the boundary by calling the [outer] and pipe the result to
+/// [inner].
+class _ExpandedTextBoundary extends TextBoundary {
+  /// Creates a [_ExpandedTextBoundary] with inner and outter boundaries
+  const _ExpandedTextBoundary({required this.inner, required this.outer});
+
+  /// The inner boundary to call with the result from [outer].
+  final TextBoundary inner;
+
+  /// The outer boundary to call with the input position.
+  ///
+  /// The result is piped to the [inner] before returning to the caller.
+  final TextBoundary outer;
+
+  @override
+  TextPosition getLeadingTextBoundaryAt(TextPosition position) {
+    return inner.getLeadingTextBoundaryAt(
+      outer.getLeadingTextBoundaryAt(position),
+    );
+  }
+
+  @override
+  TextPosition getTrailingTextBoundaryAt(TextPosition position) {
+    return inner.getTrailingTextBoundaryAt(
+      outer.getTrailingTextBoundaryAt(position),
+    );
+  }
+}
+
+/// A text boundary that will push input text position forward or backward
+/// one affinity
+///
+/// To push a text position forward one affinity unit, this proxy converts
+/// affinity to downstream if it is upstream; otherwise it increase the offset
+/// by one with its affinity sets to upstream. For example,
+/// `TextPosition(1, upstream)` becomes `TextPosition(1, downstream)`,
+/// `TextPosition(4, downstream)` becomes `TextPosition(5, upstream)`.
+///
+/// See also:
+/// * [PushTextPosition.forward], a text boundary to push the input position
+///   forward.
+/// * [PushTextPosition.backward], a text boundary to push the input position
+///   backward.
+class PushTextPosition extends TextBoundary {
+  const PushTextPosition._(this._forward);
+
+  /// A text boundary that pushes the input position forward.
+  static const TextBoundary forward = PushTextPosition._(true);
+
+  /// A text boundary that pushes the input position backward.
+  static const TextBoundary backward = PushTextPosition._(false);
+
+  /// Whether to push the input position forward or backward.
+  final bool _forward;
+
+  TextPosition _calculateTargetPosition(TextPosition position) {
+    if (_forward) {
+      switch(position.affinity) {
+        case TextAffinity.upstream:
+          return TextPosition(offset: position.offset);
+        case TextAffinity.downstream:
+          return position = TextPosition(
+            offset: position.offset + 1,
+            affinity: TextAffinity.upstream,
+          );
+      }
+    } else {
+      switch(position.affinity) {
+        case TextAffinity.upstream:
+          return position = TextPosition(offset: position.offset - 1);
+        case TextAffinity.downstream:
+          return TextPosition(
+            offset: position.offset,
+            affinity: TextAffinity.upstream,
+          );
+      }
+    }
+  }
+
+  @override
+  TextPosition getLeadingTextBoundaryAt(TextPosition position) => _calculateTargetPosition(position);
+
+  @override
+  TextPosition getTrailingTextBoundaryAt(TextPosition position) => _calculateTargetPosition(position);
+}
diff --git a/packages/flutter/lib/src/widgets/editable_text.dart b/packages/flutter/lib/src/widgets/editable_text.dart
index 9399cf5..1b000e0 100644
--- a/packages/flutter/lib/src/widgets/editable_text.dart
+++ b/packages/flutter/lib/src/widgets/editable_text.dart
@@ -3481,7 +3481,7 @@
 
   TextBoundary _characterBoundary(DirectionalTextEditingIntent intent) {
     final TextBoundary atomicTextBoundary = widget.obscureText ? _CodeUnitBoundary(_value.text) : CharacterBoundary(_value.text);
-    return _PushTextPosition(atomicTextBoundary, intent.forward);
+    return intent.forward ? PushTextPosition.forward + atomicTextBoundary : PushTextPosition.backward + atomicTextBoundary;
   }
 
   TextBoundary _nextWordBoundary(DirectionalTextEditingIntent intent) {
@@ -3495,7 +3495,7 @@
       final TextEditingValue textEditingValue = _textEditingValueforTextLayoutMetrics;
       atomicTextBoundary = CharacterBoundary(textEditingValue.text);
       // This isn't enough. Newline characters.
-      boundary = _ExpandedTextBoundary(_WhitespaceBoundary(textEditingValue.text), WordBoundary(renderEditable));
+      boundary = WhitespaceBoundary(textEditingValue.text) + WordBoundary(renderEditable);
     }
 
     final _MixedBoundary mixedBoundary = intent.forward
@@ -3503,7 +3503,7 @@
       : _MixedBoundary(boundary, atomicTextBoundary);
     // Use a _MixedBoundary to make sure we don't leave invalid codepoints in
     // the field after deletion.
-    return _PushTextPosition(mixedBoundary, intent.forward);
+    return intent.forward ? PushTextPosition.forward + mixedBoundary : PushTextPosition.backward + mixedBoundary;
   }
 
   TextBoundary _linebreak(DirectionalTextEditingIntent intent) {
@@ -3524,9 +3524,10 @@
     // `boundary` doesn't need to be wrapped in a _CollapsedSelectionBoundary,
     // since the document boundary is unique and the linebreak boundary is
     // already caret-location based.
-    return intent.forward
-      ? _MixedBoundary(_PushTextPosition(atomicTextBoundary, true), boundary)
-      : _MixedBoundary(boundary, _PushTextPosition(atomicTextBoundary, false));
+    final TextBoundary pushed = intent.forward
+      ? PushTextPosition.forward + atomicTextBoundary
+      : PushTextPosition.backward + atomicTextBoundary;
+    return intent.forward ? _MixedBoundary(pushed, boundary) : _MixedBoundary(boundary, pushed);
   }
 
   TextBoundary _documentBoundary(DirectionalTextEditingIntent intent) => DocumentBoundary(_value.text);
@@ -4270,149 +4271,14 @@
 
 // ------------------------  Text Boundary Combinators ------------------------
 
-/// A text boundary that use the first non-whitespace character as the logical
-/// boundary.
-///
-/// This text boundary uses [TextLayoutMetrics.isWhitespace] to identify white
-/// spaces, this include newline characters from ASCII and separators from the
-/// [unicode separator category](https://www.compart.com/en/unicode/category/Zs).
-class _WhitespaceBoundary extends TextBoundary {
-  /// Creates a [_WhitespaceBoundary] with the text.
-  const _WhitespaceBoundary(this._text);
-
-  final String _text;
-
-  @override
-  TextPosition getLeadingTextBoundaryAt(TextPosition position) {
-    // Handles outside of right bound.
-    if (position.offset > _text.length || (position.offset == _text.length  && position.affinity == TextAffinity.downstream)) {
-      position = TextPosition(offset: _text.length, affinity: TextAffinity.upstream);
-    }
-    // Handles outside of left bound.
-    if (position.offset <= 0) {
-      return const TextPosition(offset: 0);
-    }
-    int index = position.offset;
-    if (!TextLayoutMetrics.isWhitespace(_text.codeUnitAt(index)) && position.affinity == TextAffinity.downstream) {
-      return position;
-    }
-
-    for (index -= 1; index >= 0; index -= 1) {
-      if (!TextLayoutMetrics.isWhitespace(_text.codeUnitAt(index))) {
-        return TextPosition(offset: index + 1, affinity: TextAffinity.upstream);
-      }
-    }
-    return const TextPosition(offset: 0);
-  }
-
-  @override
-  TextPosition getTrailingTextBoundaryAt(TextPosition position) {
-    // Handles outside of right bound.
-    if (position.offset >= _text.length) {
-      return TextPosition(offset: _text.length, affinity: TextAffinity.upstream);
-    }
-    // Handles outside of left bound.
-    if (position.offset < 0 || (position.offset == 0 && position.affinity == TextAffinity.upstream)) {
-      position = const TextPosition(offset: 0);
-    }
-
-    int index = position.offset;
-    if (!TextLayoutMetrics.isWhitespace(_text.codeUnitAt(index)) && position.affinity == TextAffinity.downstream) {
-      return position;
-    }
-
-    for (index += 1; index < _text.length; index += 1) {
-      if (!TextLayoutMetrics.isWhitespace(_text.codeUnitAt(index))) {
-        return TextPosition(offset: index);
-      }
-    }
-    return TextPosition(offset: _text.length, affinity: TextAffinity.upstream);
-  }
-}
-
-// Expands the innerTextBoundary with outerTextBoundary.
-class _ExpandedTextBoundary extends TextBoundary {
-  _ExpandedTextBoundary(this.innerTextBoundary, this.outerTextBoundary);
-
-  final TextBoundary innerTextBoundary;
-  final TextBoundary outerTextBoundary;
-
-  @override
-  TextPosition getLeadingTextBoundaryAt(TextPosition position) {
-    return outerTextBoundary.getLeadingTextBoundaryAt(
-      innerTextBoundary.getLeadingTextBoundaryAt(position),
-    );
-  }
-
-  @override
-  TextPosition getTrailingTextBoundaryAt(TextPosition position) {
-    return outerTextBoundary.getTrailingTextBoundaryAt(
-      innerTextBoundary.getTrailingTextBoundaryAt(position),
-    );
-  }
-}
-
-/// A proxy text boundary that will push input text position forward or backward
-/// one affinity unit before sending it to the [innerTextBoundary].
-///
-/// If the [isForward] is true, this proxy text boundary push the position
-/// forward; otherwise, backward.
-///
-/// To push a text position forward one affinity unit, this proxy converts
-/// affinity to downstream if it is upstream; otherwise it increase the offset
-/// by one with its affinity sets to upstream. For example,
-/// `TextPosition(1, upstream)` becomes `TextPosition(1, downstream)`,
-/// `TextPosition(4, downstream)` becomes `TextPosition(5, upstream)`.
-///
-/// This class is used to kick-start the text position to find the next boundary
-/// determined by [innerTextBoundary] so that it won't be trapped if the input
-/// text position is right at the edge.
-class _PushTextPosition extends TextBoundary {
-  _PushTextPosition(this.innerTextBoundary, this.isForward);
-
-  final TextBoundary innerTextBoundary;
-  final bool isForward;
-
-  TextPosition _calculateTargetPosition(TextPosition position) {
-    if (isForward) {
-      switch(position.affinity) {
-        case TextAffinity.upstream:
-          return TextPosition(offset: position.offset);
-        case TextAffinity.downstream:
-          return position = TextPosition(
-            offset: position.offset + 1,
-            affinity: TextAffinity.upstream,
-          );
-      }
-    } else {
-      switch(position.affinity) {
-        case TextAffinity.upstream:
-          return position = TextPosition(offset: position.offset - 1);
-        case TextAffinity.downstream:
-          return TextPosition(
-            offset: position.offset,
-            affinity: TextAffinity.upstream,
-          );
-      }
-    }
-  }
-
-  @override
-  TextPosition getLeadingTextBoundaryAt(TextPosition position) {
-    return innerTextBoundary.getLeadingTextBoundaryAt(_calculateTargetPosition(position));
-  }
-
-  @override
-  TextPosition getTrailingTextBoundaryAt(TextPosition position) {
-    return innerTextBoundary.getTrailingTextBoundaryAt(_calculateTargetPosition(position));
-  }
-}
-
 // A _TextBoundary that creates a [TextRange] where its start is from the
 // specified leading text boundary and its end is from the specified trailing
 // text boundary.
 class _MixedBoundary extends TextBoundary {
-  _MixedBoundary(this.leadingTextBoundary, this.trailingTextBoundary);
+  _MixedBoundary(
+    this.leadingTextBoundary,
+    this.trailingTextBoundary
+  );
 
   final TextBoundary leadingTextBoundary;
   final TextBoundary trailingTextBoundary;
diff --git a/packages/flutter/test/material/divider_theme_test.dart b/packages/flutter/test/material/divider_theme_test.dart
index 4d34e28..909c9e4 100644
--- a/packages/flutter/test/material/divider_theme_test.dart
+++ b/packages/flutter/test/material/divider_theme_test.dart
@@ -59,8 +59,9 @@
 
   group('Horizontal Divider', () {
     testWidgets('Passing no DividerThemeData returns defaults', (WidgetTester tester) async {
-      await tester.pumpWidget(const MaterialApp(
-        home: Scaffold(
+      await tester.pumpWidget( MaterialApp(
+        theme: ThemeData(useMaterial3: true),
+        home: const Scaffold(
           body: Divider(),
         ),
       ));
@@ -70,10 +71,10 @@
 
       final Container container = tester.widget(find.byType(Container));
       final BoxDecoration decoration = container.decoration! as BoxDecoration;
-      expect(decoration.border!.bottom.width, 0.0);
+      expect(decoration.border!.bottom.width, 1.0);
 
       final ThemeData theme = ThemeData();
-      expect(decoration.border!.bottom.color, theme.dividerColor);
+      expect(decoration.border!.bottom.color, theme.colorScheme.outlineVariant);
 
       final Rect dividerRect = tester.getRect(find.byType(Divider));
       final Rect lineRect = tester.getRect(find.byType(DecoratedBox));
@@ -142,8 +143,9 @@
 
   group('Vertical Divider', () {
     testWidgets('Passing no DividerThemeData returns defaults', (WidgetTester tester) async {
-      await tester.pumpWidget(const MaterialApp(
-        home: Scaffold(
+      await tester.pumpWidget(MaterialApp(
+        theme: ThemeData(useMaterial3: true),
+        home: const Scaffold(
           body: VerticalDivider(),
         ),
       ));
@@ -154,10 +156,10 @@
       final Container container = tester.widget(find.byType(Container));
       final BoxDecoration decoration = container.decoration! as BoxDecoration;
       final Border border = decoration.border! as Border;
-      expect(border.left.width, 0.0);
+      expect(border.left.width, 1.0);
 
       final ThemeData theme = ThemeData();
-      expect(border.left.color, theme.dividerColor);
+      expect(border.left.color, theme.colorScheme.outlineVariant);
 
       final Rect dividerRect = tester.getRect(find.byType(VerticalDivider));
       final Rect lineRect = tester.getRect(find.byType(DecoratedBox));
@@ -225,6 +227,62 @@
       expect(lineRect.bottom, dividerRect.bottom - endIndent);
     });
   });
+
+  group('Material 2', () {
+    // Tests that are only relevant for Material 2. Once ThemeData.useMaterial3
+    // is turned on by default, these tests can be removed.
+
+    group('Horizontal Divider', () {
+      testWidgets('Passing no DividerThemeData returns defaults', (WidgetTester tester) async {
+        await tester.pumpWidget(const MaterialApp(
+          home: Scaffold(
+            body: Divider(),
+          ),
+        ));
+
+        final RenderBox box = tester.firstRenderObject(find.byType(Divider));
+        expect(box.size.height, 16.0);
+
+        final Container container = tester.widget(find.byType(Container));
+        final BoxDecoration decoration = container.decoration! as BoxDecoration;
+        expect(decoration.border!.bottom.width, 0.0);
+
+        final ThemeData theme = ThemeData();
+        expect(decoration.border!.bottom.color, theme.dividerColor);
+
+        final Rect dividerRect = tester.getRect(find.byType(Divider));
+        final Rect lineRect = tester.getRect(find.byType(DecoratedBox));
+        expect(lineRect.left, dividerRect.left);
+        expect(lineRect.right, dividerRect.right);
+      });
+    });
+
+    group('Vertical Divider', () {
+      testWidgets('Passing no DividerThemeData returns defaults', (WidgetTester tester) async {
+        await tester.pumpWidget(const MaterialApp(
+          home: Scaffold(
+            body: VerticalDivider(),
+          ),
+        ));
+
+        final RenderBox box = tester.firstRenderObject(find.byType(VerticalDivider));
+        expect(box.size.width, 16.0);
+
+        final Container container = tester.widget(find.byType(Container));
+        final BoxDecoration decoration = container.decoration! as BoxDecoration;
+        final Border border = decoration.border! as Border;
+        expect(border.left.width, 0.0);
+
+        final ThemeData theme = ThemeData();
+        expect(border.left.color, theme.dividerColor);
+
+        final Rect dividerRect = tester.getRect(find.byType(VerticalDivider));
+        final Rect lineRect = tester.getRect(find.byType(DecoratedBox));
+        expect(lineRect.top, dividerRect.top);
+        expect(lineRect.bottom, dividerRect.bottom);
+      });
+    });
+  });
 }
 
 DividerThemeData _dividerTheme() {
diff --git a/packages/flutter/test/services/text_boundary_test.dart b/packages/flutter/test/services/text_boundary_test.dart
index 6ec9873..67dbc5a 100644
--- a/packages/flutter/test/services/text_boundary_test.dart
+++ b/packages/flutter/test/services/text_boundary_test.dart
@@ -63,6 +63,72 @@
     expect(boundary.getLeadingTextBoundaryAt(position), const TextPosition(offset: 0));
     expect(boundary.getTrailingTextBoundaryAt(position), const TextPosition(offset: text.length, affinity: TextAffinity.upstream));
   });
+
+  test('white space boundary works', () {
+    const String text = 'abcd    efg';
+    const WhitespaceBoundary boundary = WhitespaceBoundary(text);
+    TextPosition position = const TextPosition(offset: 1);
+    // Should return the same position if the position points to a non white space.
+    expect(boundary.getLeadingTextBoundaryAt(position), position);
+    expect(boundary.getTrailingTextBoundaryAt(position), position);
+
+    position = const TextPosition(offset: 1, affinity: TextAffinity.upstream);
+    expect(boundary.getLeadingTextBoundaryAt(position), position);
+    expect(boundary.getTrailingTextBoundaryAt(position), position);
+
+    position = const TextPosition(offset: 4, affinity: TextAffinity.upstream);
+    expect(boundary.getLeadingTextBoundaryAt(position), position);
+    expect(boundary.getTrailingTextBoundaryAt(position), position);
+
+    // white space
+    position = const TextPosition(offset: 4);
+    expect(boundary.getLeadingTextBoundaryAt(position), const TextPosition(offset: 4, affinity: TextAffinity.upstream));
+    expect(boundary.getTrailingTextBoundaryAt(position), const TextPosition(offset: 8));
+
+    // white space
+    position = const TextPosition(offset: 6);
+    expect(boundary.getLeadingTextBoundaryAt(position), const TextPosition(offset: 4, affinity: TextAffinity.upstream));
+    expect(boundary.getTrailingTextBoundaryAt(position), const TextPosition(offset: 8));
+
+    position = const TextPosition(offset: 8);
+    expect(boundary.getLeadingTextBoundaryAt(position), position);
+    expect(boundary.getTrailingTextBoundaryAt(position), position);
+  });
+
+  test('extended boundary should work', () {
+    const String text = 'abcd    efg';
+    const WhitespaceBoundary outer = WhitespaceBoundary(text);
+    const CharacterBoundary inner = CharacterBoundary(text);
+    final TextBoundary expanded = outer + inner;
+
+    TextPosition position = const TextPosition(offset: 1);
+    expect(expanded.getLeadingTextBoundaryAt(position), position);
+    expect(expanded.getTrailingTextBoundaryAt(position), const TextPosition(offset: 2, affinity: TextAffinity.upstream));
+
+    position = const TextPosition(offset: 5);
+    // should skip white space
+    expect(expanded.getLeadingTextBoundaryAt(position), const TextPosition(offset: 3));
+    expect(expanded.getTrailingTextBoundaryAt(position), const TextPosition(offset: 9, affinity: TextAffinity.upstream));
+  });
+
+  test('push text position works', () {
+    const String text = 'abcd    efg';
+    const CharacterBoundary inner = CharacterBoundary(text);
+    final TextBoundary forward = PushTextPosition.forward + inner;
+    final TextBoundary backward = PushTextPosition.backward + inner;
+
+    TextPosition position = const TextPosition(offset: 1, affinity: TextAffinity.upstream);
+    const TextPosition pushedForward = TextPosition(offset: 1);
+    // the forward should push position one affinity
+    expect(forward.getLeadingTextBoundaryAt(position), inner.getLeadingTextBoundaryAt(pushedForward));
+    expect(forward.getTrailingTextBoundaryAt(position), inner.getTrailingTextBoundaryAt(pushedForward));
+
+    position = const TextPosition(offset: 5);
+    const TextPosition pushedBackward = TextPosition(offset: 5, affinity: TextAffinity.upstream);
+    // should skip white space
+    expect(backward.getLeadingTextBoundaryAt(position), inner.getLeadingTextBoundaryAt(pushedBackward));
+    expect(backward.getTrailingTextBoundaryAt(position), inner.getTrailingTextBoundaryAt(pushedBackward));
+  });
 }
 
 class TestTextLayoutMetrics extends TextLayoutMetrics {
diff --git a/packages/flutter_driver/pubspec.yaml b/packages/flutter_driver/pubspec.yaml
index cd7fd51..802e994 100644
--- a/packages/flutter_driver/pubspec.yaml
+++ b/packages/flutter_driver/pubspec.yaml
@@ -43,8 +43,8 @@
   fake_async: 1.3.1
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   convert: 3.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   coverage: 1.6.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -72,4 +72,4 @@
   webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   yaml: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
 
-# PUBSPEC CHECKSUM: a1fc
+# PUBSPEC CHECKSUM: 10fe
diff --git a/packages/flutter_tools/bin/fuchsia_tester.dart b/packages/flutter_tools/bin/fuchsia_tester.dart
index f6f50b2..d4ca214 100644
--- a/packages/flutter_tools/bin/fuchsia_tester.dart
+++ b/packages/flutter_tools/bin/fuchsia_tester.dart
@@ -82,7 +82,7 @@
       throwToolExit('Cannot find SDK files at ${sdkRootSrc.path}');
     }
     Directory? coverageDirectory;
-    final String coverageDirectoryPath = argResults[_kOptionCoverageDirectory] as String;
+    final String? coverageDirectoryPath = argResults[_kOptionCoverageDirectory] as String?;
     if (coverageDirectoryPath != null) {
       if (!globals.fs.isDirectorySync(coverageDirectoryPath)) {
         throwToolExit('Cannot find coverage directory at $coverageDirectoryPath');
@@ -109,7 +109,7 @@
 
     Directory? testDirectory;
     CoverageCollector? collector;
-    if (argResults['coverage'] as bool) {
+    if (argResults['coverage'] as bool? ?? false) {
       // If we have a specified coverage directory then accept all libraries by
       // setting libraryNames to null.
       final Set<String>? libraryNames = coverageDirectory != null ? null :
@@ -164,7 +164,7 @@
       } else {
         globals.fs.currentDirectory = testDirectory;
       }
-      if (!await collector.collectCoverageData(argResults[_kOptionCoveragePath] as String, coverageDirectory: coverageDirectory)) {
+      if (!await collector.collectCoverageData(argResults[_kOptionCoveragePath] as String?, coverageDirectory: coverageDirectory)) {
         throwToolExit('Failed to collect coverage data');
       }
     }
diff --git a/packages/flutter_tools/lib/src/build_info.dart b/packages/flutter_tools/lib/src/build_info.dart
index 6f7a2ab..7fcfe44 100644
--- a/packages/flutter_tools/lib/src/build_info.dart
+++ b/packages/flutter_tools/lib/src/build_info.dart
@@ -37,6 +37,7 @@
     List<String>? dartExperiments,
     required this.treeShakeIcons,
     this.performanceMeasurementFile,
+    this.dartDefineConfigJsonMap,
     this.packagesPath = '.dart_tool/package_config.json', // TODO(zanderso): make this required and remove the default.
     this.nullSafetyMode = NullSafetyMode.sound,
     this.codeSizeDirectory,
@@ -130,6 +131,17 @@
   /// rerun tasks.
   final String? performanceMeasurementFile;
 
+  /// Configure a constant pool file.
+  /// Additional constant values to be made available in the Dart program.
+  ///
+  /// These values can be used with the const `fromEnvironment` constructors of
+  ///  [String] the key and field are json values
+  /// json value
+  ///
+  /// An additional field `dartDefineConfigJsonMap` is provided to represent the native JSON value of the configuration file
+  ///
+  final Map<String, Object>? dartDefineConfigJsonMap;
+
   /// If provided, an output directory where one or more v8-style heap snapshots
   /// will be written for code size profiling.
   final String? codeSizeDirectory;
@@ -247,12 +259,17 @@
     };
   }
 
+
   /// Convert to a structured string encoded structure appropriate for usage as
   /// environment variables or to embed in other scripts.
   ///
   /// Fields that are `null` are excluded from this configuration.
   Map<String, String> toEnvironmentConfig() {
-    return <String, String>{
+    final Map<String, String> map = <String, String>{};
+    dartDefineConfigJsonMap?.forEach((String key, Object value) {
+      map[key] = '$value';
+    });
+    final Map<String, String> environmentMap = <String, String>{
       if (dartDefines.isNotEmpty)
         'DART_DEFINES': encodeDartDefines(dartDefines),
       if (dartObfuscation != null)
@@ -276,13 +293,23 @@
       if (codeSizeDirectory != null)
         'CODE_SIZE_DIRECTORY': codeSizeDirectory!,
     };
+    map.forEach((String key, String value) {
+      if (environmentMap.containsKey(key)) {
+        globals.printWarning(
+            'The key: [$key] already exists, you cannot use environment variables that have been used by the system!');
+      } else {
+        // System priority is greater than user priority
+        environmentMap[key] = value;
+      }
+    });
+    return environmentMap;
   }
 
   /// Convert this config to a series of project level arguments to be passed
   /// on the command line to gradle.
   List<String> toGradleConfig() {
     // PACKAGE_CONFIG not currently supported.
-    return <String>[
+    final List<String> result = <String>[
       if (dartDefines.isNotEmpty)
         '-Pdart-defines=${encodeDartDefines(dartDefines)}',
       if (dartObfuscation != null)
@@ -306,6 +333,20 @@
       for (String projectArg in androidProjectArgs)
         '-P$projectArg',
     ];
+    if(dartDefineConfigJsonMap != null) {
+      final List<String> items = <String>[];
+      for (final String gradleConf in result) {
+        final String key = gradleConf.split('=')[0].substring(2);
+        if (dartDefineConfigJsonMap!.containsKey(key)) {
+          globals.printWarning(
+              'The key: [$key] already exists, you cannot use gradle variables that have been used by the system!');
+        } else {
+          items.add('-P$key=${dartDefineConfigJsonMap?[key]}');
+        }
+      }
+      result.addAll(items);
+    }
+    return result;
   }
 }
 
diff --git a/packages/flutter_tools/lib/src/commands/assemble.dart b/packages/flutter_tools/lib/src/commands/assemble.dart
index 081c381..41c3054 100644
--- a/packages/flutter_tools/lib/src/commands/assemble.dart
+++ b/packages/flutter_tools/lib/src/commands/assemble.dart
@@ -263,9 +263,29 @@
     if (argumentResults.wasParsed(FlutterOptions.kExtraGenSnapshotOptions)) {
       results[kExtraGenSnapshotOptions] = (argumentResults[FlutterOptions.kExtraGenSnapshotOptions] as List<String>).join(',');
     }
+
+    List<String> dartDefines = <String>[];
     if (argumentResults.wasParsed(FlutterOptions.kDartDefinesOption)) {
-      results[kDartDefines] = (argumentResults[FlutterOptions.kDartDefinesOption] as List<String>).join(',');
+      dartDefines = argumentResults[FlutterOptions.kDartDefinesOption] as List<String>;
     }
+    if (argumentResults.wasParsed(FlutterOptions.kDartDefineFromFileOption)) {
+      final String? configJsonPath = stringArg(FlutterOptions.kDartDefineFromFileOption);
+      if (configJsonPath != null && globals.fs.isFileSync(configJsonPath)) {
+        final String configJsonRaw = globals.fs.file(configJsonPath).readAsStringSync();
+        try {
+          (json.decode(configJsonRaw) as Map<String, dynamic>).forEach((String key, dynamic value) {
+            dartDefines.add('$key=$value');
+          });
+        } on FormatException catch (err) {
+          throwToolExit('Json config define file "--${FlutterOptions.kDartDefineFromFileOption}=$configJsonPath" format err, '
+              'please fix first! format err:\n$err');
+        }
+      }
+    }
+    if(dartDefines.isNotEmpty){
+      results[kDartDefines] = dartDefines.join(',');
+    }
+
     results[kDeferredComponents] = 'false';
     if (FlutterProject.current().manifest.deferredComponents != null && isDeferredComponentsTargets() && !isDebug()) {
       results[kDeferredComponents] = 'true';
diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart
index b6c628b..a150911 100644
--- a/packages/flutter_tools/lib/src/runner/flutter_command.dart
+++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart
@@ -19,6 +19,7 @@
 import '../build_system/build_system.dart';
 import '../bundle.dart' as bundle;
 import '../cache.dart';
+import '../convert.dart';
 import '../dart/generate_synthetic_packages.dart';
 import '../dart/language_version.dart';
 import '../dart/package_map.dart';
@@ -104,6 +105,7 @@
   static const String kSplitDebugInfoOption = 'split-debug-info';
   static const String kDartObfuscationOption = 'obfuscate';
   static const String kDartDefinesOption = 'dart-define';
+  static const String kDartDefineFromFileOption = 'dart-define-from-file';
   static const String kBundleSkSLPathOption = 'bundle-sksl-path';
   static const String kPerformanceMeasurementFile = 'performance-measurement-file';
   static const String kNullSafety = 'sound-null-safety';
@@ -591,6 +593,17 @@
       valueHelp: 'foo=bar',
       splitCommas: false,
     );
+    useDartDefineConfigJsonFileOption();
+  }
+
+  void useDartDefineConfigJsonFileOption() {
+    argParser.addOption(
+      FlutterOptions.kDartDefineFromFileOption,
+      help: 'The path of a json format file where flutter define a global constant pool. '
+          'Json entry will be available as constants from the String.fromEnvironment, bool.fromEnvironment, '
+          'int.fromEnvironment, and double.fromEnvironment constructors; the key and field are json values.',
+      valueHelp: 'use-define-config.json'
+    );
   }
 
   void usesWebRendererOption() {
@@ -1122,6 +1135,27 @@
       dartDefines = updateDartDefines(dartDefines, stringArgDeprecated('web-renderer')!);
     }
 
+    Map<String, Object>? defineConfigJsonMap;
+    if (argParser.options.containsKey(FlutterOptions.kDartDefineFromFileOption)) {
+      final String? configJsonPath = stringArg(FlutterOptions.kDartDefineFromFileOption);
+      if (configJsonPath != null && globals.fs.isFileSync(configJsonPath)) {
+        final String configJsonRaw = globals.fs.file(configJsonPath).readAsStringSync();
+        try {
+          defineConfigJsonMap = <String, Object>{};
+          // Fix json convert Object value :type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'Map<String, Object>' in type cast
+          (json.decode(configJsonRaw) as Map<String, dynamic>).forEach((String key, dynamic value) {
+            defineConfigJsonMap?[key]=value as Object;
+          });
+          defineConfigJsonMap.forEach((String key, Object value) {
+            dartDefines.add('$key=$value');
+          });
+        } on FormatException catch (err) {
+          throwToolExit('Json config define file "--${FlutterOptions.kDartDefineFromFileOption}=$configJsonPath" format err, '
+              'please fix first! format err:\n$err');
+        }
+      }
+    }
+
     return BuildInfo(buildMode,
       argParser.options.containsKey('flavor')
         ? stringArgDeprecated('flavor')
@@ -1146,6 +1180,7 @@
       bundleSkSLPath: bundleSkSLPath,
       dartExperiments: experiments,
       performanceMeasurementFile: performanceMeasurementFile,
+      dartDefineConfigJsonMap: defineConfigJsonMap,
       packagesPath: packagesPath ?? globals.fs.path.absolute('.dart_tool', 'package_config.json'),
       nullSafetyMode: nullSafetyMode,
       codeSizeDirectory: codeSizeDirectory,
diff --git a/packages/flutter_tools/pubspec.yaml b/packages/flutter_tools/pubspec.yaml
index aa56e98..f8f4bbd 100644
--- a/packages/flutter_tools/pubspec.yaml
+++ b/packages/flutter_tools/pubspec.yaml
@@ -10,7 +10,7 @@
   archive: 3.3.1
   args: 2.3.1
   browser_launcher: 1.1.1
-  dds: 2.3.1
+  dds: 2.4.0
   dwds: 16.0.0
   completion: 1.0.0
   coverage: 1.6.1
@@ -57,8 +57,8 @@
 
   vm_service: 9.4.0
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   built_collection: 5.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   built_value: 8.4.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -103,4 +103,4 @@
   # Exclude this package from the hosted API docs.
   nodoc: true
 
-# PUBSPEC CHECKSUM: d07f
+# PUBSPEC CHECKSUM: ae81
diff --git a/packages/flutter_tools/test/commands.shard/hermetic/assemble_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/assemble_test.dart
index 072015a..0137d7f 100644
--- a/packages/flutter_tools/test/commands.shard/hermetic/assemble_test.dart
+++ b/packages/flutter_tools/test/commands.shard/hermetic/assemble_test.dart
@@ -290,4 +290,33 @@
       ],
     });
   });
+
+  testUsingContext('test --dart-define-from-file option with err json format', () async {
+    await globals.fs.file('config.json').writeAsString(
+        '''
+          {
+            "kInt": 1,
+            "kDouble": 1.1,
+            "name": "err json format,
+            "title": "this is title from config json file"
+          }
+        '''
+    );
+    final CommandRunner<void> commandRunner = createTestCommandRunner(AssembleCommand(
+      buildSystem: TestBuildSystem.all(BuildResult(success: true)),
+    ));
+
+    expect(commandRunner.run(<String>['assemble',
+      '-o Output',
+      'debug_macos_bundle_flutter_assets',
+      '--dart-define=k=v',
+      '--dart-define-from-file=config.json']),
+        throwsToolExit(message: 'Json config define file "--dart-define-from-file=config.json" format err, please fix first! format err:'));
+  }, overrides: <Type, Generator>{
+    Cache: () => Cache.test(processManager: FakeProcessManager.any()),
+    FileSystem: () => MemoryFileSystem.test(),
+    ProcessManager: () => FakeProcessManager.any(),
+  });
+
+
 }
diff --git a/packages/flutter_tools/test/commands.shard/permeable/build_bundle_test.dart b/packages/flutter_tools/test/commands.shard/permeable/build_bundle_test.dart
index 772afcc..ce01bf1 100644
--- a/packages/flutter_tools/test/commands.shard/permeable/build_bundle_test.dart
+++ b/packages/flutter_tools/test/commands.shard/permeable/build_bundle_test.dart
@@ -4,6 +4,7 @@
 
 import 'package:args/command_runner.dart';
 import 'package:file/memory.dart';
+import 'package:flutter_tools/src/base/common.dart';
 import 'package:flutter_tools/src/base/file_system.dart';
 import 'package:flutter_tools/src/build_info.dart';
 import 'package:flutter_tools/src/build_system/build_system.dart';
@@ -463,6 +464,64 @@
     FileSystem: fsFactory,
     ProcessManager: () => FakeProcessManager.any(),
   });
+
+  testUsingContext('test --dart-define-from-file option', () async {
+    globals.fs.file(globals.fs.path.join('lib', 'main.dart')).createSync(recursive: true);
+    globals.fs.file('pubspec.yaml').createSync();
+    globals.fs.file('.packages').createSync();
+    await globals.fs.file('config.json').writeAsString(
+      '''
+        {
+          "kInt": 1,
+          "kDouble": 1.1,
+          "name": "denghaizhu",
+          "title": "this is title from config json file"
+        }
+      '''
+    );
+    final CommandRunner<void> runner = createTestCommandRunner(BuildBundleCommand());
+
+    await runner.run(<String>[
+      'bundle',
+      '--no-pub',
+      '--dart-define-from-file=config.json',
+    ]);
+  }, overrides: <Type, Generator>{
+    BuildSystem: () => TestBuildSystem.all(BuildResult(success: true), (Target target, Environment environment) {
+      expect(environment.defines[kDartDefines], 'a0ludD0x,a0RvdWJsZT0xLjE=,bmFtZT1kZW5naGFpemh1,dGl0bGU9dGhpcyBpcyB0aXRsZSBmcm9tIGNvbmZpZyBqc29uIGZpbGU=');
+    }),
+    FileSystem: fsFactory,
+    ProcessManager: () => FakeProcessManager.any(),
+  });
+
+
+  testUsingContext('test --dart-define-from-file option by corrupted json', () async {
+    globals.fs.file(globals.fs.path.join('lib', 'main.dart')).createSync(recursive: true);
+    globals.fs.file('pubspec.yaml').createSync();
+    globals.fs.file('.packages').createSync();
+    await globals.fs.file('config.json').writeAsString(
+        '''
+        {
+          "kInt": 1Error json format
+          "kDouble": 1.1,
+          "name": "denghaizhu",
+          "title": "this is title from config json file"
+        }
+      '''
+    );
+    final CommandRunner<void> runner = createTestCommandRunner(BuildBundleCommand());
+
+    expect(() => runner.run(<String>[
+      'bundle',
+      '--no-pub',
+      '--dart-define-from-file=config.json',
+    ]), throwsA(predicate<Exception>((Exception e) => e is ToolExit && e.message!.startsWith('Json config define file "--dart-define-from-file=config.json" format err'))));
+  }, overrides: <Type, Generator>{
+    FileSystem: fsFactory,
+    BuildSystem: () => TestBuildSystem.all(BuildResult(success: true)),
+    ProcessManager: () => FakeProcessManager.any(),
+  });
+
 }
 
 class FakeBundleBuilder extends Fake implements BundleBuilder {
diff --git a/packages/flutter_tools/test/general.shard/build_info_test.dart b/packages/flutter_tools/test/general.shard/build_info_test.dart
index e628b7b..0b59be0 100644
--- a/packages/flutter_tools/test/general.shard/build_info_test.dart
+++ b/packages/flutter_tools/test/general.shard/build_info_test.dart
@@ -7,6 +7,7 @@
 import 'package:flutter_tools/src/build_info.dart';
 
 import '../src/common.dart';
+import '../src/context.dart';
 
 void main() {
   late BufferLogger logger;
@@ -279,4 +280,70 @@
       kDartDefines: 'MTIzMiw0NTY=,Mg==',
     }, kDartDefines), <String>['1232,456', '2']);
   });
+
+  group('Check repeated buildInfo variables', () {
+    testUsingContext('toEnvironmentConfig repeated variable', () async {
+      const BuildInfo buildInfo = BuildInfo(BuildMode.debug, '',
+          treeShakeIcons: true,
+          trackWidgetCreation: true,
+          dartDefines: <String>['foo=2', 'bar=2'],
+          dartDefineConfigJsonMap: <String,Object>{ 'DART_DEFINES' : 'Define a variable, but it occupies the variable name of the system'},
+          dartObfuscation: true,
+      );
+      buildInfo.toEnvironmentConfig();
+      expect(testLogger.warningText, contains('The key: [DART_DEFINES] already exists, you cannot use environment variables that have been used by the system'));
+    });
+
+    testUsingContext('toEnvironmentConfig repeated variable with DART_DEFINES not set', () async {
+      // Simulate operation flutterCommand.getBuildInfo  with `dart-define-from-file` set dartDefines
+      const BuildInfo buildInfo = BuildInfo(BuildMode.debug, '',
+          treeShakeIcons: true,
+          dartDefines: <String>['DART_DEFINES=Define a variable, but it occupies the variable name of the system'],
+          trackWidgetCreation: true,
+          dartDefineConfigJsonMap: <String, Object>{ 'DART_DEFINES' : 'Define a variable, but it occupies the variable name of the system'},
+          dartObfuscation: true,
+      );
+      buildInfo.toEnvironmentConfig();
+      expect(testLogger.warningText, contains('The key: [DART_DEFINES] already exists, you cannot use environment variables that have been used by the system'));
+
+    });
+
+    testUsingContext('toGradleConfig repeated variable', () async {
+      const BuildInfo buildInfo = BuildInfo(BuildMode.debug, '',
+          treeShakeIcons: true,
+          trackWidgetCreation: true,
+          dartDefines: <String>['foo=2', 'bar=2'],
+          dartDefineConfigJsonMap: <String,Object>{ 'dart-defines' : 'Define a variable, but it occupies the variable name of the system'},
+          dartObfuscation: true,
+      );
+      buildInfo.toGradleConfig();
+      expect(testLogger.warningText, contains('he key: [dart-defines] already exists, you cannot use gradle variables that have been used by the system'));
+    });
+
+    testUsingContext('toGradleConfig repeated variable with not set', () async {
+      // Simulate operation flutterCommand.getBuildInfo  with `dart-define-from-file` set dartDefines
+      const BuildInfo buildInfo = BuildInfo(BuildMode.debug, '',
+          treeShakeIcons: true,
+          trackWidgetCreation: true,
+          dartDefines: <String>['dart-defines=Define a variable, but it occupies the variable name of the system'],
+          dartDefineConfigJsonMap: <String,Object>{ 'dart-defines' : 'Define a variable, but it occupies the variable name of the system'},
+          dartObfuscation: true,
+      );
+      buildInfo.toGradleConfig();
+      expect(testLogger.warningText, contains('he key: [dart-defines] already exists, you cannot use gradle variables that have been used by the system'));
+    });
+
+    testUsingContext('toGradleConfig with androidProjectArgs override gradle project variant', () async {
+      const BuildInfo buildInfo = BuildInfo(BuildMode.debug, '',
+          treeShakeIcons: true,
+          trackWidgetCreation: true,
+          androidProjectArgs: <String>['applicationId=com.google'],
+          dartDefineConfigJsonMap: <String,Object>{ 'applicationId' : 'override applicationId'},
+          dartObfuscation: true,
+      );
+      buildInfo.toGradleConfig();
+      expect(testLogger.warningText, contains('The key: [applicationId] already exists, you cannot use gradle variables that have been used'));
+    });
+
+  });
 }
diff --git a/packages/fuchsia_remote_debug_protocol/pubspec.yaml b/packages/fuchsia_remote_debug_protocol/pubspec.yaml
index 9e64b2b..6ee53e0 100644
--- a/packages/fuchsia_remote_debug_protocol/pubspec.yaml
+++ b/packages/fuchsia_remote_debug_protocol/pubspec.yaml
@@ -18,8 +18,8 @@
 dev_dependencies:
   test: 1.21.6
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -63,4 +63,4 @@
   # Exclude this package from the hosted API docs.
   nodoc: true
 
-# PUBSPEC CHECKSUM: 9b10
+# PUBSPEC CHECKSUM: d312
diff --git a/packages/integration_test/example/pubspec.yaml b/packages/integration_test/example/pubspec.yaml
index bfac08e..e621d4d 100644
--- a/packages/integration_test/example/pubspec.yaml
+++ b/packages/integration_test/example/pubspec.yaml
@@ -33,8 +33,8 @@
 # For information on the generic Dart part of this file, see the
 # following page: https://dart.dev/tools/pub/pubspec
 
-  _fe_analyzer_shared: 48.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
-  analyzer: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  _fe_analyzer_shared: 49.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
+  analyzer: 5.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   archive: 3.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   args: 2.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
   async: 2.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -84,4 +84,4 @@
 flutter:
   uses-material-design: true
 
-# PUBSPEC CHECKSUM: c364
+# PUBSPEC CHECKSUM: 5666