diff --git a/.ci.yaml b/.ci.yaml index 59e79f4d52d8d..fcf4b37a462ae 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -1294,6 +1294,7 @@ targets: - name: Linux web_long_running_tests_2_5 recipe: flutter/flutter_drone + bringup: true timeout: 60 properties: dependencies: >- @@ -3233,6 +3234,28 @@ targets: ["devicelab", "ios", "mac"] task_name: animated_advanced_blend_perf_ios__timeline_summary + # Uses Impeller. + - name: Linux_pixel_7pro rrect_blur_perf__timeline_summary + recipe: devicelab/devicelab_drone + presubmit: false + bringup: true + timeout: 60 + properties: + ignore_flakiness: "true" + tags: > + ["devicelab", "android", "linux", "pixel", "7pro"] + task_name: rrect_blur_perf__timeline_summary + + - name: Mac_ios rrect_blur_perf_ios__timeline_summary + recipe: devicelab/devicelab_drone + presubmit: false + bringup: true + timeout: 60 + properties: + tags: > + ["devicelab", "ios", "mac"] + task_name: rrect_blur_perf_ios__timeline_summary + # Uses Impeller. - name: Linux_pixel_7pro animated_blur_backdrop_filter_perf_opengles__timeline_summary recipe: devicelab/devicelab_drone @@ -5455,6 +5478,7 @@ targets: - .ci.yaml - name: Windows plugin_test + bringup: true # Flaky https://github.com/flutter/flutter/issues/148834 recipe: devicelab/devicelab_drone timeout: 60 properties: diff --git a/.github/ISSUE_TEMPLATE/9_first_party_packages.yml b/.github/ISSUE_TEMPLATE/9_first_party_packages.yml index 71eebc4879afa..efa90f4d4a0d0 100644 --- a/.github/ISSUE_TEMPLATE/9_first_party_packages.yml +++ b/.github/ISSUE_TEMPLATE/9_first_party_packages.yml @@ -32,7 +32,6 @@ body: - camera - cross_file - css_colors - - dynamic_layouts - espresso - extension_google_sign_in_as_googleapis_auth - file_selector diff --git a/.github/labeler.yml b/.github/labeler.yml index 048292c47ea43..7dad0e50e20c9 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -118,6 +118,7 @@ framework: - packages/flutter_test/**/* - packages/integration_test/**/* - examples/api/**/* + - docs/about/**/* - docs/contributing/**/* - docs/libraries/**/* @@ -161,6 +162,8 @@ platform-web: team: - changed-files: - any-glob-to-any-file: + - docs/about/**/* + - docs/contributing/**/* - docs/postmortems/**/* team-android: @@ -188,8 +191,19 @@ team-release: - any-glob-to-any-file: - docs/releases/**/* +team-tool: + - changed-files: + - any-glob-to-any-file: + - docs/tool/**/* + +team-web: + - changed-files: + - any-glob-to-any-file: + - docs/platforms/web/**/* + tool: - changed-files: - any-glob-to-any-file: - packages/flutter_tools/**/* - packages/fuchsia_remote_debug_protocol/**/* + - docs/tool/**/* diff --git a/TESTOWNERS b/TESTOWNERS index cca4907add24c..bc6b20234d284 100644 --- a/TESTOWNERS +++ b/TESTOWNERS @@ -106,6 +106,7 @@ /dev/devicelab/bin/tasks/dynamic_path_tessellation_perf__timeline_summary.dart @jonahwilliams @flutter/engine /dev/devicelab/bin/tasks/complex_layout_scroll_perf_impeller__timeline_summary.dart @jonahwilliams @flutter/engine /dev/devicelab/bin/tasks/complex_layout_scroll_perf_impeller_gles__timeline_summary.dart @jonahwilliams @flutter/engine +/dev/devicelab/bin/tasks/rrect_blur_perf__timeline_summary.dart @gaaclarke @flutter/engine ## Windows Android DeviceLab tests /dev/devicelab/bin/tasks/basic_material_app_win__compile.dart @zanderso @flutter/tool @@ -223,6 +224,7 @@ /dev/devicelab/bin/tasks/draw_atlas_perf_ios__timeline_summary.dart @jonahwilliams @flutter/engine /dev/devicelab/bin/tasks/static_path_tessellation_perf_ios__timeline_summary.dart @jonahwilliams @flutter/engine /dev/devicelab/bin/tasks/dynamic_path_tessellation_perf_ios__timeline_summary.dart @jonahwilliams @flutter/engine +/dev/devicelab/bin/tasks/rrect_blur_perf_ios__timeline_summary.dart @gaaclarke @flutter/engine ## Host only DeviceLab tests /dev/devicelab/bin/tasks/animated_complex_opacity_perf_macos__e2e_summary.dart @cbracken @flutter/desktop diff --git a/bin/internal/engine.version b/bin/internal/engine.version index 7aea33d0d17b8..083a3b12a9740 100644 --- a/bin/internal/engine.version +++ b/bin/internal/engine.version @@ -1 +1 @@ -c89defa558013d7790ab0fec0819c30fccae3aba +19707e811b608b2ecf8633f26d534f7896b87c52 diff --git a/bin/internal/flutter_packages.version b/bin/internal/flutter_packages.version index 6cb6f56d69cd0..4f336df723215 100644 --- a/bin/internal/flutter_packages.version +++ b/bin/internal/flutter_packages.version @@ -1 +1 @@ -ba19b247d0bad15feed2ae31248b52ec0cf19785 +31d332900d98b05ac15096ace0bb7a76a8fb759d diff --git a/bin/internal/fuchsia-linux.version b/bin/internal/fuchsia-linux.version index 79cfaaf8a68df..f41dc174f107e 100644 --- a/bin/internal/fuchsia-linux.version +++ b/bin/internal/fuchsia-linux.version @@ -1 +1 @@ -HHwlAJN5imwf3yX4i6DhvMFhgYzp7YIXIsEYuvsx9JEC +c-Sm5-fy8c2YM7MykeRPbSf7GYgDkXFnDcNG89XheMkC diff --git a/dev/a11y_assessments/lib/main.dart b/dev/a11y_assessments/lib/main.dart index 9440792226902..2c01504a97624 100644 --- a/dev/a11y_assessments/lib/main.dart +++ b/dev/a11y_assessments/lib/main.dart @@ -26,10 +26,8 @@ class App extends StatelessWidget { ); return MaterialApp( title: 'Accessibility Assessments', - theme: ThemeData( - colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), - useMaterial3: true, - ), + theme: ThemeData.light(), + darkTheme: ThemeData.dark(), routes: { '/': (_) => const HomePage(), ...routes diff --git a/dev/a11y_assessments/pubspec.yaml b/dev/a11y_assessments/pubspec.yaml index da0910106479e..1ce148d6787f0 100644 --- a/dev/a11y_assessments/pubspec.yaml +++ b/dev/a11y_assessments/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -38,4 +38,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 8b62 +# PUBSPEC CHECKSUM: cf63 diff --git a/dev/a11y_assessments/test/home_page_test.dart b/dev/a11y_assessments/test/home_page_test.dart new file mode 100644 index 0000000000000..636b72b379888 --- /dev/null +++ b/dev/a11y_assessments/test/home_page_test.dart @@ -0,0 +1,17 @@ +// 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:a11y_assessments/main.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + + +void main() { + testWidgets('Has light and dark theme', (WidgetTester tester) async { + await tester.pumpWidget(const App()); + final MaterialApp app = find.byType(MaterialApp).evaluate().first.widget as MaterialApp; + expect(app.theme!.brightness, equals(Brightness.light)); + expect(app.darkTheme!.brightness, equals(Brightness.dark)); + }); +} diff --git a/dev/automated_tests/pubspec.yaml b/dev/automated_tests/pubspec.yaml index b59a378b0e15c..63c976e191247 100644 --- a/dev/automated_tests/pubspec.yaml +++ b/dev/automated_tests/pubspec.yaml @@ -15,8 +15,8 @@ dependencies: platform: 3.1.4 test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -40,7 +40,7 @@ dependencies: logging: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 1.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" node_preamble: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" package_config: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -75,4 +75,4 @@ flutter: assets: - icon/test.png -# PUBSPEC CHECKSUM: 461c +# PUBSPEC CHECKSUM: ba1f diff --git a/dev/benchmarks/complex_layout/pubspec.yaml b/dev/benchmarks/complex_layout/pubspec.yaml index afb07b20d7c6c..a8a6d0d5b5097 100644 --- a/dev/benchmarks/complex_layout/pubspec.yaml +++ b/dev/benchmarks/complex_layout/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: file: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -43,8 +43,8 @@ dev_dependencies: integration_test: sdk: flutter - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -86,4 +86,4 @@ flutter: - packages/flutter_gallery_assets/people/square/ali.png - packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png -# PUBSPEC CHECKSUM: 99f4 +# PUBSPEC CHECKSUM: 94f7 diff --git a/dev/benchmarks/macrobenchmarks/lib/common.dart b/dev/benchmarks/macrobenchmarks/lib/common.dart index 0b4b380799063..643ab264b2e21 100644 --- a/dev/benchmarks/macrobenchmarks/lib/common.dart +++ b/dev/benchmarks/macrobenchmarks/lib/common.dart @@ -41,6 +41,7 @@ const String kDrawPointsPageRougeName = '/draw_points'; const String kDrawVerticesPageRouteName = '/draw_vertices'; const String kDrawAtlasPageRouteName = '/draw_atlas'; const String kAnimatedAdvancedBlend = '/animated_advanced_blend'; +const String kRRectBlurRouteName = '/rrect_blur'; const String kOpacityPeepholeOneRectRouteName = '$kOpacityPeepholeRouteName/one_big_rect'; const String kOpacityPeepholeColumnOfOpacityRouteName = '$kOpacityPeepholeRouteName/column_of_opacity'; diff --git a/dev/benchmarks/macrobenchmarks/lib/main.dart b/dev/benchmarks/macrobenchmarks/lib/main.dart index 23ec7817c4f48..6d97d592fa8e0 100644 --- a/dev/benchmarks/macrobenchmarks/lib/main.dart +++ b/dev/benchmarks/macrobenchmarks/lib/main.dart @@ -36,6 +36,7 @@ import 'src/picture_cache.dart'; import 'src/picture_cache_complexity_scoring.dart'; import 'src/post_backdrop_filter.dart'; import 'src/raster_cache_use_memory.dart'; +import 'src/rrect_blur.dart' show RRectBlur; import 'src/shader_mask_cache.dart'; import 'src/simple_animation.dart'; import 'src/simple_scroll.dart'; @@ -98,6 +99,7 @@ class MacrobenchmarksApp extends StatelessWidget { kDrawVerticesPageRouteName: (BuildContext context) => const DrawVerticesPage(), kDrawAtlasPageRouteName: (BuildContext context) => const DrawAtlasPage(), kAnimatedAdvancedBlend: (BuildContext context) => const AnimatedAdvancedBlend(), + kRRectBlurRouteName: (BuildContext context) => const RRectBlur(), kVeryLongPictureScrollingRouteName: (BuildContext context) => const VeryLongPictureScrollingPerf(), }, ); @@ -375,6 +377,13 @@ class HomePage extends StatelessWidget { Navigator.pushNamed(context, kAnimatedAdvancedBlend); }, ), + ElevatedButton( + key: const Key(kRRectBlurRouteName), + child: const Text('Rounded Rect Blur'), + onPressed: () { + Navigator.pushNamed(context, kRRectBlurRouteName); + }, + ), ElevatedButton( key: const Key(kVeryLongPictureScrollingRouteName), child: const Text('Very Long Picture Scrolling'), diff --git a/dev/benchmarks/macrobenchmarks/lib/src/rrect_blur.dart b/dev/benchmarks/macrobenchmarks/lib/src/rrect_blur.dart new file mode 100644 index 0000000000000..dba0474afc1d0 --- /dev/null +++ b/dev/benchmarks/macrobenchmarks/lib/src/rrect_blur.dart @@ -0,0 +1,99 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:math' show cos, sin; +import 'dart:typed_data'; + +import 'package:flutter/material.dart'; + +class RRectBlur extends StatefulWidget { + const RRectBlur({super.key}); + + @override + State createState() => _DrawPointsPageState(); +} + +class _DrawPointsPageState extends State + with SingleTickerProviderStateMixin { + late final AnimationController controller; + double tick = 0.0; + + @override + void initState() { + super.initState(); + controller = + AnimationController(vsync: this, duration: const Duration(hours: 1)); + controller.addListener(() { + setState(() { + tick += 1; + }); + }); + controller.forward(from: 0); + } + + @override + void dispose() { + controller.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return CustomPaint( + size: const Size(500, 500), + painter: PointsPainter(tick), + child: Container(), + ); + } +} + +class PointsPainter extends CustomPainter { + PointsPainter(this.tick); + + final double tick; + + final Float32List data = Float32List(8000); + + static const List kColors = [ + Colors.red, + Colors.blue, + Colors.green, + Colors.yellow, + Colors.orange, + Colors.purple, + Colors.pink, + Colors.deepPurple, + ]; + + @override + void paint(Canvas canvas, Size size) { + if (size.width == 0) { + return; + } + final double halfHeight = size.height / 2.0; + const double freq = 0.25; + for (int i = 0; i < size.width / 10; ++i) { + final double radius = + 25 * cos(i + (1.0 * 2.0 * 3.1415 * tick) / 60.0) + + 25; + final Paint paint = Paint() + ..style = PaintingStyle.fill + ..filterQuality = FilterQuality.low + ..maskFilter = MaskFilter.blur(BlurStyle.normal, radius); + final double yval = + halfHeight * sin(i + (freq * 2.0 * 3.1415 * tick) / 60.0) + + halfHeight; + canvas.drawCircle( + Offset(10.0 * i, yval), + 50, + paint..color = kColors[i % kColors.length], + ); + } + } + + @override + bool shouldRepaint(covariant CustomPainter oldDelegate) { + return true; + } +} diff --git a/dev/benchmarks/macrobenchmarks/pubspec.yaml b/dev/benchmarks/macrobenchmarks/pubspec.yaml index 09bed30777c06..a4d1710a562a6 100644 --- a/dev/benchmarks/macrobenchmarks/pubspec.yaml +++ b/dev/benchmarks/macrobenchmarks/pubspec.yaml @@ -32,7 +32,7 @@ dependencies: leak_tracker_testing: 3.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -50,8 +50,8 @@ dev_dependencies: integration_test: sdk: flutter - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -213,4 +213,4 @@ flutter: fonts: - asset: packages/flutter_gallery_assets/fonts/GalleryIcons.ttf -# PUBSPEC CHECKSUM: 99f4 +# PUBSPEC CHECKSUM: 94f7 diff --git a/dev/benchmarks/macrobenchmarks/test_driver/rrect_blur_perf_test.dart b/dev/benchmarks/macrobenchmarks/test_driver/rrect_blur_perf_test.dart new file mode 100644 index 0000000000000..03425e178ca1a --- /dev/null +++ b/dev/benchmarks/macrobenchmarks/test_driver/rrect_blur_perf_test.dart @@ -0,0 +1,16 @@ +// 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:macrobenchmarks/common.dart'; + +import 'util.dart'; + +void main() { + macroPerfTest( + 'rrect_blur_perf', + kRRectBlurRouteName, + pageDelay: const Duration(seconds: 1), + duration: const Duration(seconds: 10), + ); +} diff --git a/dev/benchmarks/microbenchmarks/lib/building/const_vs_non_const_bench.dart b/dev/benchmarks/microbenchmarks/lib/building/const_vs_non_const_bench.dart deleted file mode 100644 index be290479869e1..0000000000000 --- a/dev/benchmarks/microbenchmarks/lib/building/const_vs_non_const_bench.dart +++ /dev/null @@ -1,229 +0,0 @@ -// 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_test/flutter_test.dart'; - -import '../common.dart'; - -const Duration kBenchmarkTime = Duration(seconds: 15); - -Future> runBuildBenchmark(ValueGetter buildApp) async { - assert(false, "Don't run benchmarks in debug mode! Use 'flutter run --release'."); - - // We control the framePolicy below to prevent us from scheduling frames in - // the engine, so that the engine does not interfere with our timings. - final LiveTestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized() as LiveTestWidgetsFlutterBinding; - - final Stopwatch watch = Stopwatch(); - int iterations = 0; - final List values = []; - - await benchmarkWidgets((WidgetTester tester) async { - await tester.pumpWidget(buildApp()); - await tester.pump(); - await tester.pumpAndSettle(const Duration(seconds: 1)); - - // Cannot use expects/asserts here since this is running outside of a test - // in release mode. - final int numberOfSizedBoxes = find.byType(SizedBox).evaluate().length; - if (numberOfSizedBoxes != 30) { - throw StateError('Expected 30 SizedBox widgets, but only found $numberOfSizedBoxes.'); - } - if (find.text('testToken').evaluate().length != 1) { - throw StateError('Did not find expected leaf widget.'); - } - - final Element rootWidget = tester.element(find.byKey(rootKey)); - Duration elapsed = Duration.zero; - - final LiveTestWidgetsFlutterBindingFramePolicy defaultPolicy = binding.framePolicy; - binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.benchmark; - - while (elapsed < kBenchmarkTime) { - watch.reset(); - watch.start(); - rootWidget.markNeedsBuild(); - await tester.pumpBenchmark(Duration(milliseconds: iterations * 16)); - watch.stop(); - iterations += 1; - elapsed += Duration(microseconds: watch.elapsedMicroseconds); - values.add(watch.elapsedMicroseconds.toDouble()); - } - - binding.framePolicy = defaultPolicy; - }); - return values; -} - -double calculateMean(List values) { - return values.reduce((double x, double y) => x + y) / values.length; -} - -Future main() async { - final BenchmarkResultPrinter printer = BenchmarkResultPrinter(); - final double constMean = calculateMean(await runBuildBenchmark(() => ConstApp(key: rootKey))); - final double nonConstMean = calculateMean(await runBuildBenchmark(() => NonConstApp(key: rootKey))); - printer.addResult( - description: 'const app build', - value: constMean, - unit: 'µs per iteration', - name: 'const_app_build_iteration', - ); - printer.addResult( - description: 'non-const app build', - value: nonConstMean, - unit: 'µs per iteration', - name: 'non_const_app_build_iteration', - ); - printer.addResult( - description: 'const speed-up (vs. non-const)', - value: ((nonConstMean - constMean) / constMean) * 100, - unit: '%', - name: 'const_speed_up', - ); - printer.printToStdout(); -} - -final Key rootKey = UniqueKey(); - -class ConstApp extends StatelessWidget { - const ConstApp({super.key}); - - @override - Widget build(BuildContext context) { - return const SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: SizedBox( - child: Text('testToken', textDirection: TextDirection.ltr), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ); - } -} - -class NonConstApp extends StatelessWidget { - const NonConstApp({super.key}); - - @override - Widget build(BuildContext context) { - // The explicit goal is to test the performance of non-const widgets, - // hence all these ignores. - return SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: SizedBox( // ignore: prefer_const_constructors - child: Text('testToken', textDirection: TextDirection.ltr), // ignore: prefer_const_constructors - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ); - } -} diff --git a/dev/benchmarks/microbenchmarks/pubspec.yaml b/dev/benchmarks/microbenchmarks/pubspec.yaml index 06d6e7f5e6ee0..e690e99a497e5 100644 --- a/dev/benchmarks/microbenchmarks/pubspec.yaml +++ b/dev/benchmarks/microbenchmarks/pubspec.yaml @@ -5,7 +5,7 @@ environment: sdk: '>=3.2.0-0 <4.0.0' dependencies: - meta: 1.14.0 + meta: 1.15.0 flutter: sdk: flutter flutter_test: @@ -15,8 +15,8 @@ dependencies: test: 1.25.5 flutter_gallery_assets: 1.0.2 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -140,4 +140,4 @@ flutter: - packages/flutter_gallery_assets/people/square/stella.png - packages/flutter_gallery_assets/people/square/trevor.png -# PUBSPEC CHECKSUM: c06b +# PUBSPEC CHECKSUM: 936e diff --git a/dev/benchmarks/multiple_flutters/module/pubspec.yaml b/dev/benchmarks/multiple_flutters/module/pubspec.yaml index 301f18a758237..9ac717a9675b2 100644 --- a/dev/benchmarks/multiple_flutters/module/pubspec.yaml +++ b/dev/benchmarks/multiple_flutters/module/pubspec.yaml @@ -21,7 +21,7 @@ dependencies: http: 0.13.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" http_parser: 4.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path_provider: 2.1.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path_provider_android: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -47,4 +47,4 @@ flutter: androidPackage: com.example.multiple_flutters_module iosBundleIdentifier: com.example.multipleFluttersModule -# PUBSPEC CHECKSUM: 05e1 +# PUBSPEC CHECKSUM: d4e2 diff --git a/dev/benchmarks/platform_channels_benchmarks/pubspec.yaml b/dev/benchmarks/platform_channels_benchmarks/pubspec.yaml index e50f85c15dd53..f95e70ddedffb 100644 --- a/dev/benchmarks/platform_channels_benchmarks/pubspec.yaml +++ b/dev/benchmarks/platform_channels_benchmarks/pubspec.yaml @@ -16,8 +16,8 @@ dependencies: path: ../microbenchmarks cupertino_icons: 1.0.8 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -42,7 +42,7 @@ dependencies: logging: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 1.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" node_preamble: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" package_config: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -77,4 +77,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 1a59 +# PUBSPEC CHECKSUM: ac5c diff --git a/dev/benchmarks/platform_views_layout/pubspec.yaml b/dev/benchmarks/platform_views_layout/pubspec.yaml index 0f939f65eddd2..ff26b3b44506d 100644 --- a/dev/benchmarks/platform_views_layout/pubspec.yaml +++ b/dev/benchmarks/platform_views_layout/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: file: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" plugin_platform_interface: 2.1.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -46,8 +46,8 @@ dev_dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -89,4 +89,4 @@ flutter: - packages/flutter_gallery_assets/people/square/ali.png - packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png -# PUBSPEC CHECKSUM: bab0 +# PUBSPEC CHECKSUM: d9b3 diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml b/dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml index ed334bd173830..6fb097542c506 100644 --- a/dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: file: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -41,8 +41,8 @@ dev_dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -84,4 +84,4 @@ flutter: - packages/flutter_gallery_assets/people/square/ali.png - packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png -# PUBSPEC CHECKSUM: 99f4 +# PUBSPEC CHECKSUM: 94f7 diff --git a/dev/benchmarks/test_apps/stocks/pubspec.yaml b/dev/benchmarks/test_apps/stocks/pubspec.yaml index 4f23a34d1f779..c137062d1d25d 100644 --- a/dev/benchmarks/test_apps/stocks/pubspec.yaml +++ b/dev/benchmarks/test_apps/stocks/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" http_parser: 4.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" string_scanner: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -33,8 +33,8 @@ dev_dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -79,4 +79,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 6117 +# PUBSPEC CHECKSUM: 801a diff --git a/dev/bots/analyze.dart b/dev/bots/analyze.dart index 98f39e3f54790..67758855eba73 100644 --- a/dev/bots/analyze.dart +++ b/dev/bots/analyze.dart @@ -1240,10 +1240,7 @@ Future verifyIssueLinks(String workingDirectory) async { final Set suggestions = {}; final List files = await _gitFiles(workingDirectory); for (final File file in files) { - if (path.basename(file.path).endsWith('_test.dart') - || path.basename(file.path) == 'analyze.dart' - // TODO(Piinks): Disables checks in docs/unsorted, enabling unchanged initial migration, https://github.com/flutter/flutter/issues/145009 - || file.path.contains('unsorted_wiki')) { + if (path.basename(file.path).endsWith('_test.dart') || path.basename(file.path) == 'analyze.dart') { continue; // Skip tests, they're not public-facing. } final Uint8List bytes = file.readAsBytesSync(); @@ -1308,11 +1305,13 @@ Future verifyRepositoryLinks(String workingDirectory) async { 'chromium/chromium', 'clojure/clojure', 'dart-lang/test', // TODO(guidezpl): remove when https://github.com/dart-lang/test/issues/2209 is closed + 'dart-lang/webdev', 'eseidelGoogle/bezier_perf', 'flutter/devtools', // TODO(guidezpl): remove when https://github.com/flutter/devtools/issues/7551 is closed 'flutter/flutter_gallery_assets', // TODO(guidezpl): remove when subtask in https://github.com/flutter/flutter/issues/121564 is complete 'flutter/flutter-intellij', // TODO(guidezpl): remove when https://github.com/flutter/flutter-intellij/issues/7342 is closed 'flutter/platform_tests', // TODO(guidezpl): remove when subtask in https://github.com/flutter/flutter/issues/121564 is complete + 'flutter/web_installers', 'glfw/glfw', 'GoogleCloudPlatform/artifact-registry-maven-tools', 'material-components/material-components-android', // TODO(guidezpl): remove when https://github.com/material-components/material-components-android/issues/4144 is closed @@ -1328,10 +1327,6 @@ Future verifyRepositoryLinks(String workingDirectory) async { final Set suggestions = {}; final List files = await _allFiles(workingDirectory, null, minimumMatches: 10).toList(); for (final File file in files) { - // TODO(Piinks): Disables checks in docs/unsorted, enabling unchanged initial migration, https://github.com/flutter/flutter/issues/145009 - if (file.path.contains('unsorted_wiki')) { - continue; - } final Uint8List bytes = file.readAsBytesSync(); // We allow invalid UTF-8 here so that binaries don't trip us up. // There's a separate test in this file that verifies that all text diff --git a/dev/bots/check_code_samples.dart b/dev/bots/check_code_samples.dart index 263a7ff242460..7ad0c72e7f633 100644 --- a/dev/bots/check_code_samples.dart +++ b/dev/bots/check_code_samples.dart @@ -325,8 +325,6 @@ final Set _knownMissingTests = { 'examples/api/test/material/flexible_space_bar/flexible_space_bar.0_test.dart', 'examples/api/test/material/floating_action_button_location/standard_fab_location.0_test.dart', 'examples/api/test/material/chip/deletable_chip_attributes.on_deleted.0_test.dart', - 'examples/api/test/material/snack_bar/snack_bar.2_test.dart', - 'examples/api/test/material/snack_bar/snack_bar.1_test.dart', 'examples/api/test/material/icon_button/icon_button.3_test.dart', 'examples/api/test/material/expansion_panel/expansion_panel_list.expansion_panel_list_radio.0_test.dart', 'examples/api/test/material/input_decorator/input_decoration.1_test.dart', @@ -341,7 +339,6 @@ final Set _knownMissingTests = { 'examples/api/test/material/text_form_field/text_form_field.1_test.dart', 'examples/api/test/material/scrollbar/scrollbar.1_test.dart', 'examples/api/test/material/dropdown_menu/dropdown_menu.1_test.dart', - 'examples/api/test/material/radio/radio.toggleable.0_test.dart', 'examples/api/test/material/search_anchor/search_anchor.0_test.dart', 'examples/api/test/material/search_anchor/search_anchor.1_test.dart', 'examples/api/test/material/search_anchor/search_anchor.2_test.dart', @@ -351,9 +348,7 @@ final Set _knownMissingTests = { 'examples/api/test/material/scaffold/scaffold.drawer.0_test.dart', 'examples/api/test/material/scaffold/scaffold_messenger.of.0_test.dart', 'examples/api/test/material/scaffold/scaffold_messenger.0_test.dart', - 'examples/api/test/material/scaffold/scaffold.0_test.dart', 'examples/api/test/material/scaffold/scaffold_state.show_bottom_sheet.0_test.dart', - 'examples/api/test/material/scaffold/scaffold.2_test.dart', 'examples/api/test/material/scaffold/scaffold_messenger_state.show_material_banner.0_test.dart', 'examples/api/test/material/scaffold/scaffold_messenger.of.1_test.dart', 'examples/api/test/material/scaffold/scaffold_messenger_state.show_snack_bar.0_test.dart', @@ -366,10 +361,6 @@ final Set _knownMissingTests = { 'examples/api/test/rendering/sliver_grid/sliver_grid_delegate_with_fixed_cross_axis_count.1_test.dart', 'examples/api/test/rendering/scroll_direction/scroll_direction.0_test.dart', 'examples/api/test/painting/star_border/star_border.0_test.dart', - 'examples/api/test/widgets/autocomplete/raw_autocomplete.focus_node.0_test.dart', - 'examples/api/test/widgets/autocomplete/raw_autocomplete.2_test.dart', - 'examples/api/test/widgets/autocomplete/raw_autocomplete.1_test.dart', - 'examples/api/test/widgets/autocomplete/raw_autocomplete.0_test.dart', 'examples/api/test/widgets/navigator/navigator.restorable_push_and_remove_until.0_test.dart', 'examples/api/test/widgets/navigator/navigator.0_test.dart', 'examples/api/test/widgets/navigator/navigator.restorable_push.0_test.dart', @@ -381,28 +372,10 @@ final Set _knownMissingTests = { 'examples/api/test/widgets/focus_manager/focus_node.unfocus.0_test.dart', 'examples/api/test/widgets/framework/build_owner.0_test.dart', 'examples/api/test/widgets/framework/error_widget.0_test.dart', - 'examples/api/test/widgets/inherited_theme/inherited_theme.0_test.dart', - 'examples/api/test/widgets/sliver/decorated_sliver.0_test.dart', 'examples/api/test/widgets/autofill/autofill_group.0_test.dart', 'examples/api/test/widgets/nested_scroll_view/nested_scroll_view_state.0_test.dart', 'examples/api/test/widgets/scroll_position/scroll_metrics_notification.0_test.dart', 'examples/api/test/widgets/media_query/media_query_data.system_gesture_insets.0_test.dart', - 'examples/api/test/widgets/async/future_builder.0_test.dart', - 'examples/api/test/widgets/restoration_properties/restorable_value.0_test.dart', - 'examples/api/test/widgets/animated_switcher/animated_switcher.0_test.dart', - 'examples/api/test/widgets/transitions/relative_positioned_transition.0_test.dart', - 'examples/api/test/widgets/transitions/positioned_transition.0_test.dart', - 'examples/api/test/widgets/transitions/sliver_fade_transition.0_test.dart', - 'examples/api/test/widgets/transitions/align_transition.0_test.dart', - 'examples/api/test/widgets/transitions/animated_builder.0_test.dart', - 'examples/api/test/widgets/transitions/rotation_transition.0_test.dart', - 'examples/api/test/widgets/transitions/animated_widget.0_test.dart', - 'examples/api/test/widgets/transitions/slide_transition.0_test.dart', - 'examples/api/test/widgets/transitions/listenable_builder.2_test.dart', - 'examples/api/test/widgets/transitions/scale_transition.0_test.dart', - 'examples/api/test/widgets/transitions/default_text_style_transition.0_test.dart', - 'examples/api/test/widgets/transitions/decorated_box_transition.0_test.dart', - 'examples/api/test/widgets/transitions/size_transition.0_test.dart', 'examples/api/test/widgets/animated_list/animated_list.0_test.dart', 'examples/api/test/widgets/focus_traversal/focus_traversal_group.0_test.dart', 'examples/api/test/widgets/focus_traversal/ordered_traversal_policy.0_test.dart', @@ -418,8 +391,6 @@ final Set _knownMissingTests = { 'examples/api/test/widgets/interactive_viewer/interactive_viewer.transformation_controller.0_test.dart', 'examples/api/test/widgets/interactive_viewer/interactive_viewer.0_test.dart', 'examples/api/test/widgets/notification_listener/notification.0_test.dart', - 'examples/api/test/widgets/editable_text/text_editing_controller.0_test.dart', - 'examples/api/test/widgets/editable_text/editable_text.on_changed.0_test.dart', 'examples/api/test/widgets/overscroll_indicator/glowing_overscroll_indicator.1_test.dart', 'examples/api/test/widgets/overscroll_indicator/glowing_overscroll_indicator.0_test.dart', 'examples/api/test/widgets/tween_animation_builder/tween_animation_builder.0_test.dart', diff --git a/dev/bots/pubspec.yaml b/dev/bots/pubspec.yaml index 273b37f452d69..3434548832aaa 100644 --- a/dev/bots/pubspec.yaml +++ b/dev/bots/pubspec.yaml @@ -5,7 +5,7 @@ environment: sdk: '>=3.2.0-0 <4.0.0' dependencies: - analyzer: 6.5.0 + analyzer: 6.5.1 args: 2.5.0 crypto: 3.0.3 intl: 0.19.0 @@ -13,14 +13,14 @@ dependencies: flutter_devicelab: path: ../devicelab http_parser: 4.0.2 - meta: 1.14.0 + meta: 1.15.0 path: 1.9.0 platform: 3.1.4 process: 5.0.2 test: 1.25.5 _discoveryapis_commons: 1.0.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" archive: 3.3.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -75,4 +75,4 @@ dependencies: dev_dependencies: test_api: 0.7.1 -# PUBSPEC CHECKSUM: 4d0b +# PUBSPEC CHECKSUM: c10e diff --git a/dev/conductor/core/pubspec.yaml b/dev/conductor/core/pubspec.yaml index 872eb3f18150b..1eff1e1f65ccd 100644 --- a/dev/conductor/core/pubspec.yaml +++ b/dev/conductor/core/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: args: 2.5.0 http: 0.13.6 intl: 0.19.0 - meta: 1.14.0 + meta: 1.15.0 path: 1.9.0 process: 5.0.2 protobuf: 3.1.0 @@ -33,8 +33,8 @@ dev_dependencies: test: 1.25.5 test_api: 0.7.1 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -66,4 +66,4 @@ dev_dependencies: webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 4a19 +# PUBSPEC CHECKSUM: 271c diff --git a/dev/customer_testing/pubspec.yaml b/dev/customer_testing/pubspec.yaml index f506c3b23e606..5361fadf7d8e2 100644 --- a/dev/customer_testing/pubspec.yaml +++ b/dev/customer_testing/pubspec.yaml @@ -8,7 +8,7 @@ dependencies: args: 2.5.0 path: 1.9.0 glob: 2.1.2 - meta: 1.14.0 + meta: 1.15.0 async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -20,8 +20,8 @@ dependencies: dev_dependencies: test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -56,4 +56,4 @@ dev_dependencies: webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 4c64 +# PUBSPEC CHECKSUM: 2367 diff --git a/dev/devicelab/bin/tasks/external_textures_integration_test.dart b/dev/devicelab/bin/tasks/external_textures_integration_test.dart index 28d234baec54c..64234a229c4db 100644 --- a/dev/devicelab/bin/tasks/external_textures_integration_test.dart +++ b/dev/devicelab/bin/tasks/external_textures_integration_test.dart @@ -8,5 +8,5 @@ import 'package:flutter_devicelab/tasks/integration_tests.dart'; Future main() async { deviceOperatingSystem = DeviceOperatingSystem.android; - await task(createExternalTexturesFrameRateIntegrationTest()); + await task(createExternalTexturesFrameRateIntegrationTest(extraOptions: ['--no-enable-impeller'])); } diff --git a/dev/devicelab/bin/tasks/native_assets_ios_simulator.dart b/dev/devicelab/bin/tasks/native_assets_ios_simulator.dart index 8b7c4632f05dc..582825d5cbab4 100644 --- a/dev/devicelab/bin/tasks/native_assets_ios_simulator.dart +++ b/dev/devicelab/bin/tasks/native_assets_ios_simulator.dart @@ -12,12 +12,13 @@ Future main() async { await task(() async { deviceOperatingSystem = DeviceOperatingSystem.ios; String? simulatorDeviceId; + TaskResult res = TaskResult.success(null); try { await testWithNewIOSSimulator( 'TestNativeAssetsSim', (String deviceId) async { simulatorDeviceId = deviceId; - await createNativeAssetsTest( + res = await createNativeAssetsTest( deviceIdOverride: deviceId, isIosSimulator: true, )(); @@ -26,6 +27,6 @@ Future main() async { } finally { await removeIOSSimulator(simulatorDeviceId); } - return TaskResult.success(null); + return res; }); } diff --git a/dev/devicelab/bin/tasks/rrect_blur_perf__timeline_summary.dart b/dev/devicelab/bin/tasks/rrect_blur_perf__timeline_summary.dart new file mode 100644 index 0000000000000..41392866f707f --- /dev/null +++ b/dev/devicelab/bin/tasks/rrect_blur_perf__timeline_summary.dart @@ -0,0 +1,14 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:async'; + +import 'package:flutter_devicelab/framework/devices.dart'; +import 'package:flutter_devicelab/framework/framework.dart'; +import 'package:flutter_devicelab/tasks/perf_tests.dart'; + +Future main() async { + deviceOperatingSystem = DeviceOperatingSystem.android; + await task(createRRectBlurPerfTest(enableImpeller: true)); +} diff --git a/dev/devicelab/bin/tasks/rrect_blur_perf_ios__timeline_summary.dart b/dev/devicelab/bin/tasks/rrect_blur_perf_ios__timeline_summary.dart new file mode 100644 index 0000000000000..bac282e7511f5 --- /dev/null +++ b/dev/devicelab/bin/tasks/rrect_blur_perf_ios__timeline_summary.dart @@ -0,0 +1,14 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:async'; + +import 'package:flutter_devicelab/framework/devices.dart'; +import 'package:flutter_devicelab/framework/framework.dart'; +import 'package:flutter_devicelab/tasks/perf_tests.dart'; + +Future main() async { + deviceOperatingSystem = DeviceOperatingSystem.ios; + await task(createRRectBlurPerfTest(enableImpeller: true)); +} diff --git a/dev/devicelab/lib/tasks/integration_tests.dart b/dev/devicelab/lib/tasks/integration_tests.dart index 17f5d3d9df476..c3ed48907946e 100644 --- a/dev/devicelab/lib/tasks/integration_tests.dart +++ b/dev/devicelab/lib/tasks/integration_tests.dart @@ -40,10 +40,11 @@ TaskFunction createIntegrationTestFlavorsTest({Map? environment} ).call; } -TaskFunction createExternalTexturesFrameRateIntegrationTest() { +TaskFunction createExternalTexturesFrameRateIntegrationTest({ List extraOptions = const [] }) { return DriverTest( '${flutterDirectory.path}/dev/integration_tests/external_textures', 'lib/frame_rate_main.dart', + extraOptions: extraOptions, ).call; } diff --git a/dev/devicelab/lib/tasks/microbenchmarks.dart b/dev/devicelab/lib/tasks/microbenchmarks.dart index 40dbe1c4cfa85..aa38ab9a575ca 100644 --- a/dev/devicelab/lib/tasks/microbenchmarks.dart +++ b/dev/devicelab/lib/tasks/microbenchmarks.dart @@ -75,7 +75,6 @@ TaskFunction createMicrobenchmarkTask({ ...await runMicrobench('lib/stocks/layout_bench.dart'), ...await runMicrobench('lib/ui/image_bench.dart'), ...await runMicrobench('lib/layout/text_intrinsic_bench.dart'), - ...await runMicrobench('lib/building/const_vs_non_const_bench.dart'), }; return TaskResult.success(allResults, diff --git a/dev/devicelab/lib/tasks/native_assets_test.dart b/dev/devicelab/lib/tasks/native_assets_test.dart index d6ee607420493..367f1b5d7e2f5 100644 --- a/dev/devicelab/lib/tasks/native_assets_test.dart +++ b/dev/devicelab/lib/tasks/native_assets_test.dart @@ -54,11 +54,14 @@ TaskFunction createNativeAssetsTest({ ]; int transitionCount = 0; bool done = false; + bool error = false; await inDirectory(exampleDirectory, () async { final int runFlutterResult = await runFlutter( options: options, onLine: (String line, Process process) { + error |= line.contains('EXCEPTION CAUGHT BY WIDGETS LIBRARY'); + error |= line.contains("Invalid argument(s): Couldn't resolve native function 'sum'"); if (done) { return; } @@ -108,6 +111,9 @@ TaskFunction createNativeAssetsTest({ '(expected $expectedNumberOfTransitions)', ); } + if (error) { + return TaskResult.failure('Error during hot reload or hot restart.'); + } return TaskResult.success(null); }); if (buildModeResult.failed) { diff --git a/dev/devicelab/lib/tasks/perf_tests.dart b/dev/devicelab/lib/tasks/perf_tests.dart index c6d1a2e22a537..ba5c92f935000 100644 --- a/dev/devicelab/lib/tasks/perf_tests.dart +++ b/dev/devicelab/lib/tasks/perf_tests.dart @@ -666,6 +666,21 @@ TaskFunction createAnimatedAdvancedBlendPerfTest({ ).run; } +TaskFunction createRRectBlurPerfTest({ + bool? enableImpeller, + bool? forceOpenGLES, +}) { + return PerfTest( + '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks', + 'test_driver/run_app.dart', + 'rrect_blur_test', + enableImpeller: enableImpeller, + forceOpenGLES: forceOpenGLES, + testDriver: 'test_driver/rrect_blur_perf_test.dart', + saveTraceFile: true, + ).run; +} + TaskFunction createAnimatedBlurBackropFilterPerfTest({ bool? enableImpeller, bool? forceOpenGLES, diff --git a/dev/devicelab/pubspec.yaml b/dev/devicelab/pubspec.yaml index 219eaec1c32f7..c56cbd26dcf2a 100644 --- a/dev/devicelab/pubspec.yaml +++ b/dev/devicelab/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: file: 7.0.0 http: 0.13.6 logging: 1.2.0 - meta: 1.14.0 + meta: 1.15.0 metrics_center: 1.0.13 path: 1.9.0 platform: 3.1.4 @@ -51,8 +51,8 @@ dependencies: dev_dependencies: test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 4.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -73,4 +73,4 @@ dev_dependencies: watcher: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 2.4.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: d878 +# PUBSPEC CHECKSUM: ec7b diff --git a/dev/forbidden_from_release_tests/pubspec.yaml b/dev/forbidden_from_release_tests/pubspec.yaml index 39f26aee25830..01e95ccf4c527 100644 --- a/dev/forbidden_from_release_tests/pubspec.yaml +++ b/dev/forbidden_from_release_tests/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: vm_snapshot_analysis: 0.7.6 collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" platform: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 228f +# PUBSPEC CHECKSUM: d790 diff --git a/dev/integration_tests/abstract_method_smoke_test/pubspec.yaml b/dev/integration_tests/abstract_method_smoke_test/pubspec.yaml index 513f0201ee0b5..acb212a6c7fca 100644 --- a/dev/integration_tests/abstract_method_smoke_test/pubspec.yaml +++ b/dev/integration_tests/abstract_method_smoke_test/pubspec.yaml @@ -13,10 +13,10 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" flutter: uses-material-design: true -# PUBSPEC CHECKSUM: edc2 +# PUBSPEC CHECKSUM: 17c3 diff --git a/dev/integration_tests/android_embedding_v2_smoke_test/pubspec.yaml b/dev/integration_tests/android_embedding_v2_smoke_test/pubspec.yaml index f4dcff176f7d8..5ac1c995d4894 100644 --- a/dev/integration_tests/android_embedding_v2_smoke_test/pubspec.yaml +++ b/dev/integration_tests/android_embedding_v2_smoke_test/pubspec.yaml @@ -28,7 +28,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -95,4 +95,4 @@ flutter: # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages -# PUBSPEC CHECKSUM: bb0d +# PUBSPEC CHECKSUM: 000e diff --git a/dev/integration_tests/android_semantics_testing/pubspec.yaml b/dev/integration_tests/android_semantics_testing/pubspec.yaml index ab8515c57edca..174bbb9f3a993 100644 --- a/dev/integration_tests/android_semantics_testing/pubspec.yaml +++ b/dev/integration_tests/android_semantics_testing/pubspec.yaml @@ -13,8 +13,8 @@ dependencies: pub_semver: 2.1.4 test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -38,7 +38,7 @@ dependencies: logging: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 1.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" node_preamble: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" package_config: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -69,4 +69,4 @@ dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 1f14 +# PUBSPEC CHECKSUM: e417 diff --git a/dev/integration_tests/android_verified_input/pubspec.yaml b/dev/integration_tests/android_verified_input/pubspec.yaml index 065e1579313b1..ddf29cc0f45f9 100644 --- a/dev/integration_tests/android_verified_input/pubspec.yaml +++ b/dev/integration_tests/android_verified_input/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: file: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -42,8 +42,8 @@ dev_dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -79,4 +79,4 @@ dev_dependencies: webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: b45a +# PUBSPEC CHECKSUM: 3b5d diff --git a/dev/integration_tests/android_views/pubspec.yaml b/dev/integration_tests/android_views/pubspec.yaml index d77825474d980..ff735a0d57d64 100644 --- a/dev/integration_tests/android_views/pubspec.yaml +++ b/dev/integration_tests/android_views/pubspec.yaml @@ -29,7 +29,7 @@ dependencies: file: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path_provider_foundation: 2.4.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path_provider_linux: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -55,8 +55,8 @@ dev_dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -95,4 +95,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 595b +# PUBSPEC CHECKSUM: fb5e diff --git a/dev/integration_tests/channels/pubspec.yaml b/dev/integration_tests/channels/pubspec.yaml index 58334e0781508..86752991a571b 100644 --- a/dev/integration_tests/channels/pubspec.yaml +++ b/dev/integration_tests/channels/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -45,4 +45,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 3a98 +# PUBSPEC CHECKSUM: be99 diff --git a/dev/integration_tests/deferred_components_test/pubspec.yaml b/dev/integration_tests/deferred_components_test/pubspec.yaml index e924aa5d018d4..4e94d46b66527 100644 --- a/dev/integration_tests/deferred_components_test/pubspec.yaml +++ b/dev/integration_tests/deferred_components_test/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: file: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -36,8 +36,8 @@ dev_dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -83,4 +83,4 @@ flutter: assets: - customassets/flutter_logo.png -# PUBSPEC CHECKSUM: b45a +# PUBSPEC CHECKSUM: 3b5d diff --git a/dev/integration_tests/external_textures/pubspec.yaml b/dev/integration_tests/external_textures/pubspec.yaml index df0ca41fd40be..3f77a93010b8b 100644 --- a/dev/integration_tests/external_textures/pubspec.yaml +++ b/dev/integration_tests/external_textures/pubspec.yaml @@ -11,8 +11,8 @@ dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -31,7 +31,7 @@ dependencies: logging: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 1.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" node_preamble: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" package_config: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -65,4 +65,4 @@ dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: b295 +# PUBSPEC CHECKSUM: 7b98 diff --git a/dev/integration_tests/flavors/pubspec.yaml b/dev/integration_tests/flavors/pubspec.yaml index 7b0c17677f531..6a3d1234defdc 100644 --- a/dev/integration_tests/flavors/pubspec.yaml +++ b/dev/integration_tests/flavors/pubspec.yaml @@ -13,8 +13,8 @@ dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -33,7 +33,7 @@ dependencies: logging: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 1.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" node_preamble: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" package_config: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -85,4 +85,4 @@ flutter: flavors: - free -# PUBSPEC CHECKSUM: b45a +# PUBSPEC CHECKSUM: 3b5d diff --git a/dev/integration_tests/flutter_gallery/pubspec.yaml b/dev/integration_tests/flutter_gallery/pubspec.yaml index 521e738fce8de..5a79722f3e689 100644 --- a/dev/integration_tests/flutter_gallery/pubspec.yaml +++ b/dev/integration_tests/flutter_gallery/pubspec.yaml @@ -30,7 +30,7 @@ dependencies: device_info_platform_interface: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" html: 0.15.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" plugin_platform_interface: 2.1.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -60,8 +60,8 @@ dev_dependencies: integration_test: sdk: flutter - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -277,4 +277,4 @@ flutter: - asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Regular.ttf - asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Light.ttf -# PUBSPEC CHECKSUM: b2ce +# PUBSPEC CHECKSUM: c1d1 diff --git a/dev/integration_tests/gradle_deprecated_settings/pubspec.yaml b/dev/integration_tests/gradle_deprecated_settings/pubspec.yaml index f5c79a6565ae7..e7e20d8edac66 100644 --- a/dev/integration_tests/gradle_deprecated_settings/pubspec.yaml +++ b/dev/integration_tests/gradle_deprecated_settings/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: cross_file: 0.3.4+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" flutter_plugin_android_lifecycle: 2.0.19 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" plugin_platform_interface: 2.1.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stream_transform: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -28,4 +28,4 @@ dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: c44c +# PUBSPEC CHECKSUM: 704d diff --git a/dev/integration_tests/hybrid_android_views/pubspec.yaml b/dev/integration_tests/hybrid_android_views/pubspec.yaml index 60fde3419dbfb..74085dfe89cb8 100644 --- a/dev/integration_tests/hybrid_android_views/pubspec.yaml +++ b/dev/integration_tests/hybrid_android_views/pubspec.yaml @@ -26,7 +26,7 @@ dependencies: file: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path_provider_android: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path_provider_foundation: 2.4.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -53,8 +53,8 @@ dev_dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -93,4 +93,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 595b +# PUBSPEC CHECKSUM: fb5e diff --git a/dev/integration_tests/ios_add2app_life_cycle/flutterapp/pubspec.yaml b/dev/integration_tests/ios_add2app_life_cycle/flutterapp/pubspec.yaml index 2173565535e45..b92acc0a2d268 100644 --- a/dev/integration_tests/ios_add2app_life_cycle/flutterapp/pubspec.yaml +++ b/dev/integration_tests/ios_add2app_life_cycle/flutterapp/pubspec.yaml @@ -27,7 +27,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -102,4 +102,4 @@ flutter: androidPackage: com.example.iosadd2appflutter iosBundleIdentifier: com.example.iosAdd2appFlutter -# PUBSPEC CHECKSUM: bb0d +# PUBSPEC CHECKSUM: 000e diff --git a/dev/integration_tests/ios_app_with_extensions/pubspec.yaml b/dev/integration_tests/ios_app_with_extensions/pubspec.yaml index 7fb107e801ceb..c00f626a2b5ec 100644 --- a/dev/integration_tests/ios_app_with_extensions/pubspec.yaml +++ b/dev/integration_tests/ios_app_with_extensions/pubspec.yaml @@ -26,7 +26,7 @@ dependencies: collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" device_info_platform_interface: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" plugin_platform_interface: 2.1.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -94,4 +94,4 @@ flutter: # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages -# PUBSPEC CHECKSUM: ed93 +# PUBSPEC CHECKSUM: 7294 diff --git a/dev/integration_tests/ios_platform_view_tests/pubspec.yaml b/dev/integration_tests/ios_platform_view_tests/pubspec.yaml index 7f91945f2639f..d8edeb934cf11 100644 --- a/dev/integration_tests/ios_platform_view_tests/pubspec.yaml +++ b/dev/integration_tests/ios_platform_view_tests/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: file: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -36,8 +36,8 @@ dev_dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -80,4 +80,4 @@ flutter: # the material Icons class. uses-material-design: true -# PUBSPEC CHECKSUM: b45a +# PUBSPEC CHECKSUM: 3b5d diff --git a/dev/integration_tests/link_hook/.gitignore b/dev/integration_tests/link_hook/.gitignore new file mode 100644 index 0000000000000..96486fd930243 --- /dev/null +++ b/dev/integration_tests/link_hook/.gitignore @@ -0,0 +1,30 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.packages +build/ diff --git a/dev/integration_tests/link_hook/README.md b/dev/integration_tests/link_hook/README.md new file mode 100644 index 0000000000000..121b301b49e6e --- /dev/null +++ b/dev/integration_tests/link_hook/README.md @@ -0,0 +1,3 @@ +# link_hook + +Test project for the native assets test to exercise adding assets during a link hook. diff --git a/dev/integration_tests/link_hook/ffigen.yaml b/dev/integration_tests/link_hook/ffigen.yaml new file mode 100644 index 0000000000000..eeabc65ac1e51 --- /dev/null +++ b/dev/integration_tests/link_hook/ffigen.yaml @@ -0,0 +1,20 @@ +# Run with `dart run ffigen --config ffigen.yaml`. +name: LinkHookBindings +description: | + Bindings for `src/link_hook.h`. + + Regenerate bindings with `dart run ffigen --config ffigen.yaml`. +output: 'lib/link_hook_bindings_generated.dart' +headers: + entry-points: + - 'src/link_hook.h' + include-directives: + - 'src/link_hook.h' +ffi-native: +preamble: | + // ignore_for_file: always_specify_types + // ignore_for_file: camel_case_types + // ignore_for_file: non_constant_identifier_names +comments: + style: any + length: full diff --git a/dev/integration_tests/link_hook/hook/build.dart b/dev/integration_tests/link_hook/hook/build.dart new file mode 100644 index 0000000000000..19fb66ccc25c5 --- /dev/null +++ b/dev/integration_tests/link_hook/hook/build.dart @@ -0,0 +1,36 @@ +// 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:logging/logging.dart'; +import 'package:native_assets_cli/native_assets_cli.dart'; +import 'package:native_toolchain_c/native_toolchain_c.dart'; + + +void main(List args) async { + await build(args, (BuildConfig config, BuildOutput output) async { + final String packageName = config.packageName; + final CBuilder cbuilder = CBuilder.library( + name: packageName, + assetName: 'some_asset_name_that_is_not_used', + sources: [ + 'src/$packageName.c', + ], + dartBuildFiles: ['hook/build.dart'], + ); + final BuildOutput outputCatcher = BuildOutput(); + await cbuilder.run( + buildConfig: config, + buildOutput: outputCatcher, + logger: Logger('') + ..level = Level.ALL + ..onRecord.listen((LogRecord record) => print(record.message)), + ); + output.addDependencies(outputCatcher.dependencies); + // Send the asset to hook/link.dart. + output.addAsset( + outputCatcher.assets.single, + linkInPackage: 'link_hook', + ); + }); +} diff --git a/dev/integration_tests/link_hook/hook/link.dart b/dev/integration_tests/link_hook/hook/link.dart new file mode 100644 index 0000000000000..3c37155587f69 --- /dev/null +++ b/dev/integration_tests/link_hook/hook/link.dart @@ -0,0 +1,22 @@ +// 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:native_assets_cli/native_assets_cli.dart'; + +void main(List args) async { + await link(args, (LinkConfig config, LinkOutput output) async { + final NativeCodeAsset asset = config.assets.single as NativeCodeAsset; + final String packageName = config.packageName; + output.addAsset(NativeCodeAsset( + package: packageName, + // Change the asset id to something that is used. + name: '${packageName}_bindings_generated.dart', + linkMode: asset.linkMode, + os: asset.os, + architecture: asset.architecture, + file: asset.file, + )); + output.addDependency(config.packageRoot.resolve('hook/link.dart')); + }); +} diff --git a/dev/integration_tests/link_hook/lib/link_hook.dart b/dev/integration_tests/link_hook/lib/link_hook.dart new file mode 100644 index 0000000000000..8bbe2db2858cd --- /dev/null +++ b/dev/integration_tests/link_hook/lib/link_hook.dart @@ -0,0 +1,8 @@ +// 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 'link_hook_bindings_generated.dart' as bindings; + +/// A very short-lived native function. +int difference(int a, int b) => bindings.difference(a, b); diff --git a/dev/integration_tests/link_hook/lib/link_hook_bindings_generated.dart b/dev/integration_tests/link_hook/lib/link_hook_bindings_generated.dart new file mode 100644 index 0000000000000..02a533ca93f53 --- /dev/null +++ b/dev/integration_tests/link_hook/lib/link_hook_bindings_generated.dart @@ -0,0 +1,19 @@ +// 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. + +// ignore_for_file: always_specify_types +// ignore_for_file: camel_case_types +// ignore_for_file: non_constant_identifier_names + +// AUTO GENERATED FILE, DO NOT EDIT. +// +// Generated by `package:ffigen`. +import 'dart:ffi' as ffi; + +/// A very short-lived native function. +@ffi.Native() +external int difference( + int a, + int b, +); diff --git a/dev/integration_tests/link_hook/pubspec.yaml b/dev/integration_tests/link_hook/pubspec.yaml new file mode 100644 index 0000000000000..fb5b19c726ad7 --- /dev/null +++ b/dev/integration_tests/link_hook/pubspec.yaml @@ -0,0 +1,70 @@ +name: link_hook +description: "A new Dart FFI package project." +version: 0.0.1 + +environment: + sdk: '>=3.5.0-154.0.dev <4.0.0' + +dependencies: + cli_config: 0.2.0 + logging: 1.2.0 + native_assets_cli: 0.6.0 + native_toolchain_c: 0.4.2 + + args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + file: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pub_semver: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + string_scanner: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + term_glyph: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + typed_data: 1.3.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + +dev_dependencies: + ffi: 2.1.2 + ffigen: 12.0.0 + flutter_lints: 4.0.0 + test: 1.25.5 + + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + cli_util: 0.4.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + coverage: 1.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + frontend_server_client: 4.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + http_parser: 4.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + io: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + js: 0.7.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + lints: 4.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + mime: 1.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + node_preamble: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + package_config: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pool: 1.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + quiver: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + shelf: 1.4.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + shelf_packages_handler: 3.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + shelf_static: 1.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + shelf_web_socket: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + source_map_stack_trace: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + source_maps: 0.10.12 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + stack_trace: 1.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + stream_channel: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + test_api: 0.7.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + test_core: 0.6.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service: 14.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + watcher: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + web: 0.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + web_socket_channel: 2.4.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + yaml_edit: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + +# PUBSPEC CHECKSUM: ee42 diff --git a/dev/integration_tests/link_hook/src/link_hook.c b/dev/integration_tests/link_hook/src/link_hook.c new file mode 100644 index 0000000000000..d0086495a3b3a --- /dev/null +++ b/dev/integration_tests/link_hook/src/link_hook.c @@ -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. + +#include "link_hook.h" + +// A very short-lived native function. +// +// For very short-lived functions, it is fine to call them on the main isolate. +// They will block the Dart execution while running the native function, so +// only do this for native functions which are guaranteed to be short-lived. +FFI_PLUGIN_EXPORT intptr_t difference(intptr_t a, intptr_t b) { return a - b; } diff --git a/dev/integration_tests/link_hook/src/link_hook.h b/dev/integration_tests/link_hook/src/link_hook.h new file mode 100644 index 0000000000000..569c8f16382b1 --- /dev/null +++ b/dev/integration_tests/link_hook/src/link_hook.h @@ -0,0 +1,22 @@ +// 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. + +#include +#include +#include + +#if _WIN32 +#include +#else +#include +#include +#endif + +#if _WIN32 +#define FFI_PLUGIN_EXPORT __declspec(dllexport) +#else +#define FFI_PLUGIN_EXPORT +#endif + +FFI_PLUGIN_EXPORT intptr_t difference(intptr_t a, intptr_t b); diff --git a/dev/integration_tests/link_hook/test/link_hook_test.dart b/dev/integration_tests/link_hook/test/link_hook_test.dart new file mode 100644 index 0000000000000..cf142e73a9052 --- /dev/null +++ b/dev/integration_tests/link_hook/test/link_hook_test.dart @@ -0,0 +1,13 @@ +// 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:link_hook/link_hook.dart'; +import 'package:test/test.dart'; + +void main() { + test('invoke native function', () { + // Tests are run in debug mode. + expect(difference(24, 18), 24 - 18); + }); +} diff --git a/dev/integration_tests/new_gallery/pubspec.yaml b/dev/integration_tests/new_gallery/pubspec.yaml index ced3afb6db452..7221cf5e2650e 100644 --- a/dev/integration_tests/new_gallery/pubspec.yaml +++ b/dev/integration_tests/new_gallery/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: flutter_staggered_grid_view: 0.7.0 google_fonts: 4.0.4 intl: 0.19.0 - meta: 1.14.0 + meta: 1.15.0 provider: 6.1.2 rally_assets: 3.0.1 scoped_model: 2.0.0 @@ -70,8 +70,8 @@ dev_dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -312,4 +312,4 @@ flutter: fonts: - asset: packages/flutter_gallery_assets/fonts/GalleryIcons.ttf -# PUBSPEC CHECKSUM: 2c6c +# PUBSPEC CHECKSUM: fc6f diff --git a/dev/integration_tests/non_nullable/pubspec.yaml b/dev/integration_tests/non_nullable/pubspec.yaml index 3aa989c93bb5c..ff689c2ec2739 100644 --- a/dev/integration_tests/non_nullable/pubspec.yaml +++ b/dev/integration_tests/non_nullable/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -42,4 +42,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: bb0d +# PUBSPEC CHECKSUM: 000e diff --git a/dev/integration_tests/platform_interaction/pubspec.yaml b/dev/integration_tests/platform_interaction/pubspec.yaml index bbf607d5031c3..5909f24f707a6 100644 --- a/dev/integration_tests/platform_interaction/pubspec.yaml +++ b/dev/integration_tests/platform_interaction/pubspec.yaml @@ -11,8 +11,8 @@ dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -31,7 +31,7 @@ dependencies: logging: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 1.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" node_preamble: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" package_config: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -65,4 +65,4 @@ dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: b295 +# PUBSPEC CHECKSUM: 7b98 diff --git a/dev/integration_tests/release_smoke_test/pubspec.yaml b/dev/integration_tests/release_smoke_test/pubspec.yaml index 20c4123b056f5..dcc4019d1680e 100644 --- a/dev/integration_tests/release_smoke_test/pubspec.yaml +++ b/dev/integration_tests/release_smoke_test/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -36,4 +36,4 @@ dev_dependencies: test_api: 0.7.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 14.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 8b62 +# PUBSPEC CHECKSUM: cf63 diff --git a/dev/integration_tests/spell_check/pubspec.yaml b/dev/integration_tests/spell_check/pubspec.yaml index 3296cd887d92f..ebeb6e050a818 100644 --- a/dev/integration_tests/spell_check/pubspec.yaml +++ b/dev/integration_tests/spell_check/pubspec.yaml @@ -37,7 +37,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -108,4 +108,4 @@ flutter: # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages -# PUBSPEC CHECKSUM: bb0d +# PUBSPEC CHECKSUM: 000e diff --git a/dev/integration_tests/ui/pubspec.yaml b/dev/integration_tests/ui/pubspec.yaml index b0364270e423a..cd44e9154c79c 100644 --- a/dev/integration_tests/ui/pubspec.yaml +++ b/dev/integration_tests/ui/pubspec.yaml @@ -13,8 +13,8 @@ dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -33,7 +33,7 @@ dependencies: logging: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 1.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" node_preamble: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" package_config: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -79,4 +79,4 @@ flutter: assets: - assets/foo.png -# PUBSPEC CHECKSUM: b45a +# PUBSPEC CHECKSUM: 3b5d diff --git a/dev/integration_tests/web/pubspec.yaml b/dev/integration_tests/web/pubspec.yaml index 9939e794fc85a..51a976452a2a9 100644 --- a/dev/integration_tests/web/pubspec.yaml +++ b/dev/integration_tests/web/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 934f +# PUBSPEC CHECKSUM: d050 diff --git a/dev/integration_tests/web_compile_tests/pubspec.yaml b/dev/integration_tests/web_compile_tests/pubspec.yaml index cb6ac984b0c95..17004cbb9a4e4 100644 --- a/dev/integration_tests/web_compile_tests/pubspec.yaml +++ b/dev/integration_tests/web_compile_tests/pubspec.yaml @@ -9,7 +9,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: edc2 +# PUBSPEC CHECKSUM: 17c3 diff --git a/dev/integration_tests/web_e2e_tests/pubspec.yaml b/dev/integration_tests/web_e2e_tests/pubspec.yaml index 0d5bd78c371ae..5b48fe7aeece2 100644 --- a/dev/integration_tests/web_e2e_tests/pubspec.yaml +++ b/dev/integration_tests/web_e2e_tests/pubspec.yaml @@ -35,7 +35,7 @@ dependencies: leak_tracker_testing: 3.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -54,8 +54,8 @@ dev_dependencies: http: 0.13.6 test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -87,4 +87,4 @@ dev_dependencies: webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 6940 +# PUBSPEC CHECKSUM: 4343 diff --git a/dev/integration_tests/wide_gamut_test/pubspec.yaml b/dev/integration_tests/wide_gamut_test/pubspec.yaml index e405b2b73094c..b60b296500ea6 100644 --- a/dev/integration_tests/wide_gamut_test/pubspec.yaml +++ b/dev/integration_tests/wide_gamut_test/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -43,4 +43,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 8b62 +# PUBSPEC CHECKSUM: cf63 diff --git a/dev/integration_tests/windows_startup_test/pubspec.yaml b/dev/integration_tests/windows_startup_test/pubspec.yaml index 9a3c2b4a1e772..48dc3c990127a 100644 --- a/dev/integration_tests/windows_startup_test/pubspec.yaml +++ b/dev/integration_tests/windows_startup_test/pubspec.yaml @@ -11,8 +11,8 @@ dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -31,7 +31,7 @@ dependencies: logging: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 1.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" node_preamble: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" package_config: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -62,4 +62,4 @@ dependencies: webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: b295 +# PUBSPEC CHECKSUM: 7b98 diff --git a/dev/manual_tests/pubspec.yaml b/dev/manual_tests/pubspec.yaml index 6cbcfe956aaf9..63e9270585302 100644 --- a/dev/manual_tests/pubspec.yaml +++ b/dev/manual_tests/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -37,4 +37,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 8b62 +# PUBSPEC CHECKSUM: cf63 diff --git a/dev/snippets/pubspec.yaml b/dev/snippets/pubspec.yaml index b22f176569aee..0723ec831957e 100644 --- a/dev/snippets/pubspec.yaml +++ b/dev/snippets/pubspec.yaml @@ -5,16 +5,16 @@ environment: sdk: '>=3.2.0-0 <4.0.0' dependencies: - analyzer: 6.5.0 + analyzer: 6.5.1 args: 2.5.0 dart_style: 2.3.6 file: 7.0.0 - meta: 1.14.0 + meta: 1.15.0 path: 1.9.0 platform: 3.1.4 process: 5.0.2 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -62,4 +62,4 @@ dev_dependencies: executables: snippets: -# PUBSPEC CHECKSUM: 86fd +# PUBSPEC CHECKSUM: 5001 diff --git a/dev/tools/gen_defaults/bin/gen_defaults.dart b/dev/tools/gen_defaults/bin/gen_defaults.dart index 5431e708f59fc..78918ca431a41 100644 --- a/dev/tools/gen_defaults/bin/gen_defaults.dart +++ b/dev/tools/gen_defaults/bin/gen_defaults.dart @@ -47,7 +47,6 @@ import 'package:gen_defaults/radio_template.dart'; import 'package:gen_defaults/search_bar_template.dart'; import 'package:gen_defaults/search_view_template.dart'; import 'package:gen_defaults/segmented_button_template.dart'; -import 'package:gen_defaults/slider_template.dart'; import 'package:gen_defaults/snackbar_template.dart'; import 'package:gen_defaults/surface_tint.dart'; import 'package:gen_defaults/switch_template.dart'; @@ -143,7 +142,8 @@ Future main(List args) async { SearchViewTemplate('SearchView', '$materialLib/search_anchor.dart', tokens).updateFile(); SegmentedButtonTemplate('md.comp.outlined-segmented-button', 'SegmentedButton', '$materialLib/segmented_button.dart', tokens).updateFile(); SnackbarTemplate('md.comp.snackbar', 'Snackbar', '$materialLib/snack_bar.dart', tokens).updateFile(); - SliderTemplate('md.comp.slider', 'Slider', '$materialLib/slider.dart', tokens).updateFile(); + // TODO(QuncCccccc): uncomment `SliderTemplate` once `Slider` widget is updated to match the latest M3 specs. + // SliderTemplate('md.comp.slider', 'Slider', '$materialLib/slider.dart', tokens).updateFile(); SurfaceTintTemplate('SurfaceTint', '$materialLib/elevation_overlay.dart', tokens).updateFile(); SwitchTemplate('Switch', '$materialLib/switch.dart', tokens).updateFile(); TimePickerTemplate('TimePicker', '$materialLib/time_picker.dart', tokens).updateFile(); diff --git a/dev/tools/gen_defaults/data/badge.json b/dev/tools/gen_defaults/data/badge.json index 3207fd9b093cc..f081c8bf7fb49 100644 --- a/dev/tools/gen_defaults/data/badge.json +++ b/dev/tools/gen_defaults/data/badge.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.badge.color": "error", "md.comp.badge.large.color": "error", diff --git a/dev/tools/gen_defaults/data/banner.json b/dev/tools/gen_defaults/data/banner.json index 93fda146718b5..5031b0306cdaf 100644 --- a/dev/tools/gen_defaults/data/banner.json +++ b/dev/tools/gen_defaults/data/banner.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.banner.container.color": "surfaceContainerLow", "md.comp.banner.container.elevation": "md.sys.elevation.level1", diff --git a/dev/tools/gen_defaults/data/bottom_app_bar.json b/dev/tools/gen_defaults/data/bottom_app_bar.json index 70b72375668c7..474e12b7e65e2 100644 --- a/dev/tools/gen_defaults/data/bottom_app_bar.json +++ b/dev/tools/gen_defaults/data/bottom_app_bar.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.bottom-app-bar.container.color": "surfaceContainer", "md.comp.bottom-app-bar.container.elevation": "md.sys.elevation.level2", diff --git a/dev/tools/gen_defaults/data/button_elevated.json b/dev/tools/gen_defaults/data/button_elevated.json index 030784a6e33db..4b872c6fc3295 100644 --- a/dev/tools/gen_defaults/data/button_elevated.json +++ b/dev/tools/gen_defaults/data/button_elevated.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.elevated-button.container.color": "surfaceContainerLow", "md.comp.elevated-button.container.elevation": "md.sys.elevation.level1", diff --git a/dev/tools/gen_defaults/data/button_filled.json b/dev/tools/gen_defaults/data/button_filled.json index 67826b8461597..3f15c8a42961d 100644 --- a/dev/tools/gen_defaults/data/button_filled.json +++ b/dev/tools/gen_defaults/data/button_filled.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.filled-button.container.color": "primary", "md.comp.filled-button.container.elevation": "md.sys.elevation.level0", diff --git a/dev/tools/gen_defaults/data/button_filled_tonal.json b/dev/tools/gen_defaults/data/button_filled_tonal.json index 092c68c3a30f9..020bf1def47bf 100644 --- a/dev/tools/gen_defaults/data/button_filled_tonal.json +++ b/dev/tools/gen_defaults/data/button_filled_tonal.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.filled-tonal-button.container.color": "secondaryContainer", "md.comp.filled-tonal-button.container.elevation": "md.sys.elevation.level0", diff --git a/dev/tools/gen_defaults/data/button_outlined.json b/dev/tools/gen_defaults/data/button_outlined.json index a7cf4f5f6732e..1703b06967ec3 100644 --- a/dev/tools/gen_defaults/data/button_outlined.json +++ b/dev/tools/gen_defaults/data/button_outlined.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.outlined-button.container.height": 40.0, "md.comp.outlined-button.container.shape": "md.sys.shape.corner.full", diff --git a/dev/tools/gen_defaults/data/button_text.json b/dev/tools/gen_defaults/data/button_text.json index ca199d7067f58..56144a6dba091 100644 --- a/dev/tools/gen_defaults/data/button_text.json +++ b/dev/tools/gen_defaults/data/button_text.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.text-button.container.height": 40.0, "md.comp.text-button.container.shape": "md.sys.shape.corner.full", diff --git a/dev/tools/gen_defaults/data/card_elevated.json b/dev/tools/gen_defaults/data/card_elevated.json index 198853d630839..567d654583a07 100644 --- a/dev/tools/gen_defaults/data/card_elevated.json +++ b/dev/tools/gen_defaults/data/card_elevated.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.elevated-card.container.color": "surfaceContainerLow", "md.comp.elevated-card.container.elevation": "md.sys.elevation.level1", diff --git a/dev/tools/gen_defaults/data/card_filled.json b/dev/tools/gen_defaults/data/card_filled.json index 297bf7f43f82e..413c055875e21 100644 --- a/dev/tools/gen_defaults/data/card_filled.json +++ b/dev/tools/gen_defaults/data/card_filled.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.filled-card.container.color": "surfaceContainerHighest", "md.comp.filled-card.container.elevation": "md.sys.elevation.level0", diff --git a/dev/tools/gen_defaults/data/card_outlined.json b/dev/tools/gen_defaults/data/card_outlined.json index 6c2697ca7d654..5ab477be41f50 100644 --- a/dev/tools/gen_defaults/data/card_outlined.json +++ b/dev/tools/gen_defaults/data/card_outlined.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.outlined-card.container.color": "surface", "md.comp.outlined-card.container.elevation": "md.sys.elevation.level0", diff --git a/dev/tools/gen_defaults/data/carousel_item.json b/dev/tools/gen_defaults/data/carousel_item.json index 7a48e0dd52679..db515a8e85a8b 100644 --- a/dev/tools/gen_defaults/data/carousel_item.json +++ b/dev/tools/gen_defaults/data/carousel_item.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.carousel-item.container.color": "surface", "md.comp.carousel-item.container.elevation": "md.sys.elevation.level0", diff --git a/dev/tools/gen_defaults/data/checkbox.json b/dev/tools/gen_defaults/data/checkbox.json index fcf0ea588fa74..558d6d650ab63 100644 --- a/dev/tools/gen_defaults/data/checkbox.json +++ b/dev/tools/gen_defaults/data/checkbox.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.checkbox.container.size": 18.0, "md.comp.checkbox.error.focus.state-layer.color": "error", diff --git a/dev/tools/gen_defaults/data/chip_assist.json b/dev/tools/gen_defaults/data/chip_assist.json index 5e9fab3db4bbd..860b2062ba909 100644 --- a/dev/tools/gen_defaults/data/chip_assist.json +++ b/dev/tools/gen_defaults/data/chip_assist.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.assist-chip.container.height": 32.0, "md.comp.assist-chip.container.shape": "md.sys.shape.corner.small", diff --git a/dev/tools/gen_defaults/data/chip_filter.json b/dev/tools/gen_defaults/data/chip_filter.json index 99129066a120d..c18baccee7ae8 100644 --- a/dev/tools/gen_defaults/data/chip_filter.json +++ b/dev/tools/gen_defaults/data/chip_filter.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.filter-chip.container.height": 32.0, "md.comp.filter-chip.container.shape": "md.sys.shape.corner.small", diff --git a/dev/tools/gen_defaults/data/chip_input.json b/dev/tools/gen_defaults/data/chip_input.json index b87f3aa40d308..6cbfb54538086 100644 --- a/dev/tools/gen_defaults/data/chip_input.json +++ b/dev/tools/gen_defaults/data/chip_input.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.input-chip.container.elevation": "md.sys.elevation.level0", "md.comp.input-chip.container.height": 32.0, diff --git a/dev/tools/gen_defaults/data/chip_suggestion.json b/dev/tools/gen_defaults/data/chip_suggestion.json index 4972a4a359b68..c9753fcba5299 100644 --- a/dev/tools/gen_defaults/data/chip_suggestion.json +++ b/dev/tools/gen_defaults/data/chip_suggestion.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.suggestion-chip.container.height": 32.0, "md.comp.suggestion-chip.container.shape": "md.sys.shape.corner.small", diff --git a/dev/tools/gen_defaults/data/color_dark.json b/dev/tools/gen_defaults/data/color_dark.json index 5994b26e1eb4b..397c003860d3f 100644 --- a/dev/tools/gen_defaults/data/color_dark.json +++ b/dev/tools/gen_defaults/data/color_dark.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.sys.color.background": "md.ref.palette.neutral6", "md.sys.color.error": "md.ref.palette.error80", diff --git a/dev/tools/gen_defaults/data/color_light.json b/dev/tools/gen_defaults/data/color_light.json index ce24e5d2bcc37..f64a69a872328 100644 --- a/dev/tools/gen_defaults/data/color_light.json +++ b/dev/tools/gen_defaults/data/color_light.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.sys.color.background": "md.ref.palette.neutral98", "md.sys.color.error": "md.ref.palette.error40", diff --git a/dev/tools/gen_defaults/data/date_picker_docked.json b/dev/tools/gen_defaults/data/date_picker_docked.json index 1b7615d186eed..8b88f21cf7526 100644 --- a/dev/tools/gen_defaults/data/date_picker_docked.json +++ b/dev/tools/gen_defaults/data/date_picker_docked.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.date-picker.docked.container.color": "surfaceContainerHigh", "md.comp.date-picker.docked.container.elevation": "md.sys.elevation.level3", diff --git a/dev/tools/gen_defaults/data/date_picker_input_modal.json b/dev/tools/gen_defaults/data/date_picker_input_modal.json index 932487c1e4503..0859932e43662 100644 --- a/dev/tools/gen_defaults/data/date_picker_input_modal.json +++ b/dev/tools/gen_defaults/data/date_picker_input_modal.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.date-input.modal.container.color": "surfaceContainerHigh", "md.comp.date-input.modal.container.elevation": "md.sys.elevation.level3", diff --git a/dev/tools/gen_defaults/data/date_picker_modal.json b/dev/tools/gen_defaults/data/date_picker_modal.json index 9bcfc0cc8d06f..88336deb7a0ac 100644 --- a/dev/tools/gen_defaults/data/date_picker_modal.json +++ b/dev/tools/gen_defaults/data/date_picker_modal.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.date-picker.modal.container.color": "surfaceContainerHigh", "md.comp.date-picker.modal.container.elevation": "md.sys.elevation.level3", diff --git a/dev/tools/gen_defaults/data/dialog.json b/dev/tools/gen_defaults/data/dialog.json index 73dffb6d717af..8a1169536d980 100644 --- a/dev/tools/gen_defaults/data/dialog.json +++ b/dev/tools/gen_defaults/data/dialog.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.dialog.action.focus.label-text.color": "primary", "md.comp.dialog.action.focus.state-layer.color": "primary", diff --git a/dev/tools/gen_defaults/data/dialog_fullscreen.json b/dev/tools/gen_defaults/data/dialog_fullscreen.json index 937ef818fe3df..d6d142eba1032 100644 --- a/dev/tools/gen_defaults/data/dialog_fullscreen.json +++ b/dev/tools/gen_defaults/data/dialog_fullscreen.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.full-screen-dialog.container.color": "surface", "md.comp.full-screen-dialog.container.elevation": "md.sys.elevation.level0", diff --git a/dev/tools/gen_defaults/data/divider.json b/dev/tools/gen_defaults/data/divider.json index d710ec7db94f3..1a0e48202d698 100644 --- a/dev/tools/gen_defaults/data/divider.json +++ b/dev/tools/gen_defaults/data/divider.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.divider.color": "outlineVariant", "md.comp.divider.thickness": 1.0 diff --git a/dev/tools/gen_defaults/data/elevation.json b/dev/tools/gen_defaults/data/elevation.json index 36eaa83ce0373..ccea559513dfb 100644 --- a/dev/tools/gen_defaults/data/elevation.json +++ b/dev/tools/gen_defaults/data/elevation.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.sys.elevation.level0": 0.0, "md.sys.elevation.level1": 1.0, diff --git a/dev/tools/gen_defaults/data/fab_extended_primary.json b/dev/tools/gen_defaults/data/fab_extended_primary.json index f292cb4e2ab23..a0747b155658b 100644 --- a/dev/tools/gen_defaults/data/fab_extended_primary.json +++ b/dev/tools/gen_defaults/data/fab_extended_primary.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.extended-fab.primary.container.color": "primaryContainer", "md.comp.extended-fab.primary.container.elevation": "md.sys.elevation.level3", diff --git a/dev/tools/gen_defaults/data/fab_large_primary.json b/dev/tools/gen_defaults/data/fab_large_primary.json index dff62d37c0d9c..632dedf260ef5 100644 --- a/dev/tools/gen_defaults/data/fab_large_primary.json +++ b/dev/tools/gen_defaults/data/fab_large_primary.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.fab.primary.large.container.color": "primaryContainer", "md.comp.fab.primary.large.container.elevation": "md.sys.elevation.level3", diff --git a/dev/tools/gen_defaults/data/fab_primary.json b/dev/tools/gen_defaults/data/fab_primary.json index 514aa72dad433..23064b8326e54 100644 --- a/dev/tools/gen_defaults/data/fab_primary.json +++ b/dev/tools/gen_defaults/data/fab_primary.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.fab.primary.container.color": "primaryContainer", "md.comp.fab.primary.container.elevation": "md.sys.elevation.level3", diff --git a/dev/tools/gen_defaults/data/fab_small_primary.json b/dev/tools/gen_defaults/data/fab_small_primary.json index ceedc57c3b194..4496ce86996ed 100644 --- a/dev/tools/gen_defaults/data/fab_small_primary.json +++ b/dev/tools/gen_defaults/data/fab_small_primary.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.fab.primary.small.container.color": "primaryContainer", "md.comp.fab.primary.small.container.elevation": "md.sys.elevation.level3", diff --git a/dev/tools/gen_defaults/data/icon_button.json b/dev/tools/gen_defaults/data/icon_button.json index 1d7ffcebf8de4..669b13928b4f1 100644 --- a/dev/tools/gen_defaults/data/icon_button.json +++ b/dev/tools/gen_defaults/data/icon_button.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.icon-button.disabled.icon.color": "onSurface", "md.comp.icon-button.disabled.icon.opacity": 0.38, diff --git a/dev/tools/gen_defaults/data/icon_button_filled.json b/dev/tools/gen_defaults/data/icon_button_filled.json index a2f694432df03..c834276b66dd5 100644 --- a/dev/tools/gen_defaults/data/icon_button_filled.json +++ b/dev/tools/gen_defaults/data/icon_button_filled.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.filled-icon-button.container.color": "primary", "md.comp.filled-icon-button.container.height": 40.0, diff --git a/dev/tools/gen_defaults/data/icon_button_filled_tonal.json b/dev/tools/gen_defaults/data/icon_button_filled_tonal.json index 8bb53c805db44..dab92e6cb0b58 100644 --- a/dev/tools/gen_defaults/data/icon_button_filled_tonal.json +++ b/dev/tools/gen_defaults/data/icon_button_filled_tonal.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.filled-tonal-icon-button.container.color": "secondaryContainer", "md.comp.filled-tonal-icon-button.container.height": 40.0, diff --git a/dev/tools/gen_defaults/data/icon_button_outlined.json b/dev/tools/gen_defaults/data/icon_button_outlined.json index 1a5a468efa946..8f2f48fe4d399 100644 --- a/dev/tools/gen_defaults/data/icon_button_outlined.json +++ b/dev/tools/gen_defaults/data/icon_button_outlined.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.outlined-icon-button.container.height": 40.0, "md.comp.outlined-icon-button.container.shape": "md.sys.shape.corner.full", diff --git a/dev/tools/gen_defaults/data/list.json b/dev/tools/gen_defaults/data/list.json index 391869ecb0523..3a55a1099735f 100644 --- a/dev/tools/gen_defaults/data/list.json +++ b/dev/tools/gen_defaults/data/list.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.list.divider.leading-space": 16.0, "md.comp.list.divider.trailing-space": 16.0, diff --git a/dev/tools/gen_defaults/data/menu.json b/dev/tools/gen_defaults/data/menu.json index 608dde4514791..455d94e08c16e 100644 --- a/dev/tools/gen_defaults/data/menu.json +++ b/dev/tools/gen_defaults/data/menu.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.menu.container.color": "surfaceContainer", "md.comp.menu.container.elevation": "md.sys.elevation.level2", diff --git a/dev/tools/gen_defaults/data/motion.json b/dev/tools/gen_defaults/data/motion.json index 158b2d0627a29..acd5aca1a6e56 100644 --- a/dev/tools/gen_defaults/data/motion.json +++ b/dev/tools/gen_defaults/data/motion.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.sys.motion.duration.extra-long1Ms": 700.0, "md.sys.motion.duration.extra-long2Ms": 800.0, diff --git a/dev/tools/gen_defaults/data/navigation_bar.json b/dev/tools/gen_defaults/data/navigation_bar.json index 487e4bfc06074..335fa763d4071 100644 --- a/dev/tools/gen_defaults/data/navigation_bar.json +++ b/dev/tools/gen_defaults/data/navigation_bar.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.navigation-bar.active.focus.icon.color": "onSecondaryContainer", "md.comp.navigation-bar.active.focus.label-text.color": "onSurface", diff --git a/dev/tools/gen_defaults/data/navigation_drawer.json b/dev/tools/gen_defaults/data/navigation_drawer.json index c3405a1fdaae6..bdac0e0194399 100644 --- a/dev/tools/gen_defaults/data/navigation_drawer.json +++ b/dev/tools/gen_defaults/data/navigation_drawer.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.navigation-drawer.active.focus.icon.color": "onSecondaryContainer", "md.comp.navigation-drawer.active.focus.label-text.color": "onSecondaryContainer", diff --git a/dev/tools/gen_defaults/data/navigation_rail.json b/dev/tools/gen_defaults/data/navigation_rail.json index b3f3e08a48e87..b4d79b964ce36 100644 --- a/dev/tools/gen_defaults/data/navigation_rail.json +++ b/dev/tools/gen_defaults/data/navigation_rail.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.navigation-rail.active.focus.icon.color": "onSecondaryContainer", "md.comp.navigation-rail.active.focus.label-text.color": "onSurface", diff --git a/dev/tools/gen_defaults/data/navigation_tab_primary.json b/dev/tools/gen_defaults/data/navigation_tab_primary.json index 44f4d67c0481c..11b5550c8993a 100644 --- a/dev/tools/gen_defaults/data/navigation_tab_primary.json +++ b/dev/tools/gen_defaults/data/navigation_tab_primary.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.primary-navigation-tab.active.focus.state-layer.color": "primary", "md.comp.primary-navigation-tab.active.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity", diff --git a/dev/tools/gen_defaults/data/navigation_tab_secondary.json b/dev/tools/gen_defaults/data/navigation_tab_secondary.json index e52e8636e89f6..239058b698f7f 100644 --- a/dev/tools/gen_defaults/data/navigation_tab_secondary.json +++ b/dev/tools/gen_defaults/data/navigation_tab_secondary.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.secondary-navigation-tab.active-indicator.color": "primary", "md.comp.secondary-navigation-tab.active-indicator.height": 2.0, diff --git a/dev/tools/gen_defaults/data/palette.json b/dev/tools/gen_defaults/data/palette.json index b43a47159d14f..d415c0d69415a 100644 --- a/dev/tools/gen_defaults/data/palette.json +++ b/dev/tools/gen_defaults/data/palette.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.ref.palette.black": "0xFF000000", "md.ref.palette.blue0": "0xFF000000", diff --git a/dev/tools/gen_defaults/data/progress_indicator.json b/dev/tools/gen_defaults/data/progress_indicator.json index c0b3a2dfac7ef..c7e39cf5a32aa 100644 --- a/dev/tools/gen_defaults/data/progress_indicator.json +++ b/dev/tools/gen_defaults/data/progress_indicator.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.progress-indicator.active-indicator.color": "primary", "md.comp.progress-indicator.active-indicator.shape": "md.sys.shape.corner.full", diff --git a/dev/tools/gen_defaults/data/radio_button.json b/dev/tools/gen_defaults/data/radio_button.json index 4abf823de20db..ccc8e67c27517 100644 --- a/dev/tools/gen_defaults/data/radio_button.json +++ b/dev/tools/gen_defaults/data/radio_button.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.radio-button.disabled.selected.icon.color": "onSurface", "md.comp.radio-button.disabled.selected.icon.opacity": 0.38, diff --git a/dev/tools/gen_defaults/data/search_bar.json b/dev/tools/gen_defaults/data/search_bar.json index 64c468f3c13a1..c45d82e35957d 100644 --- a/dev/tools/gen_defaults/data/search_bar.json +++ b/dev/tools/gen_defaults/data/search_bar.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.search-bar.avatar.shape": "md.sys.shape.corner.full", "md.comp.search-bar.avatar.size": 30.0, diff --git a/dev/tools/gen_defaults/data/search_view.json b/dev/tools/gen_defaults/data/search_view.json index 4fc737152a613..6c75abf044bb6 100644 --- a/dev/tools/gen_defaults/data/search_view.json +++ b/dev/tools/gen_defaults/data/search_view.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.search-view.container.color": "surfaceContainerHigh", "md.comp.search-view.container.elevation": "md.sys.elevation.level3", diff --git a/dev/tools/gen_defaults/data/segmented_button_outlined.json b/dev/tools/gen_defaults/data/segmented_button_outlined.json index 68d22f83cf697..8260697084936 100644 --- a/dev/tools/gen_defaults/data/segmented_button_outlined.json +++ b/dev/tools/gen_defaults/data/segmented_button_outlined.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.outlined-segmented-button.container.height": 40.0, "md.comp.outlined-segmented-button.disabled.icon.color": "onSurface", diff --git a/dev/tools/gen_defaults/data/shape.json b/dev/tools/gen_defaults/data/shape.json index 6c3a1b6977d6c..a0c81ccc85e28 100644 --- a/dev/tools/gen_defaults/data/shape.json +++ b/dev/tools/gen_defaults/data/shape.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.sys.shape.corner.extra-large": { "family": "SHAPE_FAMILY_ROUNDED_CORNERS", diff --git a/dev/tools/gen_defaults/data/sheet_bottom.json b/dev/tools/gen_defaults/data/sheet_bottom.json index 5b8b3417c37ad..f53c62f0983a0 100644 --- a/dev/tools/gen_defaults/data/sheet_bottom.json +++ b/dev/tools/gen_defaults/data/sheet_bottom.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.sheet.bottom.docked.container.color": "surfaceContainerLow", "md.comp.sheet.bottom.docked.container.shape": "md.sys.shape.corner.extra-large.top", diff --git a/dev/tools/gen_defaults/data/slider.json b/dev/tools/gen_defaults/data/slider.json index 9dfda742b1468..d47f996ae75d7 100644 --- a/dev/tools/gen_defaults/data/slider.json +++ b/dev/tools/gen_defaults/data/slider.json @@ -1,49 +1,50 @@ { - "version": "v0_206", + "version": "4_0_0", + "md.comp.slider.active.handle.height": 44.0, + "md.comp.slider.active.handle.leading-space": 6.0, + "md.comp.slider.active.handle.padding": 6.0, + "md.comp.slider.active.handle.shape": "md.sys.shape.corner.full", + "md.comp.slider.active.handle.trailing-space": 6.0, + "md.comp.slider.active.handle.width": 4.0, "md.comp.slider.active.track.color": "primary", - "md.comp.slider.active.track.height": 4.0, + "md.comp.slider.active.track.height": 16.0, "md.comp.slider.active.track.shape": "md.sys.shape.corner.full", + "md.comp.slider.active.track.shape.leading": "md.sys.shape.corner.full", "md.comp.slider.disabled.active.track.color": "onSurface", "md.comp.slider.disabled.active.track.opacity": 0.38, "md.comp.slider.disabled.handle.color": "onSurface", - "md.comp.slider.disabled.handle.elevation": "md.sys.elevation.level0", "md.comp.slider.disabled.handle.opacity": 0.38, + "md.comp.slider.disabled.handle.width": 4.0, "md.comp.slider.disabled.inactive.track.color": "onSurface", "md.comp.slider.disabled.inactive.track.opacity": 0.12, - "md.comp.slider.focus.handle.color": "primary", - "md.comp.slider.focus.state-layer.color": "primary", - "md.comp.slider.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity", + "md.comp.slider.disabled.stop-indicator.color": "onSurface", + "md.comp.slider.disabled.stop-indicator.color-selected": "onInverseSurface", + "md.comp.slider.focus.active.track.color": "primary", + "md.comp.slider.focus.handle.width": 2.0, + "md.comp.slider.focus.inactive.track.color": "secondaryContainer", + "md.comp.slider.focus.stop.color": "primary", "md.comp.slider.handle.color": "primary", - "md.comp.slider.handle.elevation": "md.sys.elevation.level1", - "md.comp.slider.handle.height": 20.0, - "md.comp.slider.handle.shadow-color": "shadow", + "md.comp.slider.handle.height": 44.0, "md.comp.slider.handle.shape": "md.sys.shape.corner.full", - "md.comp.slider.handle.width": 20.0, - "md.comp.slider.hover.handle.color": "primary", - "md.comp.slider.hover.state-layer.color": "primary", - "md.comp.slider.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity", - "md.comp.slider.inactive.track.color": "surfaceContainerHighest", - "md.comp.slider.inactive.track.height": 4.0, + "md.comp.slider.handle.width": 4.0, + "md.comp.slider.hover.handle.width": 4.0, + "md.comp.slider.inactive.track.color": "secondaryContainer", + "md.comp.slider.inactive.track.height": 16.0, "md.comp.slider.inactive.track.shape": "md.sys.shape.corner.full", - "md.comp.slider.label.container.color": "primary", - "md.comp.slider.label.container.elevation": "md.sys.elevation.level0", - "md.comp.slider.label.container.height": 28.0, - "md.comp.slider.label.label-text.color": "onPrimary", - "md.comp.slider.label.label-text.text-style": "labelMedium", + "md.comp.slider.label.label-text.color": "onInverseSurface", + "md.comp.slider.pressed.active.track.color": "primary", "md.comp.slider.pressed.handle.color": "primary", - "md.comp.slider.pressed.state-layer.color": "primary", - "md.comp.slider.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity", - "md.comp.slider.state-layer.size": 40.0, - "md.comp.slider.track.elevation": "md.sys.elevation.level0", - "md.comp.slider.with-overlap.handle.outline.color": "onPrimary", - "md.comp.slider.with-overlap.handle.outline.width": 1.0, - "md.comp.slider.with-tick-marks.active.container.color": "onPrimary", - "md.comp.slider.with-tick-marks.active.container.opacity": 0.38, - "md.comp.slider.with-tick-marks.container.shape": "md.sys.shape.corner.full", - "md.comp.slider.with-tick-marks.container.size": 2.0, - "md.comp.slider.with-tick-marks.disabled.container.color": "onSurface", - "md.comp.slider.with-tick-marks.disabled.container.opacity": 0.38, - "md.comp.slider.with-tick-marks.inactive.container.color": "onSurfaceVariant", - "md.comp.slider.with-tick-marks.inactive.container.opacity": 0.38 + "md.comp.slider.pressed.handle.width": 2.0, + "md.comp.slider.pressed.inactive.track.color": "secondaryContainer", + "md.comp.slider.slider-active-handle-color": "primary", + "md.comp.slider.stop-indicator.color": "secondaryContainer", + "md.comp.slider.stop-indicator.color-selected": "secondaryContainer", + "md.comp.slider.stop-indicator.shape": "md.sys.shape.corner.full", + "md.comp.slider.stop-indicator.size": 4.0, + "md.comp.slider.stop-indicator.trailing-space": 6.0, + "md.comp.slider.value-indicator.active.bottom-space": 12.0, + "md.comp.slider.value-indicator.container.color": "inverseSurface", + "md.comp.slider.value-indicator.label.label-text.color": "onInverseSurface", + "md.comp.slider.value-indicator.label.label-text.text-style": "labelLarge" } diff --git a/dev/tools/gen_defaults/data/snackbar.json b/dev/tools/gen_defaults/data/snackbar.json index d2eb724542dba..22d1bd1f0b5e5 100644 --- a/dev/tools/gen_defaults/data/snackbar.json +++ b/dev/tools/gen_defaults/data/snackbar.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.snackbar.action.focus.label-text.color": "inversePrimary", "md.comp.snackbar.action.focus.state-layer.color": "inversePrimary", diff --git a/dev/tools/gen_defaults/data/state.json b/dev/tools/gen_defaults/data/state.json index 53274883b4d28..c265d8a9d3182 100644 --- a/dev/tools/gen_defaults/data/state.json +++ b/dev/tools/gen_defaults/data/state.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.sys.state.dragged.state-layer-opacity": 0.16, "md.sys.state.focus.state-layer-opacity": 0.1, diff --git a/dev/tools/gen_defaults/data/switch.json b/dev/tools/gen_defaults/data/switch.json index cf018bd80cac8..cfc1d64076470 100644 --- a/dev/tools/gen_defaults/data/switch.json +++ b/dev/tools/gen_defaults/data/switch.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.switch.disabled.selected.handle.color": "surface", "md.comp.switch.disabled.selected.handle.opacity": 1.0, diff --git a/dev/tools/gen_defaults/data/text_field_filled.json b/dev/tools/gen_defaults/data/text_field_filled.json index 25a144850d97b..ca4cf5b14f7b3 100644 --- a/dev/tools/gen_defaults/data/text_field_filled.json +++ b/dev/tools/gen_defaults/data/text_field_filled.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.filled-text-field.active-indicator.color": "onSurfaceVariant", "md.comp.filled-text-field.active-indicator.height": 1.0, diff --git a/dev/tools/gen_defaults/data/text_field_outlined.json b/dev/tools/gen_defaults/data/text_field_outlined.json index 3b6ba76fb2788..a75af88ccbfa6 100644 --- a/dev/tools/gen_defaults/data/text_field_outlined.json +++ b/dev/tools/gen_defaults/data/text_field_outlined.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.outlined-text-field.caret.color": "primary", "md.comp.outlined-text-field.container.shape": "md.sys.shape.corner.extra-small", diff --git a/dev/tools/gen_defaults/data/text_style.json b/dev/tools/gen_defaults/data/text_style.json index 42aaa93b50053..4f4d45abf24b6 100644 --- a/dev/tools/gen_defaults/data/text_style.json +++ b/dev/tools/gen_defaults/data/text_style.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.sys.typescale.body-large.font": "md.ref.typeface.plain", "md.sys.typescale.body-large.line-height": 24.0, diff --git a/dev/tools/gen_defaults/data/time_picker.json b/dev/tools/gen_defaults/data/time_picker.json index 94be3c4a664d7..ca322467b644a 100644 --- a/dev/tools/gen_defaults/data/time_picker.json +++ b/dev/tools/gen_defaults/data/time_picker.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.time-picker.clock-dial.color": "surfaceContainerHighest", "md.comp.time-picker.clock-dial.container.size": 256.0, diff --git a/dev/tools/gen_defaults/data/top_app_bar_large.json b/dev/tools/gen_defaults/data/top_app_bar_large.json index a863f97672b6c..c6e62801444ed 100644 --- a/dev/tools/gen_defaults/data/top_app_bar_large.json +++ b/dev/tools/gen_defaults/data/top_app_bar_large.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.top-app-bar.large.container.color": "surface", "md.comp.top-app-bar.large.container.elevation": "md.sys.elevation.level0", diff --git a/dev/tools/gen_defaults/data/top_app_bar_medium.json b/dev/tools/gen_defaults/data/top_app_bar_medium.json index edd86180c003a..f2a14c9b2adcf 100644 --- a/dev/tools/gen_defaults/data/top_app_bar_medium.json +++ b/dev/tools/gen_defaults/data/top_app_bar_medium.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.top-app-bar.medium.container.color": "surface", "md.comp.top-app-bar.medium.container.elevation": "md.sys.elevation.level0", diff --git a/dev/tools/gen_defaults/data/top_app_bar_small.json b/dev/tools/gen_defaults/data/top_app_bar_small.json index c4f27af4f6d41..418f892f6adc5 100644 --- a/dev/tools/gen_defaults/data/top_app_bar_small.json +++ b/dev/tools/gen_defaults/data/top_app_bar_small.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.comp.top-app-bar.small.container.color": "surface", "md.comp.top-app-bar.small.container.elevation": "md.sys.elevation.level0", diff --git a/dev/tools/gen_defaults/data/typeface.json b/dev/tools/gen_defaults/data/typeface.json index c9e57078a3efe..75e5237836594 100644 --- a/dev/tools/gen_defaults/data/typeface.json +++ b/dev/tools/gen_defaults/data/typeface.json @@ -1,5 +1,5 @@ { - "version": "v2_3_5", + "version": "4_0_0", "md.ref.typeface.brand": "Roboto", "md.ref.typeface.plain": "Roboto", diff --git a/dev/tools/gen_defaults/generated/used_tokens.csv b/dev/tools/gen_defaults/generated/used_tokens.csv index 3e9c744667827..8b674a4fc6b7c 100644 --- a/dev/tools/gen_defaults/generated/used_tokens.csv +++ b/dev/tools/gen_defaults/generated/used_tokens.csv @@ -1,4 +1,4 @@ -Versions used, v2_3_5, v0_206 +Versions used, 4_0_0 md.comp.assist-chip.container.shape, md.comp.assist-chip.disabled.label-text.color, md.comp.assist-chip.elevated.container.color, @@ -620,30 +620,6 @@ md.comp.sheet.bottom.docked.drag-handle.height, md.comp.sheet.bottom.docked.drag-handle.width, md.comp.sheet.bottom.docked.modal.container.elevation, md.comp.sheet.bottom.docked.standard.container.elevation, -md.comp.slider.active.track.color, -md.comp.slider.active.track.height, -md.comp.slider.disabled.active.track.color, -md.comp.slider.disabled.active.track.opacity, -md.comp.slider.disabled.handle.color, -md.comp.slider.disabled.handle.opacity, -md.comp.slider.disabled.inactive.track.color, -md.comp.slider.disabled.inactive.track.opacity, -md.comp.slider.focus.state-layer.color, -md.comp.slider.focus.state-layer.opacity, -md.comp.slider.handle.color, -md.comp.slider.hover.state-layer.color, -md.comp.slider.hover.state-layer.opacity, -md.comp.slider.inactive.track.color, -md.comp.slider.label.label-text.color, -md.comp.slider.label.label-text.text-style, -md.comp.slider.pressed.state-layer.color, -md.comp.slider.pressed.state-layer.opacity, -md.comp.slider.with-tick-marks.active.container.color, -md.comp.slider.with-tick-marks.active.container.opacity, -md.comp.slider.with-tick-marks.disabled.container.color, -md.comp.slider.with-tick-marks.disabled.container.opacity, -md.comp.slider.with-tick-marks.inactive.container.color, -md.comp.slider.with-tick-marks.inactive.container.opacity, md.comp.snackbar.action.focus.label-text.color, md.comp.snackbar.action.hover.label-text.color, md.comp.snackbar.action.label-text.color, diff --git a/dev/tools/gen_defaults/pubspec.yaml b/dev/tools/gen_defaults/pubspec.yaml index 16f32516a09de..383262083c1c6 100644 --- a/dev/tools/gen_defaults/pubspec.yaml +++ b/dev/tools/gen_defaults/pubspec.yaml @@ -12,8 +12,8 @@ dev_dependencies: path: 1.9.0 test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -29,7 +29,7 @@ dev_dependencies: js: 0.7.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 1.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" node_preamble: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" package_config: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -56,4 +56,4 @@ dev_dependencies: webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 4c64 +# PUBSPEC CHECKSUM: 2367 diff --git a/dev/tools/gen_keycodes/pubspec.yaml b/dev/tools/gen_keycodes/pubspec.yaml index 98921d446ba63..aa40ecdb5e58d 100644 --- a/dev/tools/gen_keycodes/pubspec.yaml +++ b/dev/tools/gen_keycodes/pubspec.yaml @@ -7,7 +7,7 @@ environment: dependencies: args: 2.5.0 http: 0.13.6 - meta: 1.14.0 + meta: 1.15.0 path: 1.9.0 platform: 3.1.4 @@ -23,8 +23,8 @@ dev_dependencies: test: 1.25.5 test_api: 0.7.1 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -58,4 +58,4 @@ dev_dependencies: webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 485f +# PUBSPEC CHECKSUM: a962 diff --git a/dev/tools/pubspec.yaml b/dev/tools/pubspec.yaml index d3a95485abcdb..8a44c568750a3 100644 --- a/dev/tools/pubspec.yaml +++ b/dev/tools/pubspec.yaml @@ -9,7 +9,7 @@ dependencies: args: 2.5.0 http: 0.13.6 intl: 0.19.0 - meta: 1.14.0 + meta: 1.15.0 path: 1.9.0 process: 5.0.2 pub_semver: 2.1.4 @@ -31,8 +31,8 @@ dev_dependencies: test: 1.25.5 test_api: 0.7.1 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -62,4 +62,4 @@ dev_dependencies: web_socket_channel: 2.4.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 9f76 +# PUBSPEC CHECKSUM: ed79 diff --git a/dev/tools/vitool/pubspec.yaml b/dev/tools/vitool/pubspec.yaml index 0d0a8fb21d5e8..a3507a5a240d0 100644 --- a/dev/tools/vitool/pubspec.yaml +++ b/dev/tools/vitool/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" petitparser: 6.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -40,4 +40,4 @@ dev_dependencies: test_api: 0.7.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 14.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: bc0b +# PUBSPEC CHECKSUM: 390c diff --git a/dev/tracing_tests/pubspec.yaml b/dev/tracing_tests/pubspec.yaml index 333dc99530a3b..e9d9734bf15cb 100644 --- a/dev/tracing_tests/pubspec.yaml +++ b/dev/tracing_tests/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -36,4 +36,4 @@ dev_dependencies: term_glyph: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_api: 0.7.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 8b62 +# PUBSPEC CHECKSUM: cf63 diff --git a/docs/unsorted_wiki/Flutter-Self-Service-Index.md b/docs/Flutter-Self-Service-Index.md similarity index 94% rename from docs/unsorted_wiki/Flutter-Self-Service-Index.md rename to docs/Flutter-Self-Service-Index.md index 0a0e921fa9094..d382ceaa6b460 100644 --- a/docs/unsorted_wiki/Flutter-Self-Service-Index.md +++ b/docs/Flutter-Self-Service-Index.md @@ -22,7 +22,7 @@ Flutter provides multiple functionality through self-service services. Most of t Flutter organization members - Anyone with write access to the flutter organization resources. + [Anyone with write access to the flutter organization resources.](./contributing/Contributor-access.md) @@ -66,7 +66,7 @@ Flutter provides multiple functionality through self-service services. Most of t Link - Top level folder of the GitHub repositories. E.g. flutter/flutter. + Top level folder of the GitHub repositories. E.g. flutter/flutter. @@ -100,7 +100,7 @@ Flutter provides multiple functionality through self-service services. Most of t Flutter contributors - Link + [Link](./infra/Flutter-FirebaseLab-Tests.md) These configurations go directly in the .ci.yaml file of flutter/flutter repository. @@ -112,7 +112,7 @@ Flutter provides multiple functionality through self-service services. Most of t Flutter contributors - Link + [Link](./engine/release/Code-signing-metadata.md) GN files and global generator scripts in the flutter/engine repository. @@ -124,7 +124,7 @@ Flutter provides multiple functionality through self-service services. Most of t Flutter contributors - Link + [Link](./platforms/android/Testing-Android-Changes-in-the-Devicelab-on-an-Emulator.md) Flutter Github Wiki page under the “Android Development” Section. diff --git a/docs/unsorted_wiki/In-case-of-emergency.md b/docs/In-case-of-emergency.md similarity index 85% rename from docs/unsorted_wiki/In-case-of-emergency.md rename to docs/In-case-of-emergency.md index ada8ee74da482..74f92842b149c 100644 --- a/docs/unsorted_wiki/In-case-of-emergency.md +++ b/docs/In-case-of-emergency.md @@ -1,6 +1,6 @@ ## If flutter.dev is down -If one of our web sites is down, please ping `@emergency` on our [[Discord server|Chat]]. +If one of our web sites is down, please ping `@emergency` on our [Discord server](./contributing/Chat.md). ## If you find a security vulnerability diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000000000..7125531dede3c --- /dev/null +++ b/docs/README.md @@ -0,0 +1,36 @@ +This wiki is primarily aimed at engineers building or making contributions to Flutter. + +If you are new to Flutter, then you will find more general information on the Flutter project, including tutorials and samples, on our Web site at [flutter.dev](https://flutter.dev). For specific information about Flutter's APIs, consider our API reference which can be found at the [api.flutter.dev](https://api.flutter.dev/). + +If you want to know what we're likely to do in the future, our [roadmap](./roadmap/Roadmap.md) may be of interest. + +If you intend to contribute to Flutter, welcome! You are encouraged to start with [our contributor guide](../CONTRIBUTING.md), which helps onboard new team members. It points to the most relevant pages on this wiki. You are also invited to join our [Discord](./contributing/Chat.md) server. + + +## Index of notable sections + +* [Actionable bugs](./triage/README.md#what-makes-an-issue-actionable), and the closing of unactionable bugs +* [Breaking changes](./contributing/Tree-hygiene.md#handling-breaking-changes) +* [Cherrypick process](./releases/Flutter-Cherrypick-Process.md) +* [Closing issues](./contributing/issue_hygiene/README.md#closing-issues) +* [Dashboards](./infra/Dashboards.md) +* [Debugging a broken engine autoroll](./engine/Debugging-the-engine.md#bisecting-a-roll-failure) +* [Deprecations](./contributing/Tree-hygiene.md#deprecations) +* [Design documents](./contributing/Design-Documents.md) +* [Discord](./contributing/Chat.md) +* [Engineering Philosophy](./contributing/Style-guide-for-Flutter-repo.md#philosophy) +* [Flaky tests](./contributing/issue_hygiene/README.md#flaky-tests) +* [flutter.dev is down](./In-case-of-emergency.md) +* [Issue prioritization](./contributing/issue_hygiene/README.md#priorities) +* [Labels](./contributing/issue_hygiene/README.md#labels) +* [Milestones](./contributing/issue_hygiene/README.md#milestones) +* [Plugin compatibility policy](./contributing/Style-guide-for-Flutter-repo.md#plugin-compatibility) +* [Reviewing code](./contributing/Tree-hygiene.md#getting-a-code-review) +* [RFC process](./contributing/issue_hygiene/README.md#how-to-propose-a-specific-change) +* [Status of popular issues](./contributing/issue_hygiene/Popular-issues.md) +* [Submitting code, process for](./contributing/Tree-hygiene.md#overview) +* [Support levels, definitions of](./about/Values.md#support) +* [Symbolicating stack traces](./engine/Crashes.md) +* [Threading in the Engine](./about/The-Engine-architecture.md#threading) +* [When will my bug be fixed?](./contributing/issue_hygiene/README.md#when-will-my-bug-be-fixed) +* [Security best practices](./infra/Security.md#best-practices) \ No newline at end of file diff --git a/docs/unsorted_wiki/Flutter's-repository-architecture.md b/docs/about/Flutter's-repository-architecture.md similarity index 100% rename from docs/unsorted_wiki/Flutter's-repository-architecture.md rename to docs/about/Flutter's-repository-architecture.md diff --git a/docs/unsorted_wiki/Glossary.md b/docs/about/Glossary.md similarity index 98% rename from docs/unsorted_wiki/Glossary.md rename to docs/about/Glossary.md index 8ab58fb1a0b01..14656ffcb0152 100644 --- a/docs/unsorted_wiki/Glossary.md +++ b/docs/about/Glossary.md @@ -26,7 +26,7 @@ Here are some terms that we use in the Flutter project and what they mean: - **Modular application delivery**. The ability to package a single app into multiple separate archives when compiling it, and download them independently as needed. -- **NTE**. "Needs-Tests Exemption". Indicates that a PR does not need tests, typically because the PR is refactoring code without changing the semantics of the code, or because it actually does have tests but the automated systems didn't recognize them. A test exemption consists of a comment on the PR that has a line that starts with the string `test-exempt: ` followed by an explanation of why, from someone who is allowed to give test exemptions. A bot will add a comment to a PR if a test exemption is required. See [[Tree Hygiene]] for instructions on getting test exemptions. +- **NTE**. "Needs-Tests Exemption". Indicates that a PR does not need tests, typically because the PR is refactoring code without changing the semantics of the code, or because it actually does have tests but the automated systems didn't recognize them. A test exemption consists of a comment on the PR that has a line that starts with the string `test-exempt: ` followed by an explanation of why, from someone who is allowed to give test exemptions. A bot will add a comment to a PR if a test exemption is required. See [Tree Hygiene](../contributing/Tree-hygiene.md) for instructions on getting test exemptions. - **Out-of-band (OOB) failure**. A test failure in our CI that is caused by some change external to the repository, not the failing commit (or flake). For instance, an infrastructure change or a change to an external server used by tests could cause an out-of-band failure. In general, CI should minimize the possibility of out-of-band failures by being as hermetic as possible. diff --git a/docs/unsorted_wiki/Project-teams.md b/docs/about/Project-teams.md similarity index 71% rename from docs/unsorted_wiki/Project-teams.md rename to docs/about/Project-teams.md index cde2126dbb9c4..dddd6ab8cc64b 100644 --- a/docs/unsorted_wiki/Project-teams.md +++ b/docs/about/Project-teams.md @@ -2,15 +2,15 @@ The Flutter project has many teams, including, but not limited to: * Design languages, covering: - * The material library ([flutter/flutter packages/flutter/lib/src/material](https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/material); label ["f: material design"](https://github.com/flutter/flutter/labels/f%3A%20material%20design)) + * The material library ([flutter/flutter packages/flutter/lib/src/material](https://github.com/flutter/flutter/blob/main/packages/flutter/lib/src/material); label ["f: material design"](https://github.com/flutter/flutter/labels/f%3A%20material%20design)) - * The cupertino library ([flutter/flutter packages/flutter/lib/src/cupertino](https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/cupertino); label ["f: cupertino"](https://github.com/flutter/flutter/labels/f%3A%20cupertino)) + * The cupertino library ([flutter/flutter packages/flutter/lib/src/cupertino](https://github.com/flutter/flutter/blob/main/packages/flutter/lib/src/cupertino); label ["f: cupertino"](https://github.com/flutter/flutter/labels/f%3A%20cupertino)) -* The Flutter framework (code in [flutter/flutter packages/flutter/lib/src/widgets](https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets), [...rendering/](https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/rendering), [...painting/](https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/painting), etc; label ["framework"](https://github.com/flutter/flutter/labels/framework)) +* The Flutter framework (code in [flutter/flutter packages/flutter/lib/src/widgets](https://github.com/flutter/flutter/blob/main/packages/flutter/lib/src/widgets), [...rendering/](https://github.com/flutter/flutter/blob/main/packages/flutter/lib/src/rendering), [...painting/](https://github.com/flutter/flutter/blob/main/packages/flutter/lib/src/painting), etc; label ["framework"](https://github.com/flutter/flutter/labels/framework)) -* The Flutter command line tool ([flutter/flutter packages/flutter_tools](https://github.com/flutter/flutter/blob/master/packages/flutter_tools/), label ["tool"](https://github.com/flutter/flutter/labels/tool)) +* The Flutter command line tool ([flutter/flutter packages/flutter_tools](https://github.com/flutter/flutter/blob/main/packages/flutter_tools/), label ["tool"](https://github.com/flutter/flutter/labels/tool)) -* Ecosystem ([flutter/plugins](https://github.com/flutter/plugins), [flutter/packages](https://github.com/flutter/packages), [the plugin infrastructure in flutter/flutter](https://github.com/flutter/flutter/tree/master/packages/flutter/lib/src/services); labels ["plugins"](https://github.com/flutter/flutter/labels/plugins), and ["packages"](https://github.com/flutter/flutter/labels/packages)) +* Ecosystem ([flutter/plugins](https://github.com/flutter/plugins), [flutter/packages](https://github.com/flutter/packages), [the plugin infrastructure in flutter/flutter](https://github.com/flutter/flutter/tree/main/packages/flutter/lib/src/services); labels ["plugins"](https://github.com/flutter/flutter/labels/plugins), and ["packages"](https://github.com/flutter/flutter/labels/packages)) * The Engine ([flutter/engine](https://github.com/flutter/engine) and [flutter/buildroot](https://github.com/flutter/buildroot/); label ["engine"](https://github.com/flutter/flutter/labels/engine)) @@ -26,18 +26,18 @@ The Flutter project has many teams, including, but not limited to: * Developer Relations (e.g. [the samples repo](https://github.com/flutter/samples/), [docs.flutter.dev](https://docs.flutter.dev/)) -* Infrastructure (mainly [flutter/cocoon](https://github.com/flutter/cocoon) and [flutter/flutter dev/devicelab](https://github.com/flutter/flutter/tree/master/dev), label ["team: infra"](https://github.com/flutter/flutter/labels/team%3A%20infra)) +* Infrastructure (mainly [flutter/cocoon](https://github.com/flutter/cocoon) and [flutter/flutter dev/devicelab](https://github.com/flutter/flutter/tree/main/dev), label ["team: infra"](https://github.com/flutter/flutter/labels/team%3A%20infra)) There are also specific cross-cutting areas of work that may have their own subteam and that affect multiple subteams (e.g. accessibility, performance, etc). -We also work closely with other projects, such as [Dart](https://dart.dev) and [Skia](https://skia.org), and with many [customers](https://github.com/flutter/flutter/wiki/Issue-hygiene#customers). +We also work closely with other projects, such as [Dart](https://dart.dev) and [Skia](https://skia.org), and with many [customers](../contributing/issue_hygiene/README.md#customers). ## Responsibilities Subteams are responsible for reviewing PRs in their area, triaging issues, and scheduling work. How subteams organize themselves is not defined by this document. This document does not attempt to impose a process, merely a set of responsibilities. -See the [[Roadmap]] and [[What should I work on?]] pages for details on how to prioritize work. +See the [Roadmap](../roadmap/Roadmap.md) and [What should I work on?](../contributing/What-should-I-work-on.md) pages for details on how to prioritize work. ### Reviewing PRs @@ -47,7 +47,7 @@ Please review PRs in your area (based on label and/or repositories). The goal is Please triage issues with your label on a regular basis. You may do this in whatever manner you prefer (on your phone while in line for lunch, as a team exercise in a dedicated meeting room, by having some sort of team rotation, whatever). -You must cover these bug lists in particular: https://github.com/flutter/flutter/wiki/Triage#area-focused-triage +[You must cover these bug lists in particular.](../triage/README.md#triage-process-for-teams) * Assign bugs that you are working on or that you have committed to work on. @@ -55,9 +55,9 @@ You must cover these bug lists in particular: https://github.com/flutter/flutter * Make sure that assigned bugs have a month-based milestone (see section below). -See our page on managing issues: https://github.com/flutter/flutter/wiki/Issue-hygiene +[See our page on managing issues.](../contributing/issue_hygiene/README.md) -Keep an eye out for bugs that should block releases, update the bad builds page accordingly: https://github.com/flutter/flutter/wiki/Bad-Builds +Keep an eye out for bugs that should block releases, update the [bad builds](../releases/Bad-Builds.md) page accordingly. ### Be conservative when scheduling diff --git a/docs/unsorted_wiki/Values.md b/docs/about/Values.md similarity index 93% rename from docs/unsorted_wiki/Values.md rename to docs/about/Values.md index a83c4d006a69e..18e2ec5f57e28 100644 --- a/docs/unsorted_wiki/Values.md +++ b/docs/about/Values.md @@ -45,7 +45,7 @@ We may sometimes gate features behind flags until we are confident of their qual ## 🤣‬ Have fun doing it -Last, but definitely not least, we want to make sure that our work environment is pleasant for everyone involved. Your health and the health of your family and friends is more important than Flutter. Our community [is welcoming](https://github.com/flutter/flutter/blob/master/CODE_OF_CONDUCT.md). We don't know everything; all of us can make mistakes. +Last, but definitely not least, we want to make sure that our work environment is pleasant for everyone involved. Your health and the health of your family and friends is more important than Flutter. Our community [is welcoming](../../CODE_OF_CONDUCT.md). We don't know everything; all of us can make mistakes. We want team members to feel empowered to make changes to the code and to our processes. @@ -70,7 +70,7 @@ The list of supported platforms on flutter.dev is describing the platforms suppo For each area, we consider the level to which we provide support: -0. We will literally help you with your code if things don't work. This is very rare. (See also "[top-tier customers](https://github.com/flutter/flutter/wiki/Issue-hygiene#customers)".) +0. We will literally help you with your code if things don't work. This is very rare. (See also "[top-tier customers](../contributing/issue_hygiene/README.md#customers)".) 1. We will make a best effort to ensure that well written code works (e.g. we have testing on that platform). This is a common level for target platforms that have reached a label of "stable" (e.g. Android, iOS) on devices that are widely available (e.g. 64bit ARM). This corresponds to the "Supported Google-tested platforms" category on the list of supported platforms. @@ -89,7 +89,7 @@ For each area, we consider the level to which we provide support: _See also:_ -* [Code of Conduct](https://github.com/flutter/flutter/blob/master/CODE_OF_CONDUCT.md) -* [Contributor Guide](https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md) +* [Code of Conduct](../../CODE_OF_CONDUCT.md) +* [Contributor Guide](../../CONTRIBUTING.md) * [Flutter's Culture of Inclusivity](https://flutter.dev/culture) * [Flutter culture and how to preserve it](https://medium.com/flutter/flutter-culture-and-how-to-preserve-it-436b4ed1031d) \ No newline at end of file diff --git a/docs/unsorted_wiki/Chat.md b/docs/contributing/Chat.md similarity index 93% rename from docs/unsorted_wiki/Chat.md rename to docs/contributing/Chat.md index 22686d22cdc4e..82790ce828ccb 100644 --- a/docs/unsorted_wiki/Chat.md +++ b/docs/contributing/Chat.md @@ -49,11 +49,11 @@ Each channel describes its topic in the channel description. Please read the cha ## Policies -Our [code of conduct](https://github.com/flutter/flutter/blob/master/CODE_OF_CONDUCT.md) applies to the Discord server, as it does to any communications involving Flutter. +Our [code of conduct](https://github.com/flutter/flutter/blob/main/CODE_OF_CONDUCT.md) applies to the Discord server, as it does to any communications involving Flutter. -The #hackers-* channels are visible to anyone, but please only post in those channels if you are actively contributing. If you want help with your app, ask in #help instead. If you want to learn how to contribute, have a look at our [contributing guide](https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md). +The #hackers-* channels are visible to anyone, but please only post in those channels if you are actively contributing. If you want help with your app, ask in #help instead. If you want to learn how to contribute, have a look at our [contributing guide](https://github.com/flutter/flutter/blob/main/CONTRIBUTING.md). -See the [[contributor access]] wiki page for details on becoming a member of the "team" role. +See the [contributor access](Contributor-access.md) wiki page for details on becoming a member of the "team" role. Please don't direct-message people unless they are comfortable with it (ask publicly first). You can disable direct messages on this server by changing your Privacy settings for the server, or on a global basis by changing your Privacy & Safety user settings. @@ -71,4 +71,4 @@ You can [change your status](https://support.discord.com/hc/en-us/articles/36003 # Design documents -This page used to discuss how to create design docs, but that content is now on its own page: [[Design documents]]. \ No newline at end of file +This page used to discuss how to create design docs, but that content is now on its own page: [Design documents](Design-Documents.md). \ No newline at end of file diff --git a/docs/unsorted_wiki/Contributor-access.md b/docs/contributing/Contributor-access.md similarity index 83% rename from docs/unsorted_wiki/Contributor-access.md rename to docs/contributing/Contributor-access.md index cab928c82a35c..3723a48064f7f 100644 --- a/docs/unsorted_wiki/Contributor-access.md +++ b/docs/contributing/Contributor-access.md @@ -2,29 +2,29 @@ For people who make the occasional contribution to Flutter (filing an issue, sub We grant commit access (which includes full rights to the issue database, such as being able to edit labels, and grants access to our internal chat channels) to people who have gained our trust and demonstrated a commitment to Flutter. -Specifically, if you meet one of the following criteria and you have a sponsor (someone who already has contributor access and agrees that you should be granted access), then please ask your sponsor to propose, on the #server-support [[chat]] channel, that you be made a member of the team, and then reply to that message explaining which criteria below you are claiming to meet. The possible criteria are: +Specifically, if you meet one of the following criteria and you have a sponsor (someone who already has contributor access and agrees that you should be granted access), then please ask your sponsor to propose, on the #server-support [Chat](Chat.md) channel, that you be made a member of the team, and then reply to that message explaining which criteria below you are claiming to meet. The possible criteria are: -* You have a long history of participating productively, e.g. in our [[chat]] channels, helping with [[Triage]], helping other contributors track down problems, finding meaningful issues in submitted PRs, helping people in our #help channel, etc, all while demonstrating exemplary behavior that closely aligns with our [code of conduct](https://github.com/flutter/flutter/blob/master/CODE_OF_CONDUCT.md). +* You have a long history of participating productively, e.g. in our [Chat](Chat.md) channels, helping with [Triage](../triage/README.md), helping other contributors track down problems, finding meaningful issues in submitted PRs, helping people in our #help channel, etc, all while demonstrating exemplary behavior that closely aligns with our [code of conduct](https://github.com/flutter/flutter/blob/main/CODE_OF_CONDUCT.md). * You have recently submitted several PRs that have landed successfully (received an LGTM, PR was merged, no regressions reported, PR was not reverted), without needing extensive tutoring in the process. * You are employed by a company with a history of contributing to Flutter, for the purpose of yourself regularly contributing to Flutter. -* You represent a development team that creates applications, plugins, or packages using Flutter and have a close relationship with our developer relations team, including having a customer label, and have a great need to regularly update labels on issues (see [Issue hygiene, Customers](https://github.com/flutter/flutter/wiki/Issue-hygiene#customers)). (This is rare.) +* You represent a development team that creates applications, plugins, or packages using Flutter and have a close relationship with our developer relations team, including having a customer label, and have a great need to regularly update labels on issues (see [Issue hygiene, Customers](./issue_hygiene/README.md#customers)). (This is rare.) -Being granted access means that you will be added to the "flutter-hackers" group on GitHub and the "team" role on Discord. This privilege is granted with some expectation of responsibility: contributors are people who care about Flutter and want to help Flutter along our [[roadmap]]. A contributor is not just someone who can make changes or comment on issues, but someone who has demonstrated their ability to collaborate with the team, get the most knowledgeable people to review code, contribute high-quality code, follow through to fix bugs (in code or tests), and provide meaningful insights on issues. +Being granted access means that you will be added to the "flutter-hackers" group on GitHub and the "team" role on Discord. This privilege is granted with some expectation of responsibility: contributors are people who care about Flutter and want to help Flutter along our [roadmap](../roadmap/Roadmap.md). A contributor is not just someone who can make changes or comment on issues, but someone who has demonstrated their ability to collaborate with the team, get the most knowledgeable people to review code, contribute high-quality code, follow through to fix bugs (in code or tests), and provide meaningful insights on issues. -We grant access optimistically based on a reasonably small volume of evidence of good faith. Correspondingly, we will remove access quickly if we find our trust has been violated. Contributors with commit access must still follow all our processes and policies, and must follow our [code of conduct](https://github.com/flutter/flutter/blob/master/CODE_OF_CONDUCT.md) rigorously. (Please read it, it's stricter than most.) +We grant access optimistically based on a reasonably small volume of evidence of good faith. Correspondingly, we will remove access quickly if we find our trust has been violated. Contributors with commit access must still follow all our processes and policies, and must follow our [code of conduct](https://github.com/flutter/flutter/blob/main/CODE_OF_CONDUCT.md) rigorously. (Please read it, it's stricter than most.) ### Responsibilities #### Code of conduct -If you have commit access or "team" access on the Discord server, you are responsible for enforcing our [code of conduct](https://github.com/flutter/flutter/blob/master/CODE_OF_CONDUCT.md). +If you have commit access or "team" access on the Discord server, you are responsible for enforcing our [code of conduct](https://github.com/flutter/flutter/blob/main/CODE_OF_CONDUCT.md). Our code of conduct is much, much stricter than most. We do not wait until someone has been actively rude or insulting. Being disrespectful in any way is grounds for action. For example, passive-aggressive whining and general unconstructive negativity are all violations of the code of conduct. If someone is in a bad mood, we would rather they avoided contributing to Flutter on that day. When you see something that might be described as unwelcoming or is in some other way a violation of our code of conduct, promptly contact the offender and ask them to read the code of conduct and consider how they might more effectively espouse its philosophy. Most people react very positively to this. -If they react negatively, or if they continue to make the environment unpleasant, they should be removed from the environment. On Discord, this would be kicking them from the channel. Repeat offenders should be banned. On GitHub, they can be blocked from our organisation (you may need to ask @Hixie or another admin of our GitHub org to do this). Please let the #server-support [[chat]] channel know when you do anything like this, so that we can keep an eye on how common it is. +If they react negatively, or if they continue to make the environment unpleasant, they should be removed from the environment. On Discord, this would be kicking them from the channel. Repeat offenders should be banned. On GitHub, they can be blocked from our organisation (you may need to ask @Hixie or another admin of our GitHub org to do this). Please let the #server-support [Chat](Chat.md) channel know when you do anything like this, so that we can keep an eye on how common it is. #### Maintaining documentation @@ -36,9 +36,9 @@ For the wiki specifically, since there's no code review, it's good to mention on Being in the GitHub "flutter-hackers" group gives you the following: -* The ability to merge your own PRs once they are reviewed (see [[Tree Hygiene]]). +* The ability to merge your own PRs once they are reviewed (see [Tree Hygiene](Tree-hygiene.md)). -* The ability to add labels, milestones, etc, on issues on GitHub (see [[Issue Hygiene]]). +* The ability to add labels, milestones, etc, on issues on GitHub (see [Issue Hygiene](./issue_hygiene/README.md)). * PRs will run their tests slightly faster. @@ -69,7 +69,7 @@ The actual process (as followed by Flutter repo admins) is as follows: We occasionally check for account with commit access that have not been used for a while. It takes very little to count as "active" (e.g. commenting on an issue, even adding an emoji reaction to an issue). If your account has been inactive for over a year we will try to reach out (e.g. by e-mail or on Discord) before removing access. -If your account access was removed but you wish to return to contributing to Flutter, you are most welcome to do so; just reach out on the Discord (see [[Chat]]) and ask someone to renominate you according to the process described above. +If your account access was removed but you wish to return to contributing to Flutter, you are most welcome to do so; just reach out on the Discord (see [Chat](Chat.md)) and ask someone to renominate you according to the process described above. # Access rights to Flutter dashboard @@ -99,13 +99,13 @@ If you need access to triage images in [Flutter Gold](https://flutter-gold.skia. Users in the `@google.com` domain are already authorized to use Flutter Gold, but `@gmail.com` addresses can also be added to the allow list. ## Process -The list of authorized users is maintained in the [skia build-bot repository](https://skia.googlesource.com/buildbot), in [this file](https://skia.googlesource.com/buildbot/+/refs/heads/master/golden/k8s-instances/flutter/flutter-skiacorrectness.json5). Googlers can submit a change to add to the authorized users. +The list of authorized users is maintained in the [skia build-bot repository](https://skia.googlesource.com/buildbot), in [this file](https://skia.googlesource.com/buildbot/+/refs/heads/main/golden/k8s-instances/flutter/flutter-skiacorrectness.json5). Googlers can submit a change to add to the authorized users. This repository is also [mirrored on GitHub.](https://github.com/google/skia-buildbot) # fcontrib.org accounts -If you are a team member who wants to share design docs (see [[Chat]]) but you don't want to use your own personal account, you can ask a Flutter admin for an fcontrib.org account. Ping @Hixie or another admin in the #server-support channel on Discord. +If you are a team member who wants to share design docs (see [Chat](Chat.md)) but you don't want to use your own personal account, you can ask a Flutter admin for an fcontrib.org account. Ping @Hixie or another admin in the #server-support channel on Discord. ## Process diff --git a/docs/unsorted_wiki/Data-driven-Fixes.md b/docs/contributing/Data-driven-Fixes.md similarity index 99% rename from docs/unsorted_wiki/Data-driven-Fixes.md rename to docs/contributing/Data-driven-Fixes.md index d198bc03be030..062b58da6915a 100644 --- a/docs/unsorted_wiki/Data-driven-Fixes.md +++ b/docs/contributing/Data-driven-Fixes.md @@ -350,7 +350,7 @@ The `name` key is required unless the `index` key is provided, and isn't allowed The `nullability` key is required and indicates the type of change made to the parameter. Currently `non_null` is the only type change that is supported. -The `argumentValue` key is optional and if provided will be used as the default value of the parameter. The value of the argumentValue key is a [code template](https://github.com/flutter/flutter/wiki/Data-driven-Fixes#code-template) object. +The `argumentValue` key is optional and if provided will be used as the default value of the parameter. The value of the argumentValue key is a [code template](Data-driven-Fixes.md#code-template) object. For eg, changing the parameter `a` to non null with a default value you would write: diff --git a/docs/unsorted_wiki/Design-Documents.md b/docs/contributing/Design-Documents.md similarity index 94% rename from docs/unsorted_wiki/Design-Documents.md rename to docs/contributing/Design-Documents.md index afeead0a90cc9..2ef060a02e840 100644 --- a/docs/unsorted_wiki/Design-Documents.md +++ b/docs/contributing/Design-Documents.md @@ -6,7 +6,7 @@ Don't forget to configure your document's Sharing settings so that everyone has The template discusses how to create a shortlink for your design doc (flutter.dev/go/...). When creating the shortlink, remember to test the URL you are publishing in an incognito window! -Googlers: Design docs must be created by non-corp accounts! See [Contributor Access](https://github.com/flutter/flutter/wiki/Contributor-access#fcontriborg-accounts) for details on getting `fcontrib.org` accounts if you don't want to use your personal GMail account. +Googlers: Design docs must be created by non-corp accounts! See [Contributor Access](Contributor-access.md#fcontriborg-accounts) for details on getting `fcontrib.org` accounts if you don't want to use your personal GMail account. When you implement a design, document it in the source code in detail. The API documentation is the usual place where we document our designs. It's perfectly reasonable for API docs to be multiple pages long with subheadings (e.g. see the docs for [RenderBox](https://master-api.flutter.dev/flutter/rendering/RenderBox-class.html)!). Do not assume that anyone will ever read your design doc after the discussion has finished. Similarly, do not assume that anyone will look at closed GitHub issues or PR discussions. @@ -26,7 +26,7 @@ If you wish to get feedback on your design doc, you have many options for doing * If there is an issue already filed on the topic, definitely put a link to the design doc there. People who have found the issue and want to get updates on the topic will have subscribed to the issue, so this is the most effective way to communicate with them. -* File a new issue to track the design doc using [the design doc issue template](https://github.com/flutter/flutter/issues/new?labels=design+doc&template=8_design_doc.yml). Assign it to yourself. +* File a new issue to track the design doc using [the design doc issue template](https://github.com/flutter/flutter/issues/new?template=8_design_doc.yml). Assign it to yourself. * Post the link on Discord. You can post it to #hidden-chat to just get feedback from team members. You can post it to one or more of the #hackers-* channels if you want feedback from people who are interested in the general area. You can post it to the global #hackers channel if you want feedback from anyone interested in working on Flutter. If you really want feedback, you can post a request to #announcements and publish it to any server that is following ours. diff --git a/docs/contributing/Setting-up-the-Framework-development-environment.md b/docs/contributing/Setting-up-the-Framework-development-environment.md index 34f271e39d5e7..bc36c36005d3a 100644 --- a/docs/contributing/Setting-up-the-Framework-development-environment.md +++ b/docs/contributing/Setting-up-the-Framework-development-environment.md @@ -13,7 +13,7 @@ Verify that `adb` is in your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) (that `which adb` prints sensible output). If you're - [also working on the Flutter engine](https://github.com/flutter/flutter/wiki/Setting-up-the-Engine-development-environment), + [also working on the Flutter engine](../engine/contributing/Setting-up-the-Engine-development-environment.md), you can use the copy of the Android platform tools in `.../engine/src/third_party/android_tools/sdk/platform-tools`. @@ -57,8 +57,8 @@ Next steps: - * [Running examples](https://github.com/flutter/flutter/wiki/Running-examples), to see if your setup works. - * [The flutter tool](https://github.com/flutter/flutter/wiki/The-flutter-tool), to learn about how the `flutter` command line tool works. - * [Style guide for Flutter repo](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo), to learn how to write code for Flutter. - * [Tree hygiene](https://github.com/flutter/flutter/wiki/Tree-hygiene), to learn about how to submit patches. - * [Signing commits](https://github.com/flutter/flutter/wiki/Signing-commits), to configure your environment to securely sign your commits. + * [Running examples](../examples/Running-examples.md), to see if your setup works. + * [The flutter tool](../tool/README.md), to learn about how the `flutter` command line tool works. + * [Style guide for Flutter repo](Style-guide-for-Flutter-repo.md), to learn how to write code for Flutter. + * [Tree hygiene](Tree-hygiene.md), to learn about how to submit patches. + * [Signing commits](Signing-commits.md), to configure your environment to securely sign your commits. diff --git a/docs/unsorted_wiki/Signing-commits.md b/docs/contributing/Signing-commits.md similarity index 100% rename from docs/unsorted_wiki/Signing-commits.md rename to docs/contributing/Signing-commits.md diff --git a/docs/unsorted_wiki/Style-guide-for-Flutter-repo.asciidoc b/docs/contributing/Style-guide-for-Flutter-repo.md similarity index 96% rename from docs/unsorted_wiki/Style-guide-for-Flutter-repo.asciidoc rename to docs/contributing/Style-guide-for-Flutter-repo.md index 30af4ccb2f61d..4dc661cd84e7f 100644 --- a/docs/unsorted_wiki/Style-guide-for-Flutter-repo.asciidoc +++ b/docs/contributing/Style-guide-for-Flutter-repo.md @@ -1,19 +1,13 @@ -:toc: macro -:toc-title: -:toclevels: 99 +### Style guide for Flutter repo -⚠️✏️ Changes to the style guide should be announced to the team in the https://discord.com/channels/608014603317936148/608116355836805126[#announcements] channel on https://github.com/flutter/flutter/wiki/Chat[Discord]. - -Summary -------- +## Summary Optimize for readability. Write detailed documentation. Make error messages useful. Never use timeouts or timers. Avoid `is`, `print`, `part of`, `extension` and `_`. -Introduction ------------- +## Introduction This document contains some high-level philosophy and policy decisions for the Flutter project, and a description of specific style issues for some parts of the codebase. @@ -23,15 +17,10 @@ project (the framework itself and all our sample code). Flutter application deve are welcome to follow this style as well, but this is by no means required. Flutter will work regardless of what style is used to author applications that use it. -The engine repository uses https://github.com/flutter/engine/blob/master/CONTRIBUTING.md#style[other style guides for non-Dart code]. The language-neutral sections in this document still apply to engine code, however. - -Table of Contents ------------------ +The engine repository uses https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style[other style guides for non-Dart code]. The language-neutral sections in this document still apply to engine code, however. -toc::[] -Overview --------- +## Overview This document describes our approach to designing and programming Flutter, from high-level architectural principles all the way to indentation rules. @@ -76,8 +65,7 @@ This requires a different and equally important skill when designing APIs: not g An API is for life, not just for the one PR you are working on. -Philosophy ----------- +## Philosophy ### Lazy programming @@ -107,10 +95,10 @@ proper fix for a problem rather than just applying a band-aid. When you fix a bug, first write a test that fails, then fix the bug and verify the test passes. -When you implement a new feature, write tests for it. (See also: https://github.com/flutter/flutter/wiki/Running-and-writing-tests[Running and writing tests], and the section on writing tests below.) +When you implement a new feature, write tests for it. (See also: [Running and writing tests](./testing/Running-and-writing-tests.md), and the section on writing tests below.) Check the code coverage -to make sure every line of your new code is tested. See also: https://github.com/flutter/flutter/wiki/Test-coverage-for-package%3Aflutter[Test coverage for package:flutter]. +to make sure every line of your new code is tested. See also: [Test coverage for package:flutter](./testing/Test-coverage-for-package-flutter.md). If something isn't tested, it is very likely to regress or to get "optimized away". If you want your code to remain in the codebase, you should make sure to test it. @@ -304,9 +292,9 @@ by real developers. ### Get early feedback when designing new APIs -If you're designing a new API or a new feature, consider https://github.com/flutter/flutter/wiki/Chat#design-documents[writing a design doc]. +If you're designing a new API or a new feature, consider [writing a design doc](Design-Documents.md). Then, get feedback from the relevant people, e.g. send it to `flutter-dev` or -post it on the https://github.com/flutter/flutter/wiki/Chat#existing-channels[relevant chat channel]. +post it on the [relevant chat channel](Chat.md#existing-channels). ### Start designing APIs from the closest point to the developer @@ -339,12 +327,11 @@ Put yourself in the shoes of whoever sees that error message. Why did they see i ### Template values should set developers up for success -Template defaults should focus on providing the best developer experience. Templates should help developers understand the code, be easy to run now and support in the future. Help developers by picking dependencies that are broadly used and/or broadly supported and by leaving https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#leave-breadcrumbs-in-the-comments[comments that are helpful]. +Template defaults should focus on providing the best developer experience. Templates should help developers understand the code, be easy to run now and support in the future. Help developers by picking dependencies that are broadly used and/or broadly supported and by leaving [comments that are helpful](#leave-breadcrumbs-in-the-comments). See flutter create's templates for an example. -Policies --------- +## Policies This section defines some policies that we have decided to honor. In the absence of a very specific policy in this section, the general philosophies in the section above are controlling. @@ -389,11 +376,10 @@ All licenses included in this manner must have been reviewed and determined to b All such "third party code" must either be a fork for which we take full responsibility, or there must be an automated rolling mechanism that keeps the code up to date when the upstream source changes. -In general it is _strongly_ recommended that we avoid any such code unless strictly necessary. In particular, we aim for all code in the flutter/flutter repository to be https://github.com/flutter/flutter/wiki/Why-we-have-a-separate-engine-repo#licensing?[single-licensed], which is why it does not contain any "third party code" at all. +In general it is _strongly_ recommended that we avoid any such code unless strictly necessary. In particular, we aim for all code in the flutter/flutter repository to be [single-licensed](../about/Why-we-have-a-separate-engine-repo.md#licensing), which is why it does not contain any "third party code" at all. -Documentation (dartdocs, javadocs, etc) ---------------------------------------- +## Documentation (dartdocs, javadocs, etc) We use "dartdoc" for our Dart documentation, and similar technologies for the documentation of our APIs in other languages, such as ObjectiveC and Java. All public members in Flutter @@ -620,13 +606,13 @@ By definition, if they are looking at the documentation, they are not finding it Sample code helps developers learn your API quickly. Writing sample code also helps you think through how your API is going to be used by app developers. -Sample code should go in a documentation comment that typically begins with `/// {@tool dartpad}`, and ends with `/// {@end-tool}`, with the example source and corresponding tests placed in a file under https://github.com/flutter/flutter/blob/master/examples/api[the API examples directory]. This will then be checked by automated tools, and formatted for display on the API documentation web site https://api.flutter.dev[api.flutter.dev]. For details on how to write sample code, see https://github.com/flutter/flutter/blob/master/examples/api/README.md#authoring[the API example documentation]. +Sample code should go in a documentation comment that typically begins with `/// {@tool dartpad}`, and ends with `/// {@end-tool}`, with the example source and corresponding tests placed in a file under https://github.com/flutter/flutter/blob/main/examples/api[the API examples directory]. This will then be checked by automated tools, and formatted for display on the API documentation web site https://api.flutter.dev[api.flutter.dev]. For details on how to write sample code, see https://github.com/flutter/flutter/blob/main/examples/api/README.md#authoring[the API example documentation]. #### Provide full application samples. Our UX research has shown that developers prefer to see examples that are in the context of an entire app. So, whenever it makes sense, provide an example that can be presented as part of an entire application instead of just a snippet that uses the `{@tool snippet}` or ```dart ... ``` indicators. -An application sample can be created using the `{@tool dartpad}` ... `{@end-tool}` or `{@tool sample}` ... `{@end-tool}` dartdoc indicators. See https://github.com/flutter/flutter/blob/master/examples/api/README.md#authoring[here] for more details about writing these kinds of examples. +An application sample can be created using the `{@tool dartpad}` ... `{@end-tool}` or `{@tool sample}` ... `{@end-tool}` dartdoc indicators. See https://github.com/flutter/flutter/blob/main/examples/api/README.md#authoring[here] for more details about writing these kinds of examples. Dartpad examples (those using the dartdoc `{@tool dartpad}` indicator) will be presented on the https://api.flutter.dev[API documentation website] as an in-page executable and editable example. This allows developers to interact with the example right there on the page, and is the preferred form of example. Here is https://api.flutter.dev/flutter/widgets/AnimatedSwitcher-class.html#widgets.AnimatedSwitcher.1[one such example]. @@ -665,7 +651,7 @@ The first two arguments are the video's width and height. These should be `560` ### Clearly mark deprecated APIs -We have conventions around deprecation. See the https://github.com/flutter/flutter/wiki/Tree-hygiene#deprecation[Tree Hygiene] page for more details. +We have conventions around deprecation. See the [Tree Hygiene](Tree-hygiene.md#deprecations) page for more details. ### Use `///` for public-quality private documentation @@ -741,8 +727,7 @@ When referencing a parameter, use backticks. However, when referencing a paramet Avoid using terms like "above" or "below" to reference one dartdoc section from another. Dartdoc sections are often shown alone on a Web page, the full context of the class is not present. -Coding patterns and catching bugs early ---------------------------------------- +## Coding patterns and catching bugs early ### Use asserts liberally to detect contract violations and verify invariants @@ -809,7 +794,7 @@ global constant. As a general rule, when you have a lot of constants, wrap them in a class. For examples of this, see -https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/material/colors.dart[lib/src/material/colors.dart]. +https://github.com/flutter/flutter/blob/main/packages/flutter/lib/src/material/colors.dart[lib/src/material/colors.dart]. ### Avoid using `if` chains or `?:` or `==` with enum values @@ -1045,8 +1030,7 @@ anyway. It should also be avoided in very large functions. It incurs runtime overhead in maintaining and using an iterator, and space overhead for the compiler to actually desugar the generator into something that uses an iterator class. -Writing tests -------------- +## Writing tests ### Make each test entirely self-contained @@ -1079,8 +1063,7 @@ As per the API docs for https://main-api.flutter.dev/flutter/flutter_test/Widget Using `pumpAndSettle`, especially without checking its return value, makes it very easy for bugs to sneak in where we trigger animations across multiple frames instead of immediately. It is almost always the case that a call to `pumpAndSettle` is more strictly correctly written as two `pump` calls, one to trigger the animations and one (with a duration) to jump to the point after the animations. -Naming ------- +## Naming ### Begin global constant names with prefix "k" @@ -1190,8 +1173,7 @@ future is higher. Instead find a name that represents the idea being being used or replaced. -Comments --------- +## Comments ### Avoid checking in comments that ask questions @@ -1272,8 +1254,7 @@ Generally the closure passed to `setState` should include all the code that chan ``` -Formatting ----------- +## Formatting These guidelines have no technical effect, but they are still important purely for consistency and readability reasons. @@ -1798,8 +1779,7 @@ Finally, `+=` is more convenient when changing the increment to a number other t To make it clearer when something is a double or an integer, even if the number is a round number, include a decimal point in double literals. For example, if a function `foo` takes a double, write `foo(1.0)` rather than `foo(1)` because the latter makes it look like the function takes an integer. -Conventions ------------ +## Conventions ### Expectations around potential crashes in the engine @@ -1847,8 +1827,7 @@ We generally prefer `Listenable` subclasses (e.g. `ValueNotifier` or `ChangeNoti In the specific case of exposing a value from `dart:ui` via a callback, we expect the bindings in the framework to register a single listener and then provide a mechanism to fan the notification to multiple listeners. Sometimes this is a rather involved process (e.g. the `SchedulerBinding` exists almost entirely for the purpose of doing this for `onBeginFrame`/`onDrawFrame`, and the `GesturesBinding` exists exclusively for the purpose of doing this for pointer events). Sometimes it's simpler (e.g. propagating changes to life cycle events). -Packages --------- +## Packages ### Structure @@ -1856,20 +1835,20 @@ As per normal Dart conventions, a package should have a single import that reexports all of its API. > For example, -> https://github.com/flutter/flutter/blob/master/packages/flutter/lib/rendering.dart[rendering.dart] +> https://github.com/flutter/flutter/blob/main/packages/flutter/lib/rendering.dart[rendering.dart] > exports all of lib/src/rendering/*.dart If a package uses, as part of its exposed API, types that it imports from a lower layer, it should reexport those types. > For example, -> https://github.com/flutter/flutter/blob/master/packages/flutter/lib/material.dart[material.dart] +> https://github.com/flutter/flutter/blob/main/packages/flutter/lib/material.dart[material.dart] > reexports everything from -> https://github.com/flutter/flutter/blob/master/packages/flutter/lib/widgets.dart[widgets.dart]. +> https://github.com/flutter/flutter/blob/main/packages/flutter/lib/widgets.dart[widgets.dart]. > Similarly, the latter -> https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/basic.dart[reexports] +> https://github.com/flutter/flutter/blob/main/packages/flutter/lib/src/widgets/basic.dart[reexports] > many types from -> https://github.com/flutter/flutter/blob/master/packages/flutter/lib/rendering.dart[rendering.dart], +> https://github.com/flutter/flutter/blob/main/packages/flutter/lib/rendering.dart[rendering.dart], > such as `BoxConstraints`, that it uses in its API. On the other > hand, it does not reexport, say, `RenderProxyBox`, since that is not > part of the widgets API. @@ -1910,7 +1889,7 @@ By convention, `dart:ui` is imported using `import 'dart:ui' show level will have done it for you), and as `import 'dart:ui' as ui show ...;` for low-level APIs, in both cases listing all the identifiers being imported. See -https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/painting/basic_types.dart[basic_types.dart] +https://github.com/flutter/flutter/blob/main/packages/flutter/lib/src/painting/basic_types.dart[basic_types.dart] in the `painting` package for details of which identifiers we import which way. Other packages are usually imported undecorated unless they have a convention of their own (e.g. `path` is imported `as path`). diff --git a/docs/unsorted_wiki/Tree-hygiene.md b/docs/contributing/Tree-hygiene.md similarity index 88% rename from docs/unsorted_wiki/Tree-hygiene.md rename to docs/contributing/Tree-hygiene.md index f2100a7336f1d..5ff16da996469 100644 --- a/docs/unsorted_wiki/Tree-hygiene.md +++ b/docs/contributing/Tree-hygiene.md @@ -1,22 +1,22 @@ ## tl;dr -- Regressions should be [reverted first](https://github.com/flutter/flutter/wiki/Landing-Changes-With-Autosubmit) and questions asked later. Bringing the tree to green is higher priority. +- Regressions should be [reverted first](../infra/Landing-Changes-With-Autosubmit.md) and questions asked later. Bringing the tree to green is higher priority. - A breaking change is one that breaks the tests in the flutter/tests repo, and those need a migration guide. -- Expect that a new patch will be reviewed within two weeks, unless it is fixing a P0 bug in which case it should be reviewed the same day. If it has not been reviewed in that timeframe, reach out on [[Chat]]. Remember that reviewers are human beings with additional professional and personal responsibilities. +- Expect that a new patch will be reviewed within two weeks, unless it is fixing a P0 bug in which case it should be reviewed the same day. If it has not been reviewed in that timeframe, reach out on [Chat](Chat.md). Remember that reviewers are human beings with additional professional and personal responsibilities. ## Introduction This page covers how to land a PR and other aspects of writing code for Flutter other than the actual writing of the code. For guidance on designing APIs, documenting, and formatting your code, see the -[[Style guide for Flutter repo]] document. +[Style guide for Flutter repo](Style-guide-for-Flutter-repo.md) document. ## Overview The general process for submitting code to a Flutter repository is as follows: 1. Fork the repository on GitHub (see the - [contributing guide](https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md) + [contributing guide](https://github.com/flutter/flutter/blob/main/CONTRIBUTING.md) for advice on doing this and in general setting up your development environment). 2. If there is not already an issue covering the work you are interested in doing, @@ -26,11 +26,11 @@ The general process for submitting code to a Flutter repository is as follows: before it can land, having an issue means we have somewhere to point to the code when we close the PR without landing it, so other people can take it over. -3. Discuss your design on the issue. See [[Design Documents]] for advice. +3. Discuss your design on the issue. See [Design Documents](Design-Documents.md) for advice. You may find it useful to create a Google Doc to solicit feedback (use the template at [flutter.dev/go/template](https://flutter.dev/go/template)). You may wish to e-mail the mailing list, or discuss the topic - on our [[Chat]] channels. The more buy-in you get from the rest of the + on our [Chat](Chat.md) channels. The more buy-in you get from the rest of the team (especially the relevant leads), the easier the rest of the process will be. You can put the label "proposal" on your issue to indicate that you have a design up for discussion in the issue. @@ -46,14 +46,14 @@ The general process for submitting code to a Flutter repository is as follows: having a `main` branch, from `master`) on your GitHub fork of the repository, and implement your change. Make sure it is tested (see the next section for details). - You must follow the guidelines described in the [[Style guide for Flutter repo]]. + You must follow the guidelines described in the [Style guide for Flutter repo](Style-guide-for-Flutter-repo.md). Files must not have trailing spaces. For the engine repository, C, C++, and Objective-C code should be formatted with `clang-format` before submission (use `buildtools//clang/bin/clang-format --style=file -i`). 6. Submit this branch as a PR to the relevant Flutter repository. - _(See also: [[Signing commits]])_ + _(See also: [Signing commits](./Signing-commits.md))_ 7. Get your code reviewed (see below). You should probably reach out to the relevant expert(s) for the areas you touched and ask them to review your PR directly. @@ -62,7 +62,7 @@ The general process for submitting code to a Flutter repository is as follows: 8. Make sure your PR passes all the pre-commit tests. Consider running some of the post-commit tests locally (see the - [devicelab](https://github.com/flutter/flutter/blob/master/dev/devicelab/README.md) + [devicelab](https://github.com/flutter/flutter/blob/main/dev/devicelab/README.md) directory). If any tests break, especially the `customer_testing` tests, please see the breaking change policy section below for details on how to proceed. @@ -80,7 +80,7 @@ The general process for submitting code to a Flutter repository is as follows: goes wrong, revert your patch and study the problem. You should aim to be the one to revert your patch. You will be racing everyone else on the team who will also be trying to revert your patch. (See below for guidance on reverting PRs.) -_See also: [[What should I work on?]]_ +_See also: [What should I work on?](What-should-I-work-on.md)_ ## Tests @@ -104,16 +104,16 @@ If a reviewer says a PR should have a test, then it needs a test regardless of t PRs adding data-driven fixes require tests that fall under the test_fixes directory, but are not yet recognized by the bot as being tested. -Consider using the code coverage tools to check that all your new code is covered by tests (see [[Test coverage for package:flutter]]). +Consider using the code coverage tools to check that all your new code is covered by tests (see [Test coverage for package:flutter](./testing/Test-coverage-for-package-flutter.md)). Feel free to update the bot's logic to catch more cases that should be automatically exempt (it's in the cocoon repo). ## Using git Assuming your environment has been configured according to the instructions in -[[Setting up the Engine development environment]], -[[Setting up the Framework development environment]], or -[[Setting up the Packages development environment]], +[Setting up the Engine development environment](../engine/contributing/Setting-up-the-Engine-development-environment.md), +[Setting up the Framework development environment](Setting-up-the-Framework-development-environment.md), or +[Setting up the Packages development environment](../ecosystem/contributing/Setting-up-the-Packages-development-environment.md), follow these steps to start working on a patch: * `git fetch upstream` @@ -127,7 +127,7 @@ GitHub provides you with a link for submitting the pull request in the message o Because `git pull` will often miss tags that are used to define the release of the flutter tool, it is recommended to use `git fetch` typically to avoid version mismatches when running `flutter update-packages`. -Use `git fetch upstream; git rebase upstream/main; git push origin your_branch_name` to update your PRs, rather than using merge, because that way our tooling will recognize your PR as being up to date. (Otherwise it'll try testing against the tests at the time you originally branched.) Also, **be wary of force pushing to your PR branch** if you are dealing with golden image tests; see [[gold troubleshooting instructions|Writing-a-golden-file-test-for-package:flutter#troubleshooting]]. +Use `git fetch upstream; git rebase upstream/main; git push origin your_branch_name` to update your PRs, rather than using merge, because that way our tooling will recognize your PR as being up to date. (Otherwise it'll try testing against the tests at the time you originally branched.) Also, **be wary of force pushing to your PR branch** if you are dealing with golden image tests; see [gold troubleshooting instructions](./testing/Writing-a-golden-file-test-for-package-flutter.md#troubleshooting). Please make sure all your patches have detailed commit messages explaining what the problem was and what the solution is. @@ -141,7 +141,7 @@ You can do this online, and it only takes a minute. Every PR must be code-reviewed before check-in, including things like rolling a dependency. Getting a review means that a regular Flutter -contributor (someone with commit access; see [[contributor access]] for details) has "approved" the PR in the +contributor (someone with commit access; see [contributor access](Contributor-access.md) for details) has "approved" the PR in the GitHub UI. We call this "getting an LGTM" ("looks good to me"). If you are not yourself someone with commit access, then a second person @@ -182,18 +182,18 @@ should be reserved for those with contributor access). The more reviews the better. If nobody reviews your PR within two weeks, you can ask for -a review via our [[Chat]] channels. Start by asking in #hackers, +a review via our [Chat](Chat.md) channels. Start by asking in #hackers, saying what your patch does and providing a link. ### Who -PRs are assigned reviewers weekly. The precise process varies by team but tends to be combined with issue [[triage]]. +PRs are assigned reviewers weekly. The precise process varies by team but tends to be combined with issue [triage](../triage/README.md). Code should be reviewed by the owner (tech lead) of the area(s) of the codebase that you are changing, or someone to whom they have delegated that authority. If anyone else leaves comments, please also wait for their approval (LGTM) before landing code. -If nobody has reviewed your code after a week, then reach out on our [[Chat]] channels. +If nobody has reviewed your code after a week, then reach out on our [Chat](Chat.md) channels. The `#hackers-new` channel is a good place to ask for help if you're a new contributor. _For PRs affecting the `material` and `cupertino` libraries, team members are expected to seek reviewers directly; @@ -210,7 +210,7 @@ Reviewers should carefully read the code and make sure they understand it. A reviewer should check the code for both high level concerns, such as whether the approach is reasonable and whether the code's structure makes sense, as well as lower-level issues like how readable the code is and adherence to the -[Flutter style guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo). +[Flutter style guide](Style-guide-for-Flutter-repo.md). Use [these best practices](https://mtlynch.io/human-code-reviews-1/) when reviewing code and providing comments. @@ -219,18 +219,18 @@ As a reviewer, you are the last line of defense. 0. Did the author sign the CLA? If not, ask them to do so and don't look at the code. 1. Take a step back. What problem is the PR trying to solve? Is it a real problem? 2. What other solutions could we consider? What could we do to make this even better? -3. Is it the best API? See our [philosophy](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#philosophy) section. Look for state duplication, synchronous slow work, complecting, global state, overly-specific APIs, API cliffs and API oceans, API design in a vacuum (without a customer). If these terms don't make sense, read the style guide again. :-) -4. Is it the best implementation? Again, see our [style guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#coding-patterns-and-catching-bugs-early), in particular its section on good coding patterns. Are there hacks? Are we taking on more technical debt? Think of ways in which the code could break. +3. Is it the best API? See our [philosophy](Style-guide-for-Flutter-repo.md#philosophy) section. Look for state duplication, synchronous slow work, complecting, global state, overly-specific APIs, API cliffs and API oceans, API design in a vacuum (without a customer). If these terms don't make sense, read the style guide again. :-) +4. Is it the best implementation? Again, see our [style guide](Style-guide-for-Flutter-repo.md#coding-patterns-and-catching-bugs-early), in particular its section on good coding patterns. Are there hacks? Are we taking on more technical debt? Think of ways in which the code could break. 5. Is it testable? Is it tested? **All code must be tested.** Are there asserts? Encourage liberal use of assertions. 6. Look for mistakes in indenting the code and other trivial formatting problems. 7. Is new code licensed correctly? -8. Is the documentation thorough and useful? Look for useless documentation, empty prose, and breadcrumbs. See the [documentation section](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#documentation-dartdocs-javadocs-etc) of our style guide for what that means. +8. Is the documentation thorough and useful? Look for useless documentation, empty prose, and breadcrumbs. See the [documentation section](hStyle-guide-for-Flutter-repo.md#documentation-dartdocs-javadocs-etc) of our style guide for what that means. 9. Check for good grammar in API docs and comments. Check that identifiers are named according to our conventions. Once you are satisfied with the contribution, and _only_ once you are satisfied, use the GitHub "Approval" mechanism (an "LGTM" comment is not sufficient). If you feel like you are being worn down, hand the review to someone else. Consider -our [conflict resolution](https://github.com/flutter/flutter/blob/master/CODE_OF_CONDUCT.md#conflict-resolution) +our [conflict resolution](https://github.com/flutter/flutter/blob/main/CODE_OF_CONDUCT.md#conflict-resolution) policy if you feel like you are being forced to agree to something you don't like. Reviewers should not give an LGTM unless the patch has tests that verify @@ -283,7 +283,7 @@ revert (roll back) the check-in (even if it isn't yours). Do not attempt to forw There is no shame in making mistakes! Reverts happen all the time and are a normal part of engineering. -To revert a PR, just add the `revert` label to it. _For more details, see [[Landing Changes With Autosubmit]]._ +To revert a PR, just add the `revert` label to it. _For more details, see [Landing Changes With Autosubmit](../infra/Landing-Changes-With-Autosubmit.md)._ ### Avoid "Revert "Revert "Revert "Revert "Fix foo"""" commit messages @@ -334,7 +334,7 @@ way or have determined it is an acceptable trade-off). ### Performance regressions caused by auto-roller commits Although reverting a normal commit that caused performance regressions is the default -behavior, reverting an [auto-roller](https://github.com/flutter/flutter/wiki/Autorollers) +behavior, reverting an [auto-roller](../infra/Autorollers.md) (e.g., an engine-roller commit like https://github.com/flutter/flutter/commit/fdcb57b69eff2162e9aead6dec0f8058788e7608) commit could cause some complications: @@ -383,15 +383,15 @@ Implement the change you wish to see and run the existing tests against your new The "contributed tests" are: * Those in the [`customer_testing`](https://github.com/flutter/tests) shard on `flutter/flutter` PRs. -* Additional test suites that we have been allowed to run but that are not public. (Notably, Google allows us to run several tens of thousands of [[proprietary tests|Understanding Google Testing]] on each commit.) +* Additional test suites that we have been allowed to run but that are not public. (Notably, Google allows us to run several tens of thousands of [proprietary tests](../infra/Understanding-Google-Testing.md) on each commit.) There are no exemptions to this policy, because these tests run in our CI and breaking them will close the tree. -In cases where these tests pass but we can nonetheless imagine reasonable scenarios where developers would be affected negatively, by courtesy, once the change has landed, engineers are encouraged to announce the changes by sending an e-mail to [flutter-announce@](https://groups.google.com/g/flutter-announce), a message to the `#announcements` channel on our [[Chat]], and tagging the relevant issues with the [**c: API break** label](https://github.com/flutter/flutter/labels/c%3A%20API%20break) (such that they will be included in our release notes). However, we do not consider these breaking changes. (One reason to do this would be if we see our own tests being significantly affected, even if no contributed test actually fails.) +In cases where these tests pass but we can nonetheless imagine reasonable scenarios where developers would be affected negatively, by courtesy, once the change has landed, engineers are encouraged to announce the changes by sending an e-mail to [flutter-announce@](https://groups.google.com/g/flutter-announce), a message to the `#announcements` channel on our [Chat](Chat.md), and tagging the relevant issues with the [**c: API break** label](https://github.com/flutter/flutter/labels/c%3A%20API%20break) (such that they will be included in our release notes). However, we do not consider these breaking changes. (One reason to do this would be if we see our own tests being significantly affected, even if no contributed test actually fails.) ### 2. Evaluate the breaking change -If your change counts as a breaking change, seriously consider whether it is truly necessary and beneficial. Consider writing a [[design document|Design Documents]]. Discuss it with your code reviewer. Raise it in [[Chat]]. +If your change counts as a breaking change, seriously consider whether it is truly necessary and beneficial. Consider writing a [design document](Design-Documents.md). Discuss it with your code reviewer. Raise it in [Chat](Chat.md). ### 3. Prepare your change. @@ -405,7 +405,7 @@ If possible, avoid four-phase deprecations (adding a new API with a temporary na Stage your change and the documentation for your change. Typically this will be two or more PRs, plus PRs to fix the tests that were broken (see step 1), as well as writing a migration guide as a PR to the Website repository. -If possible, include flutter fixes to aid users in migration. Whether or not the change is supported by flutter fix should be included in the migration guide. To learn about authoring fixes, see [Data driven Fixes](https://github.com/flutter/flutter/wiki/Data-driven-Fixes). +If possible, include flutter fixes to aid users in migration. Whether or not the change is supported by flutter fix should be included in the migration guide. To learn about authoring fixes, see [Data driven Fixes](Data-driven-Fixes.md). **Use our [breaking change migration guide template](https://github.com/flutter/website/blob/main/src/release/breaking-changes/template.md)** (follow all the instructions in the comments) to create the migration guide that describes the change. Do not land the migration guide at this time. You will need to update it before you land it in the last step. @@ -423,7 +423,7 @@ Once everything has landed: * update your migration guide based on your experience migrating everyone, * update the timeline on the guide, and push it to [the flutter.dev Web site](https://flutter.dev/docs/release/breaking-changes) (don't forget to update the [index](https://github.com/flutter/website/blob/main/src/release/breaking-changes/index.md) of that directory as well), * e-mail a copy to [flutter-announce@](https://groups.google.com/g/flutter-announce), -* notify the `#announcements` channel on our [[Chat]], and +* notify the `#announcements` channel on our [Chat](Chat.md), and * add the [**c: API break** label](https://github.com/flutter/flutter/labels/c%3A%20API%20break) to the relevant issues, so they get listed in the upcoming Release notes. ### Deprecations @@ -454,7 +454,7 @@ Using this standard form ensures that we can write a script to detect all deprec To determine the latest beta version, see . -When adding a deprecation notice to the framework, a flutter fix should be included with your change. This helps users migrate to the new API as easily as possible. To learn more about authoring fixes, see [Data driven Fixes](https://github.com/flutter/flutter/wiki/Data-driven-Fixes). If a fix cannot be written for the new API, please file an issue in https://github.com/dart-lang/sdk and link to it in your change. +When adding a deprecation notice to the framework, a flutter fix should be included with your change. This helps users migrate to the new API as easily as possible. To learn more about authoring fixes, see [Data driven Fixes](Data-driven-Fixes.md). If a fix cannot be written for the new API, please file an issue in https://github.com/dart-lang/sdk and link to it in your change. When deprecating features, be aware that *you* will not by default be informed when the Flutter code itself uses the deprecated feature (there is a `deprecated_member_use_from_same_package: ignore` line in the root `analysis_options.yaml` file). To find places where the old feature is used, rename its declaration and see where the compiler complains. (You can't just comment out the "ignore" in the `analysis_options.yaml` file because it's hiding hundreds of other warnings...) diff --git a/docs/unsorted_wiki/What-should-I-work-on.md b/docs/contributing/What-should-I-work-on.md similarity index 83% rename from docs/unsorted_wiki/What-should-I-work-on.md rename to docs/contributing/What-should-I-work-on.md index 4c0a9bbf3b9c3..b1b9fa7d2f7d5 100644 --- a/docs/unsorted_wiki/What-should-I-work-on.md +++ b/docs/contributing/What-should-I-work-on.md @@ -8,8 +8,8 @@ This page attempts to be a one-stop shop for figuring out what the most importan 1. [Flaky tests](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3A%22team%3A+flakes%22+sort%3Aupdated-asc). 1. Performance regressions. Check the [dashboard](https://flutter-dashboard.appspot.com/benchmarks.html) for new unreported regressions and see GitHub for the list of [reported performance regressions](https://github.com/flutter/flutter/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22c%3A+performance%22+label%3A%22c%3A+regression%22+). 1. [Other regressions](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3A%22c%3A+regression%22). - 1. Reducing technical debt. (For example, increasing [our test coverage](https://github.com/flutter/flutter/wiki/Test-coverage-for-package%3Aflutter) by [writing new tests](https://github.com/flutter/flutter/wiki/Running-and-writing-tests), or fixing TODOs.) -1. [P2 issues](https://github.com/flutter/flutter/labels/P1), which correspond to the remaining areas of our [[roadmap]], such as: + 1. Reducing technical debt. (For example, increasing [our test coverage](./testing/Test-coverage-for-package-flutter.md) by [writing new tests](./testing/Running-and-writing-tests.md), or fixing TODOs.) +1. [P2 issues](https://github.com/flutter/flutter/labels/P1), which correspond to the remaining areas of our [roadmap](../roadmap/Roadmap.md), such as: * Bugs marked as [annoyances](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3A%22a%3A+annoyance%22+sort%3Areactions-%2B1-desc). * Bugs labeled as issues of [quality](https://github.com/flutter/flutter/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+label%3A%22a%3A+quality%22+sort%3Areactions-%2B1-desc+). * Bugs with the [crash](https://github.com/flutter/flutter/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+label%3A%22c%3A+crash%22+sort%3Areactions-%2B1-desc+) label. @@ -18,10 +18,10 @@ This page attempts to be a one-stop shop for figuring out what the most importan Bugs in other bug systems should be tracked with bugs in GitHub. OKRs should be reflected in the items listed above. For example, OKRs should reflect what the roadmap covers, expected customer blockers, and so forth. Work that is unique to a particular quarter would be represented by a filed bug with a milestone and assignee. -During [[triage]], bugs should be prioritized according to the [P0-P3 labels](https://github.com/flutter/flutter/wiki/Issue-hygiene#priorities) so as to fit the order described above. +During [triage](../triage/README.md), bugs should be prioritized according to the [P0-P3 labels](./issue_hygiene/README.md#priorities) so as to fit the order described above. Sometimes, items in the list above escalate. For example, a bug might get filed as a P2 issue, then be recognized as a critical regression and upgraded to P0. See also: - * [[Issue Hygiene]], in particular the section on prioritization. \ No newline at end of file + * [Issue Hygiene](./issue_hygiene/README.md), in particular the section on prioritization. \ No newline at end of file diff --git a/docs/unsorted_wiki/Making-animated-GIFs-of-Flutter-apps.md b/docs/contributing/issue_hygiene/Making-animated-GIFs-of-Flutter-apps.md similarity index 100% rename from docs/unsorted_wiki/Making-animated-GIFs-of-Flutter-apps.md rename to docs/contributing/issue_hygiene/Making-animated-GIFs-of-Flutter-apps.md diff --git a/docs/unsorted_wiki/Popular-issues.md b/docs/contributing/issue_hygiene/Popular-issues.md similarity index 89% rename from docs/unsorted_wiki/Popular-issues.md rename to docs/contributing/issue_hygiene/Popular-issues.md index 3a2c0c8e3d796..1a5ba491ca6f1 100644 --- a/docs/unsorted_wiki/Popular-issues.md +++ b/docs/contributing/issue_hygiene/Popular-issues.md @@ -16,7 +16,7 @@ There are three main areas that people are referring to here: * **Modular application delivery**: the ability to package a single app into multiple separate archives when compiling it, and download them independently as needed. This is supported on Android via [deferred components](https://docs.flutter.dev/perf/deferred-components). We suspect it is not possible to achieve this on iOS with Apple's current guidelines and tools. We have not yet attempted to provide this on desktop or web, primarily because we have more important issues to resolve on those platforms first. -* **Dynamic extension loading**: the ability to download some Dart code that wasn't written when the app was first published, which adds a new feature to the app. This could be done on the fly. It may require the core app to be larger since we can't know ahead of time what is needed by each future extension. There are various solutions in this space, such as combining [the rfw package](https://pub.dev/packages/rfw) and an FFI-based or Wasm-based solution (e.g. [package:wasm](https://pub.dev/packages/wasm)). There is [an example](https://github.com/flutter/packages/tree/master/packages/rfw/example/wasm) that provides a proof-of-concept for this combination of packages: a Flutter desktop application that knows nothing about being a calculator downloads an interface description specifying all the buttons and their layout to show on the screen, and downloads a C program compiled to Wasm to perform the calculations. The Flutter program is merely a bridge between these two downloaded files. We are looking for feedback from people using this feature; please add your experiences to [issue 90218](https://github.com/flutter/flutter/issues/90218). +* **Dynamic extension loading**: the ability to download some Dart code that wasn't written when the app was first published, which adds a new feature to the app. This could be done on the fly. It may require the core app to be larger since we can't know ahead of time what is needed by each future extension. There are various solutions in this space, such as combining [the rfw package](https://pub.dev/packages/rfw) and an FFI-based or Wasm-based solution (e.g. [package:wasm](https://pub.dev/packages/wasm)). There is [an example](https://github.com/flutter/packages/tree/main/packages/rfw/example/wasm) that provides a proof-of-concept for this combination of packages: a Flutter desktop application that knows nothing about being a calculator downloads an interface description specifying all the buttons and their layout to show on the screen, and downloads a C program compiled to Wasm to perform the calculations. The Flutter program is merely a bridge between these two downloaded files. We are looking for feedback from people using this feature; please add your experiences to [issue 90218](https://github.com/flutter/flutter/issues/90218). * **Dynamic patching**: the ability to update the Dart code of an app in the field by downloading a patch (of sorts) and providing it to the Dart VM. This would require a reload of the app to take effect. Dynamic patching was previously on our roadmap for 2019. After investigating this in greater detail, we decided not to proceed with that work. There were several factors that led us to this decision: @@ -32,13 +32,13 @@ There are three main areas that people are referring to here: Currently, we see this as a lower priority than our other release-related work (such as working towards [SLSA compliance](https://slsa.dev)). There are a number of other mechanisms for obtaining Flutter today, so this does not immediately unblock anyone, it is "merely" a convenience. That said, we recognize that homebrew is a pretty idiomatic way of getting software for developers on macOS, and so the request is quite valid. -If anyone would be interested in implementing an official homebrew installation path, the best thing to do would be to reach out on the #hackers-releases channel of our Discord (see [[Chat]]). Implementing it would require integrating into our release pipeline, so familiarity with that would be extremely helpful. It would also require carefully negotiating how Flutter's primary distribution mechanism (shipping the `git` repo directly) should interact with Homebrew's mechanisms, so familiarity with both of those would also be needed. +If anyone would be interested in implementing an official homebrew installation path, the best thing to do would be to reach out on the #hackers-releases channel of our Discord (see [Chat](../Chat.md)). Implementing it would require integrating into our release pipeline, so familiarity with that would be extremely helpful. It would also require carefully negotiating how Flutter's primary distribution mechanism (shipping the `git` repo directly) should interact with Homebrew's mechanisms, so familiarity with both of those would also be needed. ## [Design a new vector file format](https://github.com/flutter/flutter/issues/1831) (#1831) A [design document](https://flutter.dev/go/vector-graphics) containing both a detailed study of the problem and a strawman proposal have been published (comments welcome). The primary goal of the strawman proposal is to see if it is possible to create a format that is implemented entirely on the GPU (the thought being that creating yet another CPU-bound format doesn't really bring the industry forward). The next step is to experiment with implementing the proposal. Unfortunately all our shader experts are currently busy on higher-priority problems (like improving rendering performance and reducing jank), so this work has stalled. -As usual, contributions are welcome. Reach out to Hixie directly (either by e-mail, ian@hixie.ch, or on our [[Chat]] channels) if you are interested in helping out. +As usual, contributions are welcome. Reach out to Hixie directly (either by e-mail, ian@hixie.ch, or on our [Chat](../Chat.md) channels) if you are interested in helping out. ## [Enable "hot reload" (not just "hot restart") for Flutter Web](https://github.com/flutter/flutter/issues/53041) (#53041) @@ -49,7 +49,7 @@ to see progress soon. It is a technically extremely difficult and subtle problem This feature is one that is recognized as important. There are some prerequisites, like improving Flutter's deep linking and accessibility features, which we have to deal with first. There are also other issues, like those around performance, plugins, and embedding, that are currently higher on the list for people who are currently contributing to Flutter's web support. -Fixing this issue is non-trivial, as Flutter's architecture is one that is fundamentally different than what the web usually expects. If you are interested in contributing, the best place to begin would be to discuss potential approaches on our #hackers-web [[Chat]] channel, followed by writing up a design doc (the process for which is also on the [[Chat]] page). +Fixing this issue is non-trivial, as Flutter's architecture is one that is fundamentally different than what the web usually expects. If you are interested in contributing, the best place to begin would be to discuss potential approaches on our #hackers-web [Chat](../Chat.md) channel, followed by writing up a design doc (the process for which is also on the [Chat](../Chat.md) page). ## [Bring Material 3 to Flutter](https://github.com/flutter/flutter/issues/91605) (#91605) diff --git a/docs/unsorted_wiki/Issue-hygiene.md b/docs/contributing/issue_hygiene/README.md similarity index 87% rename from docs/unsorted_wiki/Issue-hygiene.md rename to docs/contributing/issue_hygiene/README.md index 9666b34134271..eddbe64b7ad4c 100644 --- a/docs/unsorted_wiki/Issue-hygiene.md +++ b/docs/contributing/issue_hygiene/README.md @@ -33,7 +33,7 @@ Adding comments explaining how a bug is dire and how you will stop using Flutter if it is not fixed is upsetting for the engineers working on Flutter (many of whom are volunteers, not that being paid to work on Flutter makes such comments any less upsetting). Out of a respect for the team, and as required by our [code -of conduct](https://github.com/flutter/flutter/blob/master/CODE_OF_CONDUCT.md), we +of conduct](https://github.com/flutter/flutter/blob/main/CODE_OF_CONDUCT.md), we ask that you avoid adding comments that are not actively helpful. There are other venues if you want to complain without being constructive. @@ -42,11 +42,11 @@ being full of comments asking for updates and that makes finding useful informat in a bug harder (an exception might be if you are participating in the triage process, but even then consider reaching out to people directly if possible). If you believe there could be information that has not been posted, ask on our Discord server instead -(see [[Chat]]). +(see [Chat](../Chat.md)). ### Issues are not always the best venue for discussions -Discussions within an issue should remain focused on the topic, specifically about what the filed issue is and how to solve it. Broader discussions are best suited to happen on Discord (see [[Chat]]) or in design docs using Google Docs (see [[Design Documents]]). This is because GitHub hides comments, doesn't have threading, notifications get lost in the swamp of other GitHub e-mails, etc. +Discussions within an issue should remain focused on the topic, specifically about what the filed issue is and how to solve it. Broader discussions are best suited to happen on Discord (see [Chat](../Chat.md)) or in design docs using Google Docs (see [Design Documents](../Design-Documents.md)). This is because GitHub hides comments, doesn't have threading, notifications get lost in the swamp of other GitHub e-mails, etc. If you move to another tool for part of the discussion, remember to add a summary of the discussion and document any decisions that took place. This allows people following the issue to keep updated and continue to participate. @@ -76,7 +76,7 @@ can be copied and pasted into a test case. To debug a problem, we will need to be able to reproduce it. The best way to help us do that is to provide code, licensed according to [the BSD license -used by Flutter](https://github.com/flutter/flutter/blob/master/LICENSE), that +used by Flutter](https://github.com/flutter/flutter/blob/main/LICENSE), that has been reduced as far as possible (such that removing anything further stops showing the bug). Attach such a file or files to the issue itself. @@ -98,7 +98,7 @@ able to assist you will be reduced. ## Locking an issue -**Closed** issues that haven't received any activity in a [few weeks](https://github.com/flutter/flutter/blob/master/.github/lock.yml#L4) +**Closed** issues that haven't received any activity in a [few weeks](https://github.com/flutter/flutter/blob/main/.github/lock.yml#L4) are automatically locked by a [bot](https://github.com/apps/lock). This is done to encourage developers to file new bugs, instead of piling comments on old ones. @@ -115,14 +115,14 @@ or might not be the same as this one". If you are concerned that such an issue is not receiving its due attention, see Escalating an Issue, described above. If you are not already a contributor but would like to work on that issue, -consider reaching out on an appropriate [chat](https://github.com/flutter/flutter/wiki/Chat). +consider reaching out on an appropriate [chat](../Chat.md). If you have a similar issue and are not sure if it is the same, it is fine to file a new issue and linking it to the other issue. Please avoid intentionally filing duplicates. Very rarely, an issue gets locked because discussion has become -unproductive and has repeatedly violated the [Code of Conduct](https://github.com/flutter/flutter/blob/master/CODE_OF_CONDUCT.md). +unproductive and has repeatedly violated the [Code of Conduct](https://github.com/flutter/flutter/blob/main/CODE_OF_CONDUCT.md). ## Priorities @@ -130,7 +130,7 @@ unproductive and has repeatedly violated the [Code of Conduct](https://github.co **The [`P0`](https://github.com/flutter/flutter/labels/P0) label** indicates that the issue is one of the following: * a build break, regression, or failure in an existing feature that prevents us from shipping the current build. * an important item of technical debt that we want to fix promptly because it is impacting team velocity. -* an issue blocking, or about to block, a top-tier customer. (See [below](https://github.com/flutter/flutter/wiki/Issue-hygiene#customers) under "customers" for a definition of "top-tier customer".) +* an issue blocking, or about to block, a top-tier customer. (See [below](#customers) under "customers" for a definition of "top-tier customer".) There are generally less than twenty-five P0 bugs (one GitHub search results page). If you find yourself assigning a P0 label to an issue, please be sure that there's a positive handoff between filing and a prospective owner for the issue. @@ -146,7 +146,7 @@ Issues at this level should be resolved in a matter of months and should have mo **The [`P3`](https://github.com/flutter/flutter/labels/P3) label** indicates issues that we currently consider less important to the Flutter project. We use "thumbs-up" on these issues as a signal when discussing whether to promote them to P2 or higher based on demand. (Of course, this does not mean the issues are not important to _you_, just that we don't view them as the especially important for Flutter itself.) -Typically we would accept PRs for `P3` issues (assuming they follow our [style guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo) and follow our [other rules](https://github.com/flutter/flutter/wiki/Tree-hygiene)). Issues marked with the [`would require significant investment`](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3A%22would+require+significant+investment%22) label may require more than just a PR, for example, adding support for a whole new platform will require a commitment to provide CI resources for build and test, and someone to own the maintenance of those systems. +Typically we would accept PRs for `P3` issues (assuming they follow our [style guide](../Style-guide-for-Flutter-repo.md) and follow our [other rules](../Tree-hygiene.md)). Issues marked with the [`would require significant investment`](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3A%22would+require+significant+investment%22) label may require more than just a PR, for example, adding support for a whole new platform will require a commitment to provide CI resources for build and test, and someone to own the maintenance of those systems. ### When will my bug be fixed? @@ -154,13 +154,13 @@ Flutter is an open source project and many people contribute their time (or thei To determine when a bug will be fixed, look at the issue. -If there's a recent status update on the issue, that is the best information we have about the bug. If there's a lot of comments on the issue, we try to link to the latest status from the top comment, so look there. (Please [don't _ask_](https://github.com/flutter/flutter/wiki/Issue-hygiene#do-not-add-me-too-or-same-or-is-there-an-update-comments-to-bugs) for updates, though.) +If there's a recent status update on the issue, that is the best information we have about the bug. If there's a lot of comments on the issue, we try to link to the latest status from the top comment, so look there. (Please [don't _ask_](#do-not-add-me-too-or-same-or-is-there-an-update-comments-to-bugs) for updates, though.) If the issue is labeled with priorities `P0` or `P1`, or if the issue is assigned, we are likely to address it in the near term; we just need to find time. Otherwise, we don't know when we're going to fix it. We may never get to it. In general, `P2` bugs are seen as more important than `P3` bugs. See the more detailed definitions of _priorities_ above. -_See also [[Popular issues]]._ +_See also [Popular issues](../issue_hygiene/Popular-issues.md)._ ### Escalating an issue that has the wrong priority @@ -169,7 +169,7 @@ your contact if you think the priority should be changed. If you don't, consider finding like-minded developers to either implement the feature as a team, or to fund hiring someone to work on the feature, -or to [mark the issue with a thumbs-up reaction](https://github.com/flutter/flutter/wiki/Issue-hygiene#thumbs-up-reactions). +or to [mark the issue with a thumbs-up reaction](#thumbs-up-reactions). Please don't comment on an issue to indicate your interest. Comments should be reserved for making progress on the issue. @@ -213,17 +213,17 @@ Common naming conventions for labels include: - **`d: *`** - The green `d` ("documentation") labels are for organizing our documentation-related issues. - **`dependency: *`** - Indicates the upstream team for issues that are blocked on some work from an upstream project (e.g. Skia, Dart). - **`e: *`** - The `e` ("engine") prefix is for subsets of the Flutter engine ([flutter/engine](https://github.com/flutter/engine)). -- **`f: *`** - The `f` ("framework") prefix is for subsets of the Flutter framework ([flutter/flutter's packages/flutter/](https://github.com/flutter/flutter/tree/master/packages/flutter)). +- **`f: *`** - The `f` ("framework") prefix is for subsets of the Flutter framework ([flutter/flutter's packages/flutter/](https://github.com/flutter/flutter/tree/main/packages/flutter)). - **`found in release: x.yy`** - Used for a series of labels that indicate which versions of Flutter an issue was found in. - **`from: *`** - Labels that indicate where an issue originated (e.g. research, postmortems), if it wasn't filed organically. -- **`t: *`** - The `t` ("tool") prefix is for subsets of the Flutter tool ([flutter/flutter's packages/flutter_tools/](https://github.com/flutter/flutter/tree/master/packages/flutter_tools)). +- **`t: *`** - The `t` ("tool") prefix is for subsets of the Flutter tool ([flutter/flutter's packages/flutter_tools/](https://github.com/flutter/flutter/tree/main/packages/flutter_tools)). - **`p: *`** - The `p` ("package") prefix is for specific packages ([flutter/packages](https://github.com/flutter/packages)). Light teal for packages and darker teal for plugins. - **`platform-*`** - The `platform` prefix is for bugs that are specific to one or more platforms. - **`r: *`** - The `r` ("resolution") prefix is used for labels that describe why an issue was closed. ### Adding labels -Labels are more or less free, so we can add them pretty easily. Please mention it to other team members first, so that they know what you are planning and can give feedback (please at a minimum mention it on `#hidden-chat` in our [[Chat]]). Please make sure labels use a consistent color and naming scheme (e.g. all the framework-related labels are blue and start with `f:`). +Labels are more or less free, so we can add them pretty easily. Please mention it to other team members first, so that they know what you are planning and can give feedback (please at a minimum mention it on `#hidden-chat` in our [Chat](../Chat.md)). Please make sure labels use a consistent color and naming scheme (e.g. all the framework-related labels are blue and start with `f:`). Labels should be used for adding information to a bug. If you plan to use a label to find all instances of a particular topic (e.g. finding all PRs where someone wrote a design doc), be aware that there's no way to force people to label issues or PRs. You can, however, rely on automation to do it, for example we have a script that labels all PRs that affect the framework. @@ -250,7 +250,7 @@ and senior leads want resolved to the attention of the appropriate engineering team. The `customer: crowd` label is used to represent bugs that are affecting large -numbers of people; during initial [[Triage]], high-profile bugs get labeled in +numbers of people; during initial [Triage](../../triage/README.md), high-profile bugs get labeled in this way to bring them to the attention of the engineering team. "Large numbers" is a judgement call. If dozens of people independently run into the same issue and file a bug and we end up realizing that they're all duplicates of each other, @@ -281,7 +281,7 @@ We do not use GitHub milestones to track work. Issues are typically self-assigned. Only assign a bug to someone else if they have explicitly volunteered to do the task. If you don't have permissions to assign yourself an issue you want to work on, don't worry about it, just -submit the PR (see [[Tree Hygiene]]). +submit the PR (see [Tree Hygiene](../Tree-hygiene.md)). Only assign a bug to yourself when you are actively working on it or scheduled to work on it. If you don't know when you'll be working @@ -329,14 +329,14 @@ If you have an idea that you would like to land, the recommended process is: 1. [File a bug](https://github.com/flutter/flutter/issues/new/choose) describing the problem. 2. Write a [design doc](https://flutter.dev/go/template) that references this problem and describes your solution. -3. Socialize your design on the bug you filed and on [[Chat]]. Collect feedback from various people. -4. Once you have received feedback, if it is mostly positive, implement your idea and submit it. See the [[Tree Hygiene]] wiki page for details on submitting PRs. +3. Socialize your design on the bug you filed and on [Chat](../Chat.md). Collect feedback from various people. +4. Once you have received feedback, if it is mostly positive, implement your idea and submit it. See the [Tree Hygiene](../Tree-hygiene.md) wiki page for details on submitting PRs. ### Every issue should be actionable Avoid filing issues that are on vague topics without a clear problem description. -Please close issues that are not actionable. See [[Triage]] for more details. +Please close issues that are not actionable. See [Triage](../../triage/README.md) for more details. #### Issues should have clear steps to reproduce @@ -349,12 +349,12 @@ If an issue is lacking this information, request it from the commenter and close An issue should be closed if: * it is fixed! -* it is a [duplicate](https://github.com/flutter/flutter/wiki/Triage#duplicates). +* it is a [duplicate](../../triage/README.md#duplicates). * it makes multiple requests which could be addressed independently. Encourage people to file separate bugs for each independent item. * it is describing a _solution_ rather than a _problem_. For example, it has no use cases, and the use cases are not obvious, or might have other solutions. -* it is not [actionable](https://github.com/flutter/flutter/wiki/Triage#what-makes-an-issue-actionable) and does not [have unusual symptoms](https://github.com/flutter/flutter/wiki/Triage#unactionable-bugs-with-unusual-symptoms). This covers a wide variety of cases, such as invalid bugs, bugs without steps to reproduce, bugs that have become irrelevant, or bugs that are unclear and which the reporter has not offered more details for. It also includes non-catastrophic bugs that cannot be reproduced by anyone but the original reporter. For this latter case, encourage the reporter to attempt to debug the issue themselves, potentially giving suggestions for places where they could instrument the code to find the issue, and invite them to join the Discord for help; then add the `waiting for customer response` label. The issue will get automatically closed after a few weeks if they don't respond. +* it is not [actionable](../../triage/README.md#what-makes-an-issue-actionable) and does not [have unusual symptoms](../../triage/README.md#unactionable-bugs-with-unusual-symptoms). This covers a wide variety of cases, such as invalid bugs, bugs without steps to reproduce, bugs that have become irrelevant, or bugs that are unclear and which the reporter has not offered more details for. It also includes non-catastrophic bugs that cannot be reproduced by anyone but the original reporter. For this latter case, encourage the reporter to attempt to debug the issue themselves, potentially giving suggestions for places where they could instrument the code to find the issue, and invite them to join the Discord for help; then add the `waiting for customer response` label. The issue will get automatically closed after a few weeks if they don't respond. * it is a feature request that we are unlikely to ever address, and if we did address it, it would not be part of the core SDK (e.g. it would be in a package). (For example, anything in the [`would be a good package` `P3`](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3A%22would+be+a+good+package%22+label%3AP3) list is a good candidate for closing without fixing.) -* we would not accept a fix even if one were to be offered ([e.g. support for platforms at level of support 4](https://github.com/flutter/flutter/wiki/Values#levels-of-support)). +* we would not accept a fix even if one were to be offered ([e.g. support for platforms at level of support 4](../../about/Values.md#levels-of-support)). * it is an issue regarding internal processes, tooling, or infrastructure (i.e. something that our users are not affected by), that we have no plans to get to (e.g. that would be marked P3). (For example, anything in the [`c: tech-debt` `P3`](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3A%22c%3A+tech-debt%22+label%3AP3) list is a good candidate for closing.) * it is tracking technical debt but the suggested improvements are marginal at best or would require significant research to be evaluated. Prefer having folks who work in the relevant part of the code make improvements based on their judgment. @@ -384,4 +384,4 @@ If you need to track some work item, you can file a bug and assign it to yoursel When a test flakes, a P0 bug is automatically filed with the label [`team: flakes`](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3A%22team%3A+flakes%22+sort%3Aupdated-asc). This issue should be investigated with all due haste, and a priority level should then be assigned to the issue. At any particular time, the most flaky tests should remain P0. However, flakes that are hard to pin down may be downgraded in priority (e.g. to P1). Please do not ignore the issue entirely, however, and make sure to close bugs once they are resolved, even if it's by magic. -_See also: [[Reducing test flakiness]]_ \ No newline at end of file +_See also: [Reducing test flakiness](../../infra/Reducing-Test-Flakiness.md)_ \ No newline at end of file diff --git a/docs/unsorted_wiki/Flutter-Test-Fonts.md b/docs/contributing/testing/Flutter-Test-Fonts.md similarity index 100% rename from docs/unsorted_wiki/Flutter-Test-Fonts.md rename to docs/contributing/testing/Flutter-Test-Fonts.md diff --git a/docs/unsorted_wiki/How-to-write-a-memory-test-for-Flutter.md b/docs/contributing/testing/How-to-write-a-memory-test-for-Flutter.md similarity index 90% rename from docs/unsorted_wiki/How-to-write-a-memory-test-for-Flutter.md rename to docs/contributing/testing/How-to-write-a-memory-test-for-Flutter.md index 91927eb5f220d..d88677f5bdec9 100644 --- a/docs/unsorted_wiki/How-to-write-a-memory-test-for-Flutter.md +++ b/docs/contributing/testing/How-to-write-a-memory-test-for-Flutter.md @@ -86,36 +86,36 @@ To write a new iOS memory test case `some_memory_perf` and add it to Flutter’s - Memory polling mechanism may incur additional memory overhead. -[manifest]: https://github.com/flutter/flutter/blob/master/dev/devicelab/manifest.yaml +[manifest]: https://github.com/flutter/flutter/blob/main/dev/devicelab/manifest.yaml -[tasks]: https://github.com/flutter/flutter/tree/master/dev/devicelab/bin/tasks +[tasks]: https://github.com/flutter/flutter/tree/main/dev/devicelab/bin/tasks [class MemoryTest]: https://github.com/flutter/flutter/blob/51bb11f7cece47840a9ee6d6d43db97ab16b31df/dev/devicelab/lib/tasks/perf_tests.dart#L941 [complex layout memory manifest]: https://github.com/flutter/flutter/blob/7e41425d4af21dec7a7ff072a3ec1387859e32c8/dev/devicelab/manifest.yaml#L329 -[complex layout memory task]: https://github.com/flutter/flutter/blob/master/dev/devicelab/bin/tasks/complex_layout_scroll_perf__memory.dart +[complex layout memory task]: https://github.com/flutter/flutter/blob/main/dev/devicelab/bin/tasks/complex_layout_scroll_perf__memory.dart -[complex layout memory main]: https://github.com/flutter/flutter/blob/master/dev/benchmarks/complex_layout/test_memory/scroll_perf.dart +[complex layout memory main]: https://github.com/flutter/flutter/blob/main/dev/benchmarks/complex_layout/test_memory/scroll_perf.dart [fast scroll memory manifest]: https://github.com/flutter/flutter/blob/7e41425d4af21dec7a7ff072a3ec1387859e32c8/dev/devicelab/manifest.yaml#L837 -[fast scroll memory task]: https://github.com/flutter/flutter/blob/master/dev/devicelab/bin/tasks/fast_scroll_large_images__memory.dart +[fast scroll memory task]: https://github.com/flutter/flutter/blob/main/dev/devicelab/bin/tasks/fast_scroll_large_images__memory.dart -[fast scroll memory main]: https://github.com/flutter/flutter/blob/master/dev/benchmarks/macrobenchmarks/test_memory/large_images.dart +[fast scroll memory main]: https://github.com/flutter/flutter/blob/main/dev/benchmarks/macrobenchmarks/test_memory/large_images.dart [class DevToolsMemoryTest]: https://github.com/flutter/flutter/blob/7e41425d4af21dec7a7ff072a3ec1387859e32c8/dev/devicelab/lib/tasks/perf_tests.dart#L1138 [complex layout devtools memory manifest]: https://github.com/flutter/flutter/blob/7e41425d4af21dec7a7ff072a3ec1387859e32c8/dev/devicelab/manifest.yaml#L359 -[complex layout devtools memory task]: https://github.com/flutter/flutter/blob/master/dev/devicelab/bin/tasks/complex_layout_scroll_perf__devtools_memory.dart +[complex layout devtools memory task]: https://github.com/flutter/flutter/blob/main/dev/devicelab/bin/tasks/complex_layout_scroll_perf__devtools_memory.dart [large image changer manifest]: https://github.com/flutter/flutter/blob/7e41425d4af21dec7a7ff072a3ec1387859e32c8/dev/devicelab/manifest.yaml#L874 -[large image changer task]: https://github.com/flutter/flutter/blob/master/dev/devicelab/bin/tasks/large_image_changer_perf_android.dart +[large image changer task]: https://github.com/flutter/flutter/blob/main/dev/devicelab/bin/tasks/large_image_changer_perf_android.dart [Dart timeline]:https://flutter.dev/docs/development/tools/devtools/timeline [large image changer manifest ios]: https://github.com/flutter/flutter/blob/7e41425d4af21dec7a7ff072a3ec1387859e32c8/dev/devicelab/manifest.yaml#L880 -[large image changer task ios]: https://github.com/flutter/flutter/blob/master/dev/devicelab/bin/tasks/large_image_changer_perf_ios.dart +[large image changer task ios]: https://github.com/flutter/flutter/blob/main/dev/devicelab/bin/tasks/large_image_changer_perf_ios.dart diff --git a/docs/unsorted_wiki/How-to-write-a-render-speed-test-for-Flutter.md b/docs/contributing/testing/How-to-write-a-render-speed-test-for-Flutter.md similarity index 93% rename from docs/unsorted_wiki/How-to-write-a-render-speed-test-for-Flutter.md rename to docs/contributing/testing/How-to-write-a-render-speed-test-for-Flutter.md index d93e705315e52..bc5d281ac5b45 100644 --- a/docs/unsorted_wiki/How-to-write-a-render-speed-test-for-Flutter.md +++ b/docs/contributing/testing/How-to-write-a-render-speed-test-for-Flutter.md @@ -217,42 +217,42 @@ Tasks will be run automatically in the [devicelab], and the result is shown in [ Big congratulations if you've successfully finished all steps above! You just made a big contribution to Flutter's performance. Please also feel encouraged to improve this doc to help future contributors (which probably include a future yourself that would forget something above in a few months)! -[flutter_driver]: https://github.com/flutter/flutter/tree/master/packages/flutter_driver +[flutter_driver]: https://github.com/flutter/flutter/tree/main/packages/flutter_driver -[macrobenchmarks]: https://github.com/flutter/flutter/tree/master/dev/benchmarks/macrobenchmarks +[macrobenchmarks]: https://github.com/flutter/flutter/tree/main/dev/benchmarks/macrobenchmarks [cocoon]: https://github.com/flutter/cocoon -[devicelab]: https://github.com/flutter/flutter/tree/master/dev/devicelab +[devicelab]: https://github.com/flutter/flutter/tree/main/dev/devicelab -[dev/devicelab/manifest.yaml]: https://github.com/flutter/flutter/tree/master/dev/devicelab/manifest.yaml +[dev/devicelab/manifest.yaml]: https://github.com/flutter/flutter/tree/main/dev/devicelab/manifest.yaml [flutter_repo]: https://github.com/flutter/flutter -[macrobenchmarks/lib/src]: https://github.com/flutter/flutter/tree/master/dev/benchmarks/macrobenchmarks/lib/src +[macrobenchmarks/lib/src]: https://github.com/flutter/flutter/tree/main/dev/benchmarks/macrobenchmarks/lib/src -[macrobenchmarks/lib/common.dart]: https://github.com/flutter/flutter/tree/master/dev/benchmarks/macrobenchmarks/lib/common.dart +[macrobenchmarks/lib/common.dart]: https://github.com/flutter/flutter/tree/main/dev/benchmarks/macrobenchmarks/lib/common.dart -[macrobenchmarks/lib/main.dart]: https://github.com/flutter/flutter/tree/master/dev/benchmarks/macrobenchmarks/lib/main.dart +[macrobenchmarks/lib/main.dart]: https://github.com/flutter/flutter/tree/main/dev/benchmarks/macrobenchmarks/lib/main.dart [`MacrobenchmarksApp`]: https://github.com/flutter/flutter/blob/94b7ff241e6e5445b7f30215a777eb4971311797/dev/benchmarks/macrobenchmarks/lib/main.dart#L24 [`HomePage`'s `ListView`]: https://github.com/flutter/flutter/blob/94b7ff241e6e5445b7f30215a777eb4971311797/dev/benchmarks/macrobenchmarks/lib/main.dart#L58 -[macrobenchmarks/test_driver]: https://github.com/flutter/flutter/tree/master/dev/benchmarks/macrobenchmarks/test_driver +[macrobenchmarks/test_driver]: https://github.com/flutter/flutter/tree/main/dev/benchmarks/macrobenchmarks/test_driver -[macrobenchmarks/test_driver/run_app.dart]: https://github.com/flutter/flutter/tree/master/dev/benchmarks/macrobenchmarks/test_driver/run_app.dart +[macrobenchmarks/test_driver/run_app.dart]: https://github.com/flutter/flutter/tree/main/dev/benchmarks/macrobenchmarks/test_driver/run_app.dart -[macrobenchmarks/README.md]: https://github.com/flutter/flutter/blob/master/dev/benchmarks/macrobenchmarks/README.md +[macrobenchmarks/README.md]: https://github.com/flutter/flutter/blob/main/dev/benchmarks/macrobenchmarks/README.md -[dev/devicelab/bin/tasks]: https://github.com/flutter/flutter/tree/master/dev/devicelab/bin/tasks +[dev/devicelab/bin/tasks]: https://github.com/flutter/flutter/tree/main/dev/devicelab/bin/tasks -[dev/devicelab/lib/tasks/perf_tests.dart]: https://github.com/flutter/flutter/tree/master/dev/devicelab/lib/tasks/perf_tests.dart +[dev/devicelab/lib/tasks/perf_tests.dart]: https://github.com/flutter/flutter/tree/main/dev/devicelab/lib/tasks/perf_tests.dart [flutter-dashboard]: https://flutter-dashboard.appspot.com/benchmarks.html [e2e]: https://pub.dev/packages/e2e -[macrobenchmarks/test_driver/e2e_test.dart]: https://github.com/flutter/flutter/blob/master/dev/benchmarks/macrobenchmarks/test_driver/e2e_test.dart +[macrobenchmarks/test_driver/e2e_test.dart]: https://github.com/flutter/flutter/blob/main/dev/benchmarks/macrobenchmarks/test_driver/e2e_test.dart -[macrobenchmarks/test]: https://github.com/flutter/flutter/blob/master/dev/benchmarks/macrobenchmarks/test \ No newline at end of file +[macrobenchmarks/test]: https://github.com/flutter/flutter/blob/main/dev/benchmarks/macrobenchmarks/test \ No newline at end of file diff --git a/docs/unsorted_wiki/Running-Flutter-Driver-tests-with-Web.md b/docs/contributing/testing/Running-Flutter-Driver-tests-with-Web.md similarity index 97% rename from docs/unsorted_wiki/Running-Flutter-Driver-tests-with-Web.md rename to docs/contributing/testing/Running-Flutter-Driver-tests-with-Web.md index 0be539a0c4165..07c5cf2772cd3 100644 --- a/docs/unsorted_wiki/Running-Flutter-Driver-tests-with-Web.md +++ b/docs/contributing/testing/Running-Flutter-Driver-tests-with-Web.md @@ -86,7 +86,7 @@ For more details use the [documentation](https://github.com/flutter/web_installe ## Examples From Flutter Project -We already use Flutter Driver in many different places in Flutter Project. We have a smoke test running as a [Cirrus CI task](https://github.com/flutter/flutter/blob/master/.cirrus.yml#L291) in Flutter repo, which is also a great example for showing web_installers + flutter drive usage. +We already use Flutter Driver in many different places in Flutter Project. We have a smoke test running as a [Cirrus CI task](https://github.com/flutter/flutter/blob/main/.cirrus.yml#L291) in Flutter repo, which is also a great example for showing web_installers + flutter drive usage. ``` script: diff --git a/docs/unsorted_wiki/Running-and-writing-tests.md b/docs/contributing/testing/Running-and-writing-tests.md similarity index 84% rename from docs/unsorted_wiki/Running-and-writing-tests.md rename to docs/contributing/testing/Running-and-writing-tests.md index 57f9224607de5..51ffb010a0095 100644 --- a/docs/unsorted_wiki/Running-and-writing-tests.md +++ b/docs/contributing/testing/Running-and-writing-tests.md @@ -9,15 +9,15 @@ We support several kinds of tests: - Unit tests, e.g. using [`flutter_test`](https://api.flutter.dev/flutter/flutter_test/flutter_test-library.html). See below. - Unit tests that use golden-file testing, comparing pixels. - See [[Writing a golden-file test for package:flutter]]. + See [Writing a golden-file test for package:flutter](Writing-a-golden-file-test-for-package-flutter.md). -- End-to-end tests, e.g. using [`flutter_driver`](https://api.flutter.dev/flutter/flutter_driver/flutter_driver-library.html) and our [device lab](https://github.com/flutter/flutter/blob/master/dev/devicelab/README.md). +- End-to-end tests, e.g. using [`flutter_driver`](https://api.flutter.dev/flutter/flutter_driver/flutter_driver-library.html) and our [device lab](https://github.com/flutter/flutter/blob/main/dev/devicelab/README.md). -Our bots run on our [test and build infrastructure](https://github.com/flutter/flutter/blob/master/dev/bots/README.md). +Our bots run on our [test and build infrastructure](https://github.com/flutter/flutter/blob/main/dev/bots/README.md). ## Running unit tests -Flutter tests use the `flutter_test` package ([source](https://github.com/flutter/flutter/tree/master/packages/flutter_test), [API documentation](https://api.flutter.dev/flutter/flutter_test/flutter_test-library.html)), +Flutter tests use the `flutter_test` package ([source](https://github.com/flutter/flutter/tree/main/packages/flutter_test), [API documentation](https://api.flutter.dev/flutter/flutter_test/flutter_test-library.html)), which provides flutter-specific extensions on top of the [Dart `test` package](https://pub.dartlang.org/packages/test). To automatically find all files named `*_test.dart` inside a package's `test/` subdirectory, and @@ -45,7 +45,7 @@ before the test runs. To run analysis and all the tests for the entire Flutter repository, the same way that Cirrus runs them, run `dart dev/bots/test.dart` and `dart --enable-asserts dev/bots/analyze.dart`. -If you've built your own flutter engine (see [[Setting up the Engine development environment]]), you +If you've built your own flutter engine (see [Setting up the Engine development environment](../../engine/contributing/Setting-up-the-Engine-development-environment.md)), you can pass `--local-engine` to change what flutter shell `flutter test` uses. For example, if you built an engine in the `out/host_debug_unopt` directory, you can use: @@ -58,9 +58,9 @@ flutter test \ to run the tests in the locally built engine. Note that in this case you need to specify `host_debug_unopt` as both arguments. -To learn how to see how well tested the codebase is, see [[Test coverage for package:flutter]]. +To learn how to see how well tested the codebase is, see [Test coverage for package:flutter](Test-coverage-for-package-flutter.md). -_See also: [[Flutter Test Fonts]]_ +_See also: [Flutter Test Fonts](Flutter-Test-Fonts.md)_ ## Running device lab tests locally @@ -118,8 +118,8 @@ The following is an example of what running the local engine command might look The above command would use the local Flutter engine located at `/Users/myname/flutter/engine` to execute the `external_ui_integration_test` test on an Android emulator, which is why the `android_debug_unopt_x86` version of the engine is used. -Note that some tests may require `profile` mode instead of `debug` mode when running with local engine. Make sure to pass in the correct local engine. See [Compiling the engine](https://github.com/flutter/flutter/wiki/Compiling-the-engine) for more details. +Note that some tests may require `profile` mode instead of `debug` mode when running with local engine. Make sure to pass in the correct local engine. See [Compiling the engine](../../engine/contributing/Compiling-the-engine.md) for more details. ## For the engine -See the [[Testing the engine]] wiki. +See the [Testing the engine](../../engine/testing/Testing-the-engine.md) wiki. diff --git a/docs/contributing/testing/Writing-Effective-Tests.md b/docs/contributing/testing/Writing-Effective-Tests.md index 252b34c1c8f73..e2a8668c053f3 100644 --- a/docs/contributing/testing/Writing-Effective-Tests.md +++ b/docs/contributing/testing/Writing-Effective-Tests.md @@ -227,4 +227,4 @@ When writing tests, think about the developer who will read this test 6 months f # See also -- [Flutter Test Fonts](https://github.com/flutter/flutter/wiki/Flutter-Test-Fonts) +- [Flutter Test Fonts](Flutter-Test-Fonts.md) diff --git a/docs/contributing/testing/Writing-a-golden-file-test-for-package-flutter.md b/docs/contributing/testing/Writing-a-golden-file-test-for-package-flutter.md index 54aa24e4d027e..ae881741da85f 100644 --- a/docs/contributing/testing/Writing-a-golden-file-test-for-package-flutter.md +++ b/docs/contributing/testing/Writing-a-golden-file-test-for-package-flutter.md @@ -5,16 +5,14 @@ _(This page is referenced by comments in the Flutter codebase.)_ Golden file tests for `package:flutter` use [Flutter Gold](https://flutter-gold.skia.org/?query=source_type%3Dflutter) for baseline and version management of golden files. This allows for golden file testing on Linux, Windows, MacOS and Web, which accounts for the occasional subtle rendering differences between these platforms. ## Index -- [Known Issues](https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package:flutter#known-issues) -- [Build Breakage](https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package:flutter#build-breakage) -- [Creating a New Golden File Test](https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package%3Aflutter#creating-a-new-golden-file-test) -- [Updating a Golden File Test](https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package%3Aflutter#updating-a-golden-file-test -) -- [Flutter Gold Login](https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package%3Aflutter#flutter-gold-login -) -- [`flutter-gold` Check](https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package:flutter#flutter-gold-check) -- [`reduced-test-set` tag](https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package:flutter#reduced-test-set-tag) -- [Troubleshooting](https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package:flutter#troubleshooting) +- [Known Issues](#known-issues) +- [Build Breakage](#build-breakage) +- [Creating a New Golden File Test](#creating-a-new-golden-file-test) +- [Updating a Golden File Test](#updating-a-golden-file-test) +- [Flutter Gold Login](#flutter-gold-login) +- [`flutter-gold` Check](#flutter-gold-check) +- [`reduced-test-set` tag](#reduced-test-set-tag) +- [Troubleshooting](#troubleshooting) ## Known Issues @@ -30,6 +28,8 @@ If you would like to instantly invalidate all prior renderings, changing the nam If the Flutter build is broken due to a golden file test failure, this typically means an image change has landed without being triaged. Golden file images should be triaged in pre-submit before a change lands (as described in the steps below). If this process is not followed, a test with an unapproved golden file image will fail in post-submit testing. This will present in the following error message: + + ``` Skia Gold received an unapproved image in post-submit testing. Golden file images in flutter/flutter are triaged @@ -91,7 +91,7 @@ And that’s it! Your new golden file(s) will be checked in as the baseline(s) f ## Flutter Gold Login -Triage permission is currently restricted to members of *flutter-hackers*. For more information, see [Contributor Access](https://github.com/flutter/flutter/wiki/Contributor-access). +Triage permission is currently restricted to members of *flutter-hackers*. For more information, see [Contributor Access](../Contributor-access.md). Once you have been added as an authorized user for Flutter Gold, you can log in through the [homepage of the Flutter Gold dashboard](https://flutter-gold.skia.org/) and proceed to triage your image results under [Changelists](https://flutter-gold.skia.org/changelists). ## `flutter gold` Check diff --git a/docs/ecosystem/README.md b/docs/ecosystem/README.md index c0ef496a6635d..8a53cc47df9cd 100644 --- a/docs/ecosystem/README.md +++ b/docs/ecosystem/README.md @@ -1,7 +1,7 @@ This is an index of team-facing documentation for the [flutter/packages repository](https://github.com/flutter/packages/). - [Contributing to Plugins and Packages](contributing/README.md) -- [Flutter migrate](https://github.com/flutter/flutter/wiki/Flutter-migrate) +- [Flutter migrate](../wiki_archive/Flutter-migrate.md) - [Package migration to 1.0.0](Package-migration-to-1.0.0.md) - [Plugin Tests](testing/Plugin-Tests.md) - [Plugins and Packages repository structure](Plugins-and-Packages-repository-structure.md) diff --git a/docs/ecosystem/contributing/README.md b/docs/ecosystem/contributing/README.md index 0669bb6cfae99..4a4627911426d 100644 --- a/docs/ecosystem/contributing/README.md +++ b/docs/ecosystem/contributing/README.md @@ -1,4 +1,4 @@ -This page covers additional information that is specific to contributing to flutter/packages. If you aren't already familiar with the general guidance on Flutter contribution, start with [Tree hygiene](https://github.com/flutter/flutter/wiki/Tree-hygiene). +This page covers additional information that is specific to contributing to flutter/packages. If you aren't already familiar with the general guidance on Flutter contribution, start with [Tree hygiene](../../contributing/Tree-hygiene.md). ## Version and CHANGELOG updates @@ -178,12 +178,12 @@ On some platforms, there are multiple native languages that can be used to write - Currently our policy is to have a limited number of plugins in Kotlin, to ensure that we are finding Kotlin-specific plugin issues in our own development. - Java if the plugin is already in Java (which is almost all of them). - Allowing Kotlin more broadly is [under consideration](https://docs.google.com/document/d/1Ok_mUPgmw8_l-ynLueEKtXm2Fs48lEVB0JqZd7M7uyA/edit?usp=sharing), but currently most plugin development is limited to Java to avoid adding another language to the set of languages Flutter team members need to interact with regularly. - - If you are interested in taking on a **long-term ownership role in a plugin**, and would like to migrate it to Kotlin, please reach out in the `hackers-ecosystem` channel [on Discord](https://github.com/flutter/flutter/wiki/Chat). + - If you are interested in taking on a **long-term ownership role in a plugin**, and would like to migrate it to Kotlin, please reach out in the `hackers-ecosystem` channel [on Discord](../../contributing/Chat.md). - iOS: Depends on the plugin. The goal is to eventually migrate all plugins to Swift; see [the migration section below](#swift-migration-for-1p-plugins) for details. For non-migration PRs, use: - Swift if the plugin is entirely Swift. - Swift or Objective-C if the plugin is partially migrated. - Objective-C if the plugin is still entirely Objective-C. -- Linux: C. Use of C++ constructs is strongly discouraged; see [repo style notes](https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style) for details +- Linux: C. Use of C++ constructs is strongly discouraged; see [repo style notes](../../../CONTRIBUTING.md#style) for details - macOS: Swift only\*. - \* In some cases an existing iOS implementation has been updated to support macOS, so is Objective-C (e.g., `in_app_purchase`). This is the only case where Objective-C is allowed for macOS plugins. - Windows: C++. diff --git a/docs/ecosystem/contributing/Setting-up-the-Plugins-development-environment.md b/docs/ecosystem/contributing/Setting-up-the-Plugins-development-environment.md index 55f999b0118c3..ac605bb46aa8d 100644 --- a/docs/ecosystem/contributing/Setting-up-the-Plugins-development-environment.md +++ b/docs/ecosystem/contributing/Setting-up-the-Plugins-development-environment.md @@ -1 +1 @@ -The flutter/plugins repository is no longer in use. See [Setting up the Packages development environment](https://github.com/flutter/flutter/wiki/Setting-up-the-Packages-development-environment) instead. \ No newline at end of file +The flutter/plugins repository is no longer in use. See [Setting up the Packages development environment](Setting-up-the-Packages-development-environment.md) instead. \ No newline at end of file diff --git a/docs/ecosystem/release/Updating-Packages-repo-for-a-stable-release.md b/docs/ecosystem/release/Updating-Packages-repo-for-a-stable-release.md index aa0268450576b..c2813bf88b6b7 100644 --- a/docs/ecosystem/release/Updating-Packages-repo-for-a-stable-release.md +++ b/docs/ecosystem/release/Updating-Packages-repo-for-a-stable-release.md @@ -9,7 +9,7 @@ This page describes the process of updating flutter/packages after a stable Flut `dart run script/tool/bin/flutter_plugin_tools.dart update-min-sdk --flutter-min=3.7.0` - * Per [repo policy](https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#version), we do not version-bump these changes, so the associated `update-release-info` command should use `--version=next`. A convenient way to run the `update-release-info` command on only the necessary packages is to make the `update-min-sdk` run its own commit, then use `--base-branch HEAD^ --run-on-changed-packages` to target only the packages changed in that commit. + * Per [repo policy](../contributing/README.md#version), we do not version-bump these changes, so the associated `update-release-info` command should use `--version=next`. A convenient way to run the `update-release-info` command on only the necessary packages is to make the `update-min-sdk` run its own commit, then use `--base-branch HEAD^ --run-on-changed-packages` to target only the packages changed in that commit. * This must be done in the same PR as the previous step, or CI will fail. * The [release action](https://github.com/flutter/packages/blob/e7d812cefce083fa09762d25cd42303737d05b9f/.github/workflows/release.yml#L34) should be updated to use the new stable. diff --git a/docs/ecosystem/testing/Plugin-Tests.md b/docs/ecosystem/testing/Plugin-Tests.md index a4e691ba2a810..4c9aa6dd10e21 100644 --- a/docs/ecosystem/testing/Plugin-Tests.md +++ b/docs/ecosystem/testing/Plugin-Tests.md @@ -1,4 +1,4 @@ -*If you haven't already read it, start with [the repository structure overview](https://github.com/flutter/flutter/wiki/Plugins-and-Packages-repository-structure) to familiarize yourself with the types of packages discussed below.* +*If you haven't already read it, start with [the repository structure overview](../Plugins-and-Packages-repository-structure.md) to familiarize yourself with the types of packages discussed below.* ## Types of Tests @@ -131,7 +131,7 @@ flutter pub run build_runner build ## Adding tests -A PR changing a plugin [should add tests](https://github.com/flutter/flutter/wiki/Tree-hygiene#tests). Which type(s) of tests you should add will depend on what exactly you are changing. See below for some high-level guidance, but if you're not sure please ask in your PR or in `#hackers-ecosystem` [on Discord](https://github.com/flutter/flutter/wiki/Chat). +A PR changing a plugin [should add tests](../../contributing/Tree-hygiene.md#tests). Which type(s) of tests you should add will depend on what exactly you are changing. See below for some high-level guidance, but if you're not sure please ask in your PR or in `#hackers-ecosystem` [on Discord](../../contributing/Chat.md). Hopefully the scaffolding to run the necessary kinds of tests are already in place for that plugin, in which case you just add tests to the existing files in the locations referenced above. If not, see below for more information about adding test scaffolding. ### FAQ: Do I need to add tests even if the part of the code I'm changing isn't already tested? @@ -170,7 +170,7 @@ Some patterns to consider given all of the above: If a plugin is missing test scaffolding for the type of tests you want to add, you have several options: - If it's simple to enable them, and you are comfortable making the changes, you can enable them as part of your PR. - If it's non-trivial to enable them, but you are comfortable doing it, you can make a new PR that enables them with some minimal test, and ask for that to be reviewed and landed before continuing with your PR. -- If you aren't comfortable making the change, reach out [via Discord](https://github.com/flutter/flutter/wiki/Chat) and ask in `#hackers-ecosystem`. +- If you aren't comfortable making the change, reach out [via Discord](../../contributing/Chat.md) and ask in `#hackers-ecosystem`. Regardless of the approach you use, please reach out on Discord if a PR that sets up a new kind of test doesn't get reviewed within two weeks. Filling in the gaps in test scaffolding is a priority for the team, so we want to review such PRs quickly whenever possible. diff --git a/docs/ecosystem/testing/Understanding-Packages-tests.md b/docs/ecosystem/testing/Understanding-Packages-tests.md index e5f26c20ff089..8f985a018ef41 100644 --- a/docs/ecosystem/testing/Understanding-Packages-tests.md +++ b/docs/ecosystem/testing/Understanding-Packages-tests.md @@ -16,7 +16,7 @@ flutter/packages uses the same LUCI infrastructure as most of the rest of Flutte ### LUCI -This is the CI system used by flutter/flutter and flutter/engine. For information about LUCI results pages, see [Understanding a LUCI build failure](https://github.com/flutter/flutter/wiki/Understanding-a-LUCI-build-failure). +This is the CI system used by flutter/flutter and flutter/engine. For information about LUCI results pages, see [Understanding a LUCI build failure](../../infra/Understanding-a-LUCI-build-failure.md). #### Results @@ -40,7 +40,7 @@ GitHub Actions tasks are configured in `.github/workflows/`. The overall testing structure for flutter/packages is: - Most tests are run on only one host platform: Linux when possible, or the relevant platform if necessary (e.g., Windows target tests must run on Windows hosts, and iOS and macOS tests must run on macOS hosts). -- Most tests are run with both Flutter `master` and Flutter `stable` (see [discussion of supported platforms](https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#supported-flutter-versions) for more details). +- Most tests are run with both Flutter `master` and Flutter `stable` (see [discussion of supported platforms](../contributing/README.md#supported-flutter-versions) for more details). - Since in practice `stable`-only failures are very rare, CI is currently configured to only run `stable` in post-submit to reduce CI time and costs. - Architecture coverage is as-needed; we generally don't duplicate tests across architectures. For plugins, where architecture is most likely to be an issue, we try to run: - the majority of the tests (`*_platform_tests`) on the most popular architecture, and @@ -56,25 +56,25 @@ Exclusions **must** include explanatory comments, and in cases where they are no # Specific tests -In addition to Dart unit tests, Dart integration tests, and for plugins the various kinds of [native plugin tests](https://github.com/flutter/flutter/wiki/Plugin-Tests), there are a number of tests that check for repository best practices or to catch problems that have affected packages in the past. As a rule of thumb, any time we find a bug or mistake only *after* publishing a package, we try to add a check for that in CI to prevent similar issues in the future. +In addition to Dart unit tests, Dart integration tests, and for plugins the various kinds of [native plugin tests](Plugin-Tests.md), there are a number of tests that check for repository best practices or to catch problems that have affected packages in the past. As a rule of thumb, any time we find a bug or mistake only *after* publishing a package, we try to add a check for that in CI to prevent similar issues in the future. Below are descriptions of many of the less self-evident CI tests, and common solution to failures. Anyone adding new tests is encouraged to document them here. - **`submit-queue`**: This only shows in PRs (presubmit), and reflects the current state of the tree: if it is red, the tree is currently closed to commits (which can mean either that the tree is red, or that a recently landed PR is still running post-submit tests), and if it is green the tree is open. This has **no relation** to the PR itself, and as a PR author you do not need to do anything about it; Flutter team members monitor the state of the tree, and will handle failures. - There is a known issue that sometimes causes the status of this check to be stale; the causes is unknown. If this happens (i.e., the check in red but the tree state as described in the Infrastructure section above is actually green), you an either update your PR by merging in the latest `main` to force updates, or you can reach out to a Flutter team member (in a comment on the PR, or in Discord) to override the incorrect check. -- **`*_platform_tests`**: This runs each package's integration tests on the given target platform, as well as any [native plugin tests](https://github.com/flutter/flutter/wiki/Plugin-Tests) for that platform. This can also include native-language-specific analysis or lint checks. +- **`*_platform_tests`**: This runs each package's integration tests on the given target platform, as well as any [native plugin tests](Plugin-Tests.md) for that platform. This can also include native-language-specific analysis or lint checks. - **`analyze`**: The initial `analyze` step is a straightforward Dart `analyze` run, but the `pathified_analyze` step is more complicated; it is intended to find issues that will cause out-of-band breakage in our own repository when the change being tested is published (most commonly with federated plugins). It does this by finding all packages that have non-breaking-version changes in the PR, and then rewriting all references to those packages in the repository to be `path:` dependencies, then re-running analysis. A failure here does not necessarily mean that the PR is wrong; because we use very strict analysis options, changes that are not considered breaking by Dart semver conventions can break our CI. Common sources of failures here include: - Accidentally making a breaking change without making a major version change to the plugin. - **Solution**: Fix the versioning. - Deprecating something that is still in use by another package within the repository. - - **Solution**: Suppress the warnings with `// ignore: deprecated_member_use` annotations in the other packages using that method, [with a comment](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#comment-all--ignores) linking to the issue that tracks updating it. Once it lands, do a follow-up PR to update the calls and remove the `ignore`s. + - **Solution**: Suppress the warnings with `// ignore: deprecated_member_use` annotations in the other packages using that method, [with a comment](../../contributing/Style-guide-for-Flutter-repo.md#comment-all--ignores) linking to the issue that tracks updating it. Once it lands, do a follow-up PR to update the calls and remove the `ignore`s. - Adding a new enum value. We generally do not consider this breaking, but use your judgement and discuss with your reviewer; consider whether it is likely that clients have critical logic that depends on exhaustively handling all enum values, and what the effects are likely to be for those use cases if a new value is added. - **Solution**: If it's not treated as breaking, then temporary disable that analyzer warning while adding the value: - * In the PR that adds the value, suppress the warnings with `// ignore: exhaustive_cases` annotations, [with a comment](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#comment-all--ignores) linking to the issue that tracks updating it. + * In the PR that adds the value, suppress the warnings with `// ignore: exhaustive_cases` annotations, [with a comment](../../contributing/Style-guide-for-Flutter-repo.md#comment-all--ignores) linking to the issue that tracks updating it. * In the follow-up PR that picks up the new enum value and uses it, remove the `ignore`. -- **`legacy_version_analyze`**: Runs `analyze` with older versions of Flutter than the current `stable` on any package that claims to support them; see [the supported version policy](https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#supported-flutter-versions) for details. +- **`legacy_version_analyze`**: Runs `analyze` with older versions of Flutter than the current `stable` on any package that claims to support them; see [the supported version policy](../contributing/README.md#supported-flutter-versions) for details. - **Solution**: Unless you have a specific need to keep support for the old version (unlikely), just update the Flutter constraint in `pubspec.yaml` to exclude the failing version(s) of Flutter. - **`analyze_downgraded`**: Runs `analyze` after running a `pub downgrade`, to ensure that minimum constraints are correct (e.g., that you don't add usage of an API from version `x.1` of a dependency that is specified as `^x.0` in `pubspec.yaml`). - **Solution**: Update the relevant constraint to the version that introduced the new APIs. @@ -84,7 +84,7 @@ Below are descriptions of many of the less self-evident CI tests, and common sol - Otherwise, temporarily add the necessary package(s) to the `exclude_all_packages_app.yaml` exclusion file (see discussion of exclusion files above). - **`repo_checks`**: Enforces various best practices (formatting, style, common mistakes, etc.). In most cases, the error messages should give clear and actionable explanations of what is wrong and how to fix it. Some general notes on specific steps: - **`license_script`**: All code files must have the repository copyright/license block at the top. In most cases a failure here just means you forgot to add the license to a new file. - - **`federated_safety_script`**: Changing interdependent sub-packages of a federated plugin in the same PR can mask serious issues, such as undesired breaking changes in platform APIs. See the documentation on [changing federated plugins](https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#changing-federated-plugins) for next steps. + - **`federated_safety_script`**: Changing interdependent sub-packages of a federated plugin in the same PR can mask serious issues, such as undesired breaking changes in platform APIs. See the documentation on [changing federated plugins](../contributing/README.md#changing-federated-plugins) for next steps. # Out-of-band failures @@ -111,7 +111,7 @@ LUCI tasks are run on Flutter-infrastructure-managed VMs, using an [out-of-repo - Usually easy to identify since failures are generally before the tests even run. #### Investigation & resolution tips -- File an [infrastructure ticket](https://github.com/flutter/flutter/wiki/Infra-Ticket-Queue). +- File an [infrastructure ticket](../../infra/Infra-Ticket-Queue.md). - Check the recipe file for recent changes. ### Firebase Test Lab (Also known as: "FTL") diff --git a/docs/engine/Custom-Flutter-Engine-Embedders.md b/docs/engine/Custom-Flutter-Engine-Embedders.md index 3c8a74f66635b..c4e965b9b0804 100644 --- a/docs/engine/Custom-Flutter-Engine-Embedders.md +++ b/docs/engine/Custom-Flutter-Engine-Embedders.md @@ -16,7 +16,7 @@ This is a very low level API and is not suitable for beginners. * The Flutter engine API has no platform specific dependencies, has a stable ABI and is available in its entirety in a [single C header file available here](https://github.com/flutter/engine/blob/main/shell/platform/embedder/embedder.h). * To use as a guide, you may use [this example embedder that uses GLFW](https://github.com/flutter/engine/blob/main/examples/glfw/FlutterEmbedderGLFW.cc) for window management and rendering. -While we do not object to teams creating custom builds of the Flutter engine for their purposes, we do not support this configuration. Not supporting it means that we do not commit to any timelines for fixing bugs that may come up in such a configuration, even for customers for which we would usually be willing to make commitments (see the [Issue Hygiene](https://github.com/flutter/flutter/wiki/Issue-hygiene) page). It also means that we encourage teams to view such configurations as short-term solutions only and encourage teams to transition away from such configurations at the earliest possible opportunity. +While we do not object to teams creating custom builds of the Flutter engine for their purposes, we do not support this configuration. Not supporting it means that we do not commit to any timelines for fixing bugs that may come up in such a configuration, even for customers for which we would usually be willing to make commitments (see the [Issue Hygiene](../contributing/issue_hygiene/README.md) page). It also means that we encourage teams to view such configurations as short-term solutions only and encourage teams to transition away from such configurations at the earliest possible opportunity. We do not expect custom engine builds to be long-term sustainable. They are not supported on any platform where we plan to be the publisher of a Flutter runtime distinct from the applications that run on the runtime, and they require significant effort to port to our new target platforms such as Web and desktop. There is also an expensive maintenance burden (for example, if we add new features, a custom engine build would need to be updated to support that feature). diff --git a/docs/engine/Custom-Flutter-Engine-Embedding-in-AOT-Mode.md b/docs/engine/Custom-Flutter-Engine-Embedding-in-AOT-Mode.md index 210fd954dd2c6..64f181c9a9cc1 100644 --- a/docs/engine/Custom-Flutter-Engine-Embedding-in-AOT-Mode.md +++ b/docs/engine/Custom-Flutter-Engine-Embedding-in-AOT-Mode.md @@ -14,7 +14,7 @@ This will produce a Flutter engine configured for AOT mode targeting the host. N ## Building the Architecture Specific `gen_snapshot` -The binary that converts Dart code to architecture specific AOT instructions is called `gen_snapshot`. A successful invocation of `gen_snapshot` should produce four binary blobs. These are the Dart VM heap and instructions snapshots as well as the isolate heap and instruction snapshots. Refer to the [wiki article on engine operation in AOT mode](https://github.com/flutter/flutter/wiki/Flutter-engine-operation-in-AOT-Mode) for the purpose of these snapshots. +The binary that converts Dart code to architecture specific AOT instructions is called `gen_snapshot`. A successful invocation of `gen_snapshot` should produce four binary blobs. These are the Dart VM heap and instructions snapshots as well as the isolate heap and instruction snapshots. Refer to the [wiki article on engine operation in AOT mode](Flutter-engine-operation-in-AOT-Mode.md) for the purpose of these snapshots. A specific `gen_snapshot` can only produce AOT instructions for one target architecture. To verify that the `gen_snapshot` you have is producing instructions for the architecture you care about, invoke the same with the `--version` flag. It should produce something like the following. @@ -51,7 +51,7 @@ flutter --local-engine --local-engine-host 💡 **TIP**: When developing on a Mac with ARM (M CPU), use `--local-engine-host=host_debug_unopt_arm64`. > > You can continue to use `host_debug_unopt` (required for Intel Macs), but the engine will be run under Rosetta -> which may be slower. See [Developing with Flutter on Apple Silicon](https://github.com/flutter/flutter/wiki/Developing-with-Flutter-on-Apple-Silicon) +> which may be slower. See [Developing with Flutter on Apple Silicon](../platforms/desktop/macos/Developing-with-Flutter-on-Apple-Silicon.md) > for more information. @@ -47,7 +47,7 @@ You will need to add a new [launch configuration](https://code.visualstudio.com/ ## Bisecting a roll failure -If the engine roll is failing (see [Autorollers](https://github.com/flutter/flutter/wiki/Autorollers)), you can use `git bisect` on the engine repo to track down the offending commit, using the `--local-engine` and `--local-engine-host` arguments as described above to run the failing framework test with each version of the engine. +If the engine roll is failing (see [Autorollers](../infra/Autorollers.md)), you can use `git bisect` on the engine repo to track down the offending commit, using the `--local-engine` and `--local-engine-host` arguments as described above to run the failing framework test with each version of the engine. ## Tracing OpenGL calls in Skia diff --git a/docs/engine/Engine-disk-footprint.md b/docs/engine/Engine-disk-footprint.md index 6108aaeaf90e9..0ce647128c755 100644 --- a/docs/engine/Engine-disk-footprint.md +++ b/docs/engine/Engine-disk-footprint.md @@ -30,4 +30,4 @@ In [devicelab](https://github.com/flutter/flutter/tree/main/dev/devicelab) we ru ## Comparing AOT Snapshot Sizes -A detailed comparison of AOT snapshot sizes can be performed using the [instructions documented here](https://github.com/flutter/flutter/wiki/Comparing-AOT-Snapshot-Sizes). \ No newline at end of file +A detailed comparison of AOT snapshot sizes can be performed using the [instructions documented here](./benchmarks/Comparing-AOT-Snapshot-Sizes.md). \ No newline at end of file diff --git a/docs/engine/JIT-Release-Modes.md b/docs/engine/JIT-Release-Modes.md index 0bb886f6cf08f..a6b991b7774a8 100644 --- a/docs/engine/JIT-Release-Modes.md +++ b/docs/engine/JIT-Release-Modes.md @@ -10,6 +10,6 @@ ninja -C out/android_jit_release_x86 ninja -C out/host_jit_release ``` -This can be used with the flutter tool [via the `--local-engine`](https://github.com/flutter/flutter/wiki/Debugging-the-engine#running-a-flutter-app-with-a-local-engine) flag to produce a bundle containing the jit release artifacts using the `flutter assemble` command. By default, flutter.gradle does not know how to package this artifacts so it requires custom integration into a build pipeline. Nevertheless, the artifact structure should be identical to a debug build, but with asserts disabled and product mode enabled. +This can be used with the flutter tool [via the `--local-engine`](Debugging-the-engine.md#running-a-flutter-app-with-a-local-engine) flag to produce a bundle containing the jit release artifacts using the `flutter assemble` command. By default, flutter.gradle does not know how to package this artifacts so it requires custom integration into a build pipeline. Nevertheless, the artifact structure should be identical to a debug build, but with asserts disabled and product mode enabled. jit_release is not supported on iOS devices. Applications built in JIT mode cannot be distributed on the Apple App Store. \ No newline at end of file diff --git a/docs/engine/Life-of-a-Flutter-Frame.md b/docs/engine/Life-of-a-Flutter-Frame.md index 5fdbf4aeaf68c..e606895351afe 100644 --- a/docs/engine/Life-of-a-Flutter-Frame.md +++ b/docs/engine/Life-of-a-Flutter-Frame.md @@ -48,7 +48,7 @@ TODO(cbracken): write this up using [this patch](https://github.com/flutter/engi [animator]: https://github.com/flutter/engine/blob/main/shell/common/animator.h [drawFrame]: https://api.flutter.dev/flutter/rendering/RendererBinding/drawFrame.html [embedderAPI]: https://github.com/flutter/engine/blob/main/shell/platform/embedder/embedder.h -[engineArchThreading]: https://github.com/flutter/flutter/wiki/The-Engine-architecture#threading +[engineArchThreading]: ../about/The-Engine-architecture.md#threading [flutterViewRender]: https://api.flutter.dev/flutter/dart-ui/FlutterView/render.html [handleBeginFrame]: https://api.flutter.dev/flutter/scheduler/SchedulerBinding/handleBeginFrame.html [layerTree]: https://github.com/flutter/engine/blob/main/flow/layers/layer_tree.h diff --git a/docs/engine/README.md b/docs/engine/README.md index 3a9a2945f8b72..e75ee7951de80 100644 --- a/docs/engine/README.md +++ b/docs/engine/README.md @@ -1,15 +1,15 @@ This is an index of team-facing documentation for the [flutter/engine repository](https://github.com/flutter/engine/). -- [Accessibility on Windows](https://github.com/flutter/flutter/wiki/Accessibility-on-Windows) +- [Accessibility on Windows](../platforms/desktop/windows/Accessibility-on-Windows.md) - [Code signing metadata](./release/Code-signing-metadata.md) for engine binaries -- [Compiling the engine](./dev/Compiling-the-engine.md) +- [Compiling the engine](./contributing/Compiling-the-engine.md) - [Comparing AOT Snapshot Sizes](./benchmarks/Comparing-AOT-Snapshot-Sizes.md) - [Crashes](./Crashes.md) - [Custom Flutter engine embedders](./Custom-Flutter-Engine-Embedders.md) - [Custom Flutter Engine Embedding in AOT Mode](./Custom-Flutter-Engine-Embedding-in-AOT-Mode.md) - [Debugging the engine](./Debugging-the-engine.md) - [Flutter engine operation in AOT Mode](./Flutter-engine-operation-in-AOT-Mode.md) -- [Flutter Test Fonts](https://github.com/flutter/flutter/wiki/Flutter-Test-Fonts) +- [Flutter Test Fonts](../contributing/testing/Flutter-Test-Fonts.md) - [Flutter's modes](./Flutter's-modes.md) - [Engine Clang Tidy Linter](./ci/Engine-Clang-Tidy-Linter.md) - [Engine disk footprint](./Engine-disk-footprint.md) @@ -19,14 +19,14 @@ This is an index of team-facing documentation for the [flutter/engine repository - [Impeller](./impeller/README.md) documentation index - [Life of a Flutter Frame](Life-of-a-Flutter-Frame.md) - [Reduce Flutter engine size with MLGO](Reduce-Flutter-engine-size-with-MLGO.md) -- [Resolving common build failures](https://github.com/flutter/flutter/wiki/Resolving-common-build-failures) -- [Setting up the Engine development environment](./dev/Setting-up-the-Engine-development-environment.md) +- [Resolving common build failures](../platforms/android/Resolving-common-build-failures.md) +- [Setting up the Engine development environment](./contributing/Setting-up-the-Engine-development-environment.md) - [Supporting legacy platforms](Supporting-legacy-platforms.md) -- [Testing Android Changes in the Devicelab on an Emulator](https://github.com/flutter/flutter/wiki/Testing-Android-Changes-in-the-Devicelab-on-an-Emulator) +- [Testing Android Changes in the Devicelab on an Emulator](../platforms/android/Testing-Android-Changes-in-the-Devicelab-on-an-Emulator.md) - [Testing the engine](./testing/Testing-the-engine.md) - [Testing presubmit Engine PRs with the Flutter framework](Testing-presubmit-Engine-PRs-with-the-Flutter-framework.md) - [The Engine architecture](../about/The-Engine-architecture.md) -- [Upgrading Engine's Android API version](https://github.com/flutter/flutter/wiki/Upgrading-Engine%27s-Android-API-version) +- [Upgrading Engine's Android API version](../platforms/android/Upgrading-Engine's-Android-API-version.md) - [Using the Dart Development Service (DDS) and Flutter DevTools with a custom Flutter Engine Embedding](./Using-the-Dart-Development-Service-(DDS)-and-Flutter-DevTools-with-a-custom-Flutter-Engine-Embedding.md) - [Using Sanitizers with the Flutter Engine](./Using-Sanitizers-with-the-Flutter-Engine.md) - [Why we have a separate engine repo](../about/Why-we-have-a-separate-engine-repo.md) diff --git a/docs/engine/Reduce-Flutter-engine-size-with-MLGO.md b/docs/engine/Reduce-Flutter-engine-size-with-MLGO.md index 466832908a351..75ed9b2c02e6e 100644 --- a/docs/engine/Reduce-Flutter-engine-size-with-MLGO.md +++ b/docs/engine/Reduce-Flutter-engine-size-with-MLGO.md @@ -228,6 +228,6 @@ condition. [MLGO]: https://github.com/google/ml-compiler-opt -[engine setup]: https://github.com/flutter/flutter/wiki/Setting-up-the-Engine-development-environment -[compile android]: https://github.com/flutter/flutter/wiki/Compiling-the-engine#compiling-for-android-from-macos-or-linux +[engine setup]: ./contributing/Setting-up-the-Engine-development-environment +[compile android]: ./contributing/Compiling-the-engine#compiling-for-android-from-macos-or-linux [MLGO demo]: https://github.com/google/ml-compiler-opt/blob/main/docs/demo/demo.md diff --git a/docs/engine/benchmarks/Comparing-AOT-Snapshot-Sizes.md b/docs/engine/benchmarks/Comparing-AOT-Snapshot-Sizes.md index 7cd15870d6690..c397f41fe7ee0 100644 --- a/docs/engine/benchmarks/Comparing-AOT-Snapshot-Sizes.md +++ b/docs/engine/benchmarks/Comparing-AOT-Snapshot-Sizes.md @@ -1,6 +1,6 @@ -These instructions can be used to prepare a tabulated summary of the differences in the sizes of two AOT snapshots. The instructions assume that the Flutter Engine has been [setup](https://github.com/flutter/flutter/wiki/Setting-up-the-Engine-development-environment) on the host (at `FLUTTER_ENGINE` in these instructions). +These instructions can be used to prepare a tabulated summary of the differences in the sizes of two AOT snapshots. The instructions assume that the Flutter Engine has been [setup](../contributing/Setting-up-the-Engine-development-environment.md) on the host (at `FLUTTER_ENGINE` in these instructions). -Build the AOT snapshot (`flutter build aot`) for the application but pass in the `--verbose` flag. We need to find the `gen_snapshot` invocation and re-run it with an extra option (`--print-instructions-sizes-to`). If you are instrumenting with a local engine, the `flutter build` [takes a `--local-engine` and `--local-engine-host` flag](https://github.com/flutter/flutter/wiki/Debugging-the-engine#running-a-flutter-app-with-a-local-engine) as well. +Build the AOT snapshot (`flutter build aot`) for the application but pass in the `--verbose` flag. We need to find the `gen_snapshot` invocation and re-run it with an extra option (`--print-instructions-sizes-to`). If you are instrumenting with a local engine, the `flutter build` [takes a `--local-engine` and `--local-engine-host` flag](../Debugging-the-engine.md#running-a-flutter-app-with-a-local-engine) as well. Here is an example of the updated invocation. Specify the path to a JSON file that acts as a summary (`SUMMARY_LOCATION` in these instructions) as follows. @@ -22,7 +22,7 @@ Save the file at `SUMMARY_LOCATION` as `before.json` Now, either change the Dart code with the changes you wish to see the effects, or, rebuild the engine to create an updated `gen_snapshot` binary. -After you have made necessary changes, re-run `flutter build aot` again. This step is important because AOT compilation has a [kernel compilation step](https://github.com/flutter/flutter/wiki/Custom-Flutter-Engine-Embedding-in-AOT-Mode#generating-the-kernel-snapshot) before the `gen_snapshot` invocation. +After you have made necessary changes, re-run `flutter build aot` again. This step is important because AOT compilation has a [kernel compilation step](../Custom-Flutter-Engine-Embedding-in-AOT-Mode.md#generating-the-kernel-snapshot) before the `gen_snapshot` invocation. Re-run the gen_snapshot invocation and save the resulting file to `after.json`. diff --git a/docs/engine/dev/Compiling-the-engine.md b/docs/engine/contributing/Compiling-the-engine.md similarity index 92% rename from docs/engine/dev/Compiling-the-engine.md rename to docs/engine/contributing/Compiling-the-engine.md index b5db8a0917b7e..f209d34afad93 100644 --- a/docs/engine/dev/Compiling-the-engine.md +++ b/docs/engine/contributing/Compiling-the-engine.md @@ -1,4 +1,4 @@ -_If you've never built the engine before, first see [Setting up the Engine development environment](https://github.com/flutter/flutter/wiki/Setting-up-the-Engine-development-environment)._ +_If you've never built the engine before, first see [Setting up the Engine development environment](Setting-up-the-Engine-development-environment.md)._ # Contents @@ -43,7 +43,7 @@ source files, pass the flag `--no-prebuilt-dart-sdk` to `//flutter/tools/gn`. These steps build the engine used by `flutter run` for Android devices. -Run the following steps, from the `src` directory created in [Setting up the Engine development environment](https://github.com/flutter/flutter/wiki/Setting-up-the-Engine-development-environment): +Run the following steps, from the `src` directory created in [Setting up the Engine development environment](Setting-up-the-Engine-development-environment.md): 1. `git pull upstream main` in `src/flutter` to update the Flutter Engine repo. @@ -60,7 +60,7 @@ Run the following steps, from the `src` directory created in [Setting up the Eng > 💡 **TIP**: When developing on a Mac with ARM (M CPU), prefer `host_debug_unopt_arm64`. > > You can continue to use `host_debug_unopt` (required for Intel Macs), but the engine will be run under Rosetta -> which may be slower. See [Developing with Flutter on Apple Silicon](https://github.com/flutter/flutter/wiki/Developing-with-Flutter-on-Apple-Silicon) +> which may be slower. See [Developing with Flutter on Apple Silicon](../../platforms/desktop/macos/Developing-with-Flutter-on-Apple-Silicon.md) > for more information. 4. Build your executables @@ -80,11 +80,11 @@ If you're going to be debugging crashes in the engine, make sure you add `android/AndroidManifest.xml` file for the Flutter app you are using to test the engine. -See [The flutter tool](https://github.com/flutter/flutter/wiki/The-flutter-tool) for instructions on how to use the `flutter` tool with a local engine. +See [The flutter tool](../../tool/README.md) for instructions on how to use the `flutter` tool with a local engine. You will typically use the `android_debug_unopt` build to debug the engine on a device, and `android_debug_unopt_x64` to debug in on a simulator. Modifying dart sources in the engine will require adding a `dependency_override` section in you app's `pubspec.yaml` as detailed -[here](https://github.com/flutter/flutter/wiki/The-flutter-tool#using-a-locally-built-engine-with-the-flutter-tool). +[here](../../tool/README.md#using-a-locally-built-engine-with-the-flutter-tool). Note that if you use particular android or ios engine build, you will need to have corresponding host build available next to it: if you use `android_debug_unopt`, you should have built `host_debug_unopt`, @@ -133,13 +133,13 @@ Run the following steps, from the `src` directory created in the steps above: 5. `ninja -C out/ios_debug_unopt && ninja -C out/host_debug_unopt` to build all artifacts (use `out/ios_debug_sim_unopt` for Simulator). -See [The flutter tool](https://github.com/flutter/flutter/wiki/The-flutter-tool) for instructions on how to use the `flutter` tool with a local engine. +See [The flutter tool](../../tool/README.md) for instructions on how to use the `flutter` tool with a local engine. You will typically use the `ios_debug_unopt` build to debug the engine on a device, and `ios_debug_sim_unopt` to debug in on a simulator. Modifying dart sources in the engine will require adding a `dependency_override` section in you app's `pubspec.yaml` as detailed -[here](https://github.com/flutter/flutter/wiki/The-flutter-tool#using-a-locally-built-engine-with-the-flutter-tool). +[here](../../tool/README.md#using-a-locally-built-engine-with-the-flutter-tool). -See also [instructions for debugging the engine in a Flutter app in Xcode](https://github.com/flutter/flutter/wiki/Debugging-the-engine#debugging-ios-builds-with-xcode). +See also [instructions for debugging the engine in a Flutter app in Xcode](../Debugging-the-engine.md#debugging-ios-builds-with-xcode). ## Compiling for macOS or Linux @@ -155,10 +155,10 @@ These steps build the desktop embedding, and the engine used by `flutter test` o 4. `ninja -C out/host_debug_unopt` to build a desktop unoptimized binary. * If you skipped `--unoptimized`, use `ninja -C out/host_debug` instead. -See [The flutter tool](https://github.com/flutter/flutter/wiki/The-flutter-tool) for instructions on how to use the `flutter` tool with a local engine. +See [The flutter tool](../../tool/README.md) for instructions on how to use the `flutter` tool with a local engine. You will typically use the `host_debug_unopt` build in this setup. Modifying dart sources in the engine will require adding a `dependency_override` section in you app's `pubspec.yaml` as detailed -[here](https://github.com/flutter/flutter/wiki/The-flutter-tool#using-a-locally-built-engine-with-the-flutter-tool). +[here](../../tool/README.md#using-a-locally-built-engine-with-the-flutter-tool). ## Compiling for Windows diff --git a/docs/engine/dev/Setting-up-the-Engine-development-environment.md b/docs/engine/contributing/Setting-up-the-Engine-development-environment.md similarity index 95% rename from docs/engine/dev/Setting-up-the-Engine-development-environment.md rename to docs/engine/contributing/Setting-up-the-Engine-development-environment.md index 523c270f84d99..6bf60feeb019c 100644 --- a/docs/engine/dev/Setting-up-the-Engine-development-environment.md +++ b/docs/engine/contributing/Setting-up-the-Engine-development-environment.md @@ -92,8 +92,8 @@ gclient sync ## Next steps: * [Compiling the engine](Compiling-the-engine.md) explains how to actually get builds, now that you have the code. - * [The flutter tool](https://github.com/flutter/flutter/wiki/The-flutter-tool) has a section explaining how to use custom engine builds. - * [Signing commits](https://github.com/flutter/flutter/wiki/Signing-commits), to configure your environment to securely sign your commits. + * [The flutter tool](../../tool/README.md) has a section explaining how to use custom engine builds. + * [Signing commits](../../contributing/Signing-commits.md), to configure your environment to securely sign your commits. ## Editor autocomplete support @@ -126,7 +126,7 @@ For example, in `src/.vscode/settings.json`: ./tools/gn --unopt --mac-cpu arm64 --enable-impeller-vulkan --enable-impeller-opengles --enable-unittests ``` -For adding IDE support to the Java code in the engine with VSCode, see ["Using VSCode as an IDE for the Android Embedding"](https://github.com/flutter/flutter/wiki/Setting-up-the-Engine-development-environment#using-vscode-as-an-ide-for-the-android-embedding-java). +For adding IDE support to the Java code in the engine with VSCode, see ["Using VSCode as an IDE for the Android Embedding"](#using-vscode-as-an-ide-for-the-android-embedding-java). ### Zed Editor diff --git a/docs/engine/impeller/Flutter-GPU.md b/docs/engine/impeller/Flutter-GPU.md index 96d6a6baca1ec..676f0b426b661 100644 --- a/docs/engine/impeller/Flutter-GPU.md +++ b/docs/engine/impeller/Flutter-GPU.md @@ -2,7 +2,7 @@ Design doc: https://flutter.dev/go/impeller-dart -Flutter GPU's runtime is a thin wrapper over [Impeller](https://github.com/flutter/flutter/wiki/Impeller)'s HAL, from which custom renderers may be entirely built using Dart. Just like with Impeller, Flutter GPU shader bundles are compiled ahead of time using [impellerc](https://github.com/flutter/engine/tree/main/impeller/compiler). As such, Flutter GPU is only available on platforms that support Impeller. +Flutter GPU's runtime is a thin wrapper over [Impeller](README.md)'s HAL, from which custom renderers may be entirely built using Dart. Just like with Impeller, Flutter GPU shader bundles are compiled ahead of time using [impellerc](https://github.com/flutter/engine/tree/main/impeller/compiler). As such, Flutter GPU is only available on platforms that support Impeller. ## Dart FFI @@ -45,5 +45,5 @@ If you run into issues while using Flutter GPU, please file a bug using the stan ## Questions or feedback? If you have non-bug report questions surrounding Flutter GPU, there are several ways you can reach out to the developer: -* Create a thread in the #help channel of the [Discord server](https://github.com/flutter/flutter/wiki/Chat). Place "Flutter GPU" in the title of the thread and tag @bdero in the message. +* Create a thread in the #help channel of the [Discord server](../../contributing/Chat.md). Place "Flutter GPU" in the title of the thread and tag @bdero in the message. * Send a Twitter DM to [@algebrandon](https://twitter.com/algebrandon). diff --git a/docs/engine/impeller/Impeller-Scene.md b/docs/engine/impeller/Impeller-Scene.md index 1e9ab220c1995..dd09db8c79019 100644 --- a/docs/engine/impeller/Impeller-Scene.md +++ b/docs/engine/impeller/Impeller-Scene.md @@ -2,7 +2,7 @@ We are excited to have you tinker on [the Impeller Scene Demo presented at Flutt **Compiling the Engine** -- Configure your Mac host to compile the Flutter Engine by [following the guidance in wiki](https://github.com/flutter/flutter/wiki/Setting-up-the-Engine-development-environment). +- Configure your Mac host to compile the Flutter Engine by [following the guidance in wiki](../contributing/Setting-up-the-Engine-development-environment.md). - Ensure that you are on the [main branch of the Flutter Engine](https://github.com/flutter/engine/tree/main). - Ensure that you are on the [main branch of the Flutter Framework](https://github.com/flutter/flutter/tree/main). - Configure the host build: `./flutter/tools/gn --enable-impeller-3d --no-lto` diff --git a/docs/engine/testing/Testing-the-engine.md b/docs/engine/testing/Testing-the-engine.md index e8c0f278d7026..4426f805736d5 100644 --- a/docs/engine/testing/Testing-the-engine.md +++ b/docs/engine/testing/Testing-the-engine.md @@ -93,7 +93,7 @@ testing/run_tests.py --type=java to easily build and run the JUnit tests. -This script only has a limited amount of smartness. If you've never built the engine before, it'll build the test and classes under test with a reasonable default configuration. If you've built the engine before, it'll re-build the engine with the same GN flags. You may want to double check your GN flags (https://github.com/flutter/flutter/wiki/Compiling-the-engine#compiling-for-android-from-macos-or-linux) if you haven't built the engine for a while. +This script only has a limited amount of smartness. If you've never built the engine before, it'll build the test and classes under test with a reasonable default configuration. If you've built the engine before, it'll re-build the engine with the same GN flags. You may want to double check your [GN flags](../contributing/Compiling-the-engine.md#compiling-for-android-from-macos-or-linux) if you haven't built the engine for a while. Behind the scenes, it invokes GN and Ninja to build a single .jar file containing the test runner and dependencies. Then it uses the system `java` @@ -222,7 +222,7 @@ to easily build and run the XCTests. - Add the `--ios-variant ios_debug_sim_unopt_arm64` argument when using an arm64 Mac simulator (built with `--simulator-cpu=arm64`). -This script only has a limited amount of smartness. If you've never built the engine before, it'll build the test and classes under test with a reasonable default configuration. If you've built the engine before, it'll re-build the engine with the same GN flags. You may want to double check your GN flags (https://github.com/flutter/flutter/wiki/Compiling-the-engine#compiling-for-ios-from-macos) if you haven't built the engine for a while. +This script only has a limited amount of smartness. If you've never built the engine before, it'll build the test and classes under test with a reasonable default configuration. If you've built the engine before, it'll re-build the engine with the same GN flags. You may want to double check your GN flags ([See compiling for ios from macos](../contributing/Compiling-the-engine.md#compiling-for-ios-from-macos)) if you haven't built the engine for a while. Behind the scenes, it invokes GN and Ninja to build the tests and dependencies into a single `.dylib`. Then it uses Xcode and the Xcode project at @@ -329,7 +329,7 @@ Xcode and hit CMD+U. Dart unit tests are executed during pre-submit on our CI system when submitting PRs to the `flutter/engine` repository. -_See also: [Flutter Test Fonts](https://github.com/flutter/flutter/wiki/Flutter-Test-Fonts)_ +_See also: [Flutter Test Fonts](../../contributing/testing/Flutter-Test-Fonts.md)_ ### Framework tests diff --git a/docs/unsorted_wiki/Running-examples.md b/docs/examples/Running-examples.md similarity index 87% rename from docs/unsorted_wiki/Running-examples.md rename to docs/examples/Running-examples.md index e21dec105db20..14cd4e4fb1c8d 100644 --- a/docs/unsorted_wiki/Running-examples.md +++ b/docs/examples/Running-examples.md @@ -7,6 +7,6 @@ debugging enabled on that device. You can also specify a particular Dart file to run if you want to run an example that doesn't have a `lib/main.dart` file using the `-t` command-line option. For -example, to run the `widgets/spinning_square.dart` example in the [examples/layers](https://github.com/flutter/flutter/tree/master/examples/layers) +example, to run the `widgets/spinning_square.dart` example in the [examples/layers](https://github.com/flutter/flutter/tree/main/examples/layers) directory on a connected Android device, from that directory you would run: `flutter run -t widgets/spinning_square.dart` \ No newline at end of file diff --git a/docs/infra/Autorollers.md b/docs/infra/Autorollers.md index 4d5d6e8162653..2746826c1132b 100644 --- a/docs/infra/Autorollers.md +++ b/docs/infra/Autorollers.md @@ -2,7 +2,7 @@ Several of our dependencies are automatically rolled (updated) by bots. ## Clang to Engine -We use an auto-roller for Clang on [Linux](https://autoroll.skia.org/r/clang-linux-flutter-engine) and [MacOS](https://autoroll.skia.org/r/clang-mac-flutter-engine) (Windows is pending availability of a Windows Clang package from the Fuchsia infra team). In case of build failures or other errors, ping the #hackers-engine channel on [Discord](https://github.com/flutter/flutter/wiki/Chat). +We use an auto-roller for Clang on [Linux](https://autoroll.skia.org/r/clang-linux-flutter-engine) and [MacOS](https://autoroll.skia.org/r/clang-mac-flutter-engine) (Windows is pending availability of a Windows Clang package from the Fuchsia infra team). In case of build failures or other errors, ping the #hackers-engine channel on [Discord](../contributing/Chat.md). These rollers may fail if Clang catches a new compilation warning or error that it previously did not, or if a test relies on undefined behavior that has now changed in the new revision of Clang. It is best to resolve such issues ASAP to let the rollers continue and avoid a pile up of issues to resolve. @@ -10,7 +10,7 @@ The rollers work by updating a [CIPD](https://chrome-infra-packages.appspot.com/ ## Fuchsia SDK to Engine -We use an auto-roller for the Fuchsia SDK on [Linux](https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine) and [MacOS](https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine) (Windows is pending availability of a Windows Fuchsia SDK package from the Fuchsia infra team). In case of build failures or other errors, ping the #hackers-engine channel on [Discord](https://github.com/flutter/flutter/wiki/Chat). +We use an auto-roller for the Fuchsia SDK on [Linux](https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine) and [MacOS](https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine) (Windows is pending availability of a Windows Fuchsia SDK package from the Fuchsia infra team). In case of build failures or other errors, ping the #hackers-engine channel on [Discord](../contributing/Chat.md). These rollers may fail if the Fuchsia SDK contains a breaking change. It is best to resolve such issues ASAP to let the rollers continue and avoid a pile up of issues to resolve. @@ -33,7 +33,7 @@ The bot updates See [Running a Flutter app with a local engine](https://github.com/flutter/flutter/wiki/Debugging-the-engine#running-a-flutter-app-with-a-local-engine) for more information. +> See [Running a Flutter app with a local engine](../engine/Debugging-the-engine.md#running-a-flutter-app-with-a-local-engine) for more information. 8. Make sure your path contains `engine/src/third_party/dart/tools/sdks/dart-sdk/bin`, run the script `flutter/ci/licenses.sh` in the src directory, update `flutter/ci/licenses_golden/licenses_third_party` by copying `out/license_script_output/licenses_third_party` into it. Include this change in your pull request. **If any licenses changed, make sure to also update the actual `LICENSE` file.** @@ -104,6 +104,6 @@ flutter test --local-engine=host_debug --local-engine-host=host_debug 12. Wait for the [flutter engine build bot](https://ci.chromium.org/p/flutter/g/engine/console) to build your change and go green. -13. Once the bot cycles green, the [[Autorollers]] will roll the engine into the flutter/flutter repo. When this happens, monitor the flutter [build bots](https://flutter-dashboard.appspot.com/build.html). If there is a failure, revert the Dart roll in flutter/engine, debug the problem and fix it or file a P0 issue against Dart. Please monitor the [flutter benchmarks dashboard](https://flutter-dashboard.appspot.com/benchmarks.html) and if any regressions are noticed please file P0 issues for all regressions **and revert the Dart roll**. The next roll is blocked until these issues/regressions are fixed. +13. Once the bot cycles green, the [Autorollers](../infra/Autorollers.md) will roll the engine into the flutter/flutter repo. When this happens, monitor the flutter [build bots](https://flutter-dashboard.appspot.com/build.html). If there is a failure, revert the Dart roll in flutter/engine, debug the problem and fix it or file a P0 issue against Dart. Please monitor the [flutter benchmarks dashboard](https://flutter-dashboard.appspot.com/benchmarks.html) and if any regressions are noticed please file P0 issues for all regressions **and revert the Dart roll**. The next roll is blocked until these issues/regressions are fixed. 14. When you are done please update the spread sheet at [http://go/dart-flutter-rolls](http://go/dart-flutter-rolls) with the git hash of the Dart revision that was rolled into the flutter engine. This hash will be used for rolling Dart into Google's internal code repository and would be picked as a potential candidate for a dev release. Also make sure you send an email to the next person on the list and make sure the person acknowledges picking up the roll baton. diff --git a/docs/infra/Security.md b/docs/infra/Security.md index 7eaf996434c76..b5198ef5af200 100644 --- a/docs/infra/Security.md +++ b/docs/infra/Security.md @@ -7,7 +7,7 @@ Unopt builds are not published or consumed by the flutter/flutter CI to run inte ### Sanitizers -[flutter/engine](https://github.com/flutter/engine) supports thread, address, memory, undefined behavior and leak sanitizers. Sanitizers are not enabled by default but they can be enabled on local builds following the [sanitizers with the flutter engine](https://github.com/flutter/flutter/wiki/Using-Sanitizers-with-the-Flutter-Engine) instructions. +[flutter/engine](https://github.com/flutter/engine) supports thread, address, memory, undefined behavior and leak sanitizers. Sanitizers are not enabled by default but they can be enabled on local builds following the [sanitizers with the flutter engine](../engine/Using-Sanitizers-with-the-Flutter-Engine.md) instructions. ### Builds with sanitizers, and tests with assertions enabled diff --git a/docs/infra/Understanding-a-LUCI-build-failure.md b/docs/infra/Understanding-a-LUCI-build-failure.md index 8ff30c78cb684..0257f90c221f7 100644 --- a/docs/infra/Understanding-a-LUCI-build-failure.md +++ b/docs/infra/Understanding-a-LUCI-build-failure.md @@ -25,15 +25,15 @@ An example build: [Linux color_filter_and_fade_perf__e2e_summary](https://ci.chr 1. Check if the infra failure has happened on earlier builds by clicking (i) 2. Check if issue already exists in the [infra bug pool](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3A%22team%3A+infra%22) 3. If not, file [an infra bug](https://github.com/flutter/flutter/issues/new?template=6_infrastructure.yml) -4. If this is a blocking failure, please add Projects [`Infra Ticket Queue`](https://github.com/flutter/flutter/wiki/Infra-Ticket-Queue). The infra gardener will scan through the queue frequently. +4. If this is a blocking failure, please add Projects [`Infra Ticket Queue`](./Infra-Ticket-Queue.md). The infra gardener will scan through the queue frequently. 5. If you want to get an immediate help, please ask in the discord `hackers-infra` channel 6. If this is an infra flake, and a retry is needed * For pre-submit test, click `Re-run` in the [check run page](https://github.com/flutter/flutter/pull/83894/checks?check_run_id=2738146673). ![The presubmit rerun interface](https://github.com/flutter/assets-for-api-docs/blob/main/assets/wiki/luci_pre_submit_rerun.png) * Limited to `flutter-hackers` group. - * Ask a team member to re-run in [Chat](https://github.com/flutter/flutter/wiki/Chat) channel `#hackers-infra` if you don't have access. + * Ask a team member to re-run in [Chat](../contributing/Chat.md) channel `#hackers-infra` if you don't have access. * For post-submit test, login to [framework build dashboard](https://flutter-dashboard.appspot.com/#/build), click the task box, and click `RERUN`. ![The post submit rerun interface](https://github.com/flutter/assets-for-api-docs/blob/main/assets/wiki/luci_post_submit_rerun.png) * Limited to Googlers currently due to some technical limitations of our infrastructure. - * Ask a Googler to re-run in [Chat](https://github.com/flutter/flutter/wiki/Chat) channel `#hackers-infra`. + * Ask a Googler to re-run in [Chat](../contributing/Chat.md) channel `#hackers-infra`. ## Test Failure A test failure shows up as a red box in the dashboards: diff --git a/docs/unsorted_wiki/Updating-dependencies-in-Flutter.md b/docs/infra/Updating-dependencies-in-Flutter.md similarity index 90% rename from docs/unsorted_wiki/Updating-dependencies-in-Flutter.md rename to docs/infra/Updating-dependencies-in-Flutter.md index db94995c76b35..b097513061fa5 100644 --- a/docs/unsorted_wiki/Updating-dependencies-in-Flutter.md +++ b/docs/infra/Updating-dependencies-in-Flutter.md @@ -14,7 +14,7 @@ You can then re-run `flutter update-packages --force-upgrade`. ## To update a single dependency for cherrypicks: -Sometimes you need to update a single dependency as a [cherrypick to a release candidate branch](https://github.com/flutter/flutter/wiki/Flutter-Cherrypick-Process). +Sometimes you need to update a single dependency as a [cherrypick to a release candidate branch](../releases/Flutter-Cherrypick-Process.md). In that case, you can run: diff --git a/docs/unsorted_wiki/Hybrid-Composition.md b/docs/platforms/Hybrid-Composition.md similarity index 97% rename from docs/unsorted_wiki/Hybrid-Composition.md rename to docs/platforms/Hybrid-Composition.md index 8db288fbae23b..4044dab4742a5 100644 --- a/docs/unsorted_wiki/Hybrid-Composition.md +++ b/docs/platforms/Hybrid-Composition.md @@ -3,9 +3,9 @@ Hybrid composition refers to the ability of composing native views alongside Flu ## Android *Requires API level 19* -_See also: [[Texture Layer Hybrid Composition]]_ +_See also: [Texture Layer Hybrid Composition](./android/Texture-Layer-Hybrid-Composition.md)_ -Starting from Flutter 1.20.0, hybrid composition can be used on Android. This new feature fixes most of the [issues with the preview platform view approach](https://github.com/flutter/flutter/wiki/Virtual-Display#associated-problems-and-workarounds) (Virtual Display); in particular, accessibility and keyboard related issues. See also [[Android Platform Views]] for an overview of modes. +Starting from Flutter 1.20.0, hybrid composition can be used on Android. This new feature fixes most of the [issues with the preview platform view approach](./android/Virtual-Display.md#associated-problems-and-workarounds) (Virtual Display); in particular, accessibility and keyboard related issues. See also [Android Platform Views](./android/Android-Platform-Views.md) for an overview of modes. To see all known issues specific to this mode, search for the [`hc-only` label](https://github.com/flutter/flutter/labels/hc-only). @@ -186,8 +186,6 @@ android { ``` ## iOS -_See also: [[Hybrid Composition iOS]]_ - In Flutter 1.22, platform views are enabled by default. This means that it's no longer required to add the `io.flutter.embedded_views_preview` flag to `Info.plist`. diff --git a/docs/platforms/android/Android-Platform-Views.md b/docs/platforms/android/Android-Platform-Views.md index 2de5f70bc38a9..bbf3eb30a2a69 100644 --- a/docs/platforms/android/Android-Platform-Views.md +++ b/docs/platforms/android/Android-Platform-Views.md @@ -30,7 +30,7 @@ within their Flutter UI. There are currently three different implementations of Android platform views: - [Virtual Display](Virtual_Display.md) (VD) -- [Hybrid Composition](https://github.com/flutter/flutter/wiki/Hybrid-Composition) (HC) +- [Hybrid Composition](../Hybrid-Composition.md) (HC) - [Texture Layer Hybrid Composition](Texture-Layer-Hybrid-Composition.md) (TLHC) Each has a different set of limitations and tradeoffs, as discussed below. The pages linked above give details about each implementation. diff --git a/docs/unsorted_wiki/New-Android-version.md b/docs/platforms/android/New-Android-version.md similarity index 97% rename from docs/unsorted_wiki/New-Android-version.md rename to docs/platforms/android/New-Android-version.md index 7cecdb457f8ba..eabe19e5b801e 100644 --- a/docs/unsorted_wiki/New-Android-version.md +++ b/docs/platforms/android/New-Android-version.md @@ -40,7 +40,7 @@ https://docs.flutter.dev/reference/supported-platforms #### Modify defaults In flutter/flutter: Update default compile sdk version and target sdk version to the new api value -Code here https://github.com/flutter/flutter/blob/master/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy +[Code here](../../../packages/flutter_tools/gradle/src/main/groovy/flutter.groovy) Follow comments in that file to update other locations that are assumed to be the same. Example bumping min sdk which is similar but different: https://github.com/flutter/flutter/pull/125515 In flutter/buildroot: diff --git a/docs/platforms/android/Texture-Layer-Hybrid-Composition.md b/docs/platforms/android/Texture-Layer-Hybrid-Composition.md index 7e11669769165..670494ac07c45 100644 --- a/docs/platforms/android/Texture-Layer-Hybrid-Composition.md +++ b/docs/platforms/android/Texture-Layer-Hybrid-Composition.md @@ -1,4 +1,4 @@ -_See also: [Hybrid Composition|Hybrid Composition#Android](https://github.com/flutter/flutter/wiki/Hybrid-Composition)_ +_See also: [Hybrid Composition|Hybrid Composition#Android](../Hybrid-Composition.md)_ # Background diff --git a/docs/unsorted_wiki/Upgrading-Flutter-projects-to-Gradle-4.1-and-Android-Studio-Gradle-plugin-3.0.1.md b/docs/platforms/android/Upgrading-Flutter-projects-to-Gradle-4.1-and-Android-Studio-Gradle-plugin-3.0.1.md similarity index 100% rename from docs/unsorted_wiki/Upgrading-Flutter-projects-to-Gradle-4.1-and-Android-Studio-Gradle-plugin-3.0.1.md rename to docs/platforms/android/Upgrading-Flutter-projects-to-Gradle-4.1-and-Android-Studio-Gradle-plugin-3.0.1.md diff --git a/docs/unsorted_wiki/Upgrading-Flutter-projects-to-build-with-gradle.md b/docs/platforms/android/Upgrading-Flutter-projects-to-build-with-gradle.md similarity index 92% rename from docs/unsorted_wiki/Upgrading-Flutter-projects-to-build-with-gradle.md rename to docs/platforms/android/Upgrading-Flutter-projects-to-build-with-gradle.md index e93a789cb3b58..90853490c6564 100644 --- a/docs/unsorted_wiki/Upgrading-Flutter-projects-to-build-with-gradle.md +++ b/docs/platforms/android/Upgrading-Flutter-projects-to-build-with-gradle.md @@ -6,7 +6,7 @@ Prior to [Pull Request 7902](https://github.com/flutter/flutter/pull/7902) -- wh If you have a project that was created prior to this date, please follow these steps to switch to building with gradle. This is required as we will be removing the custom build support shortly. -*Note*: These steps apply to projects created with `flutter create` prior to February 6th 2017. If your project was based on a copy of `/examples/hello_services/`, then you just need to synchronize the contents of [`/android/build.gradle`](https://github.com/flutter/flutter/blob/master/packages/flutter_tools/templates/create/android.tmpl/build.gradle) and [`/android/app/build.gradle`](https://github.com/flutter/flutter/blob/master/packages/flutter_tools/templates/create/android.tmpl/app/build.gradle). +*Note*: These steps apply to projects created with `flutter create` prior to February 6th 2017. If your project was based on a copy of `/examples/hello_services/`, then you just need to synchronize the contents of [`/android/build.gradle`](../../../packages/flutter_tools/templates/create/android.tmpl/build.gradle) and [`/android/app/build.gradle`](../../../packages/flutter_tools/templates/create/android.tmpl/app/build.gradle). ## Upgrading an existing project diff --git a/docs/unsorted_wiki/Developing-with-Flutter-on-Apple-Silicon.md b/docs/platforms/desktop/macos/Developing-with-Flutter-on-Apple-Silicon.md similarity index 91% rename from docs/unsorted_wiki/Developing-with-Flutter-on-Apple-Silicon.md rename to docs/platforms/desktop/macos/Developing-with-Flutter-on-Apple-Silicon.md index 920027c75dcab..624b61e397e66 100644 --- a/docs/unsorted_wiki/Developing-with-Flutter-on-Apple-Silicon.md +++ b/docs/platforms/desktop/macos/Developing-with-Flutter-on-Apple-Silicon.md @@ -29,4 +29,4 @@ We also plan to offer support for compilation directly to ARM64, as well as univ ## Filing Issues -If you experience a problem relating to using Flutter on Apple Silicon hardware, please [file an issue on GitHub](https://github.com/flutter/flutter/issues/new?assignees=&labels=&template=1_activation.md&title=) with specific repro steps and information about your hardware and software configuration (paste the results of `flutter doctor -v`). Thank you! \ No newline at end of file +If you experience a problem relating to using Flutter on Apple Silicon hardware, please [file an issue on GitHub](https://github.com/flutter/flutter/issues/new?template=1_activation.yml) with specific repro steps and information about your hardware and software configuration (paste the results of `flutter doctor -v`). Thank you! \ No newline at end of file diff --git a/docs/unsorted_wiki/Accessibility-on-Windows.md b/docs/platforms/desktop/windows/Accessibility-on-Windows.md similarity index 100% rename from docs/unsorted_wiki/Accessibility-on-Windows.md rename to docs/platforms/desktop/windows/Accessibility-on-Windows.md diff --git a/docs/unsorted_wiki/Debugging-issues-on-the-Web.md b/docs/platforms/web/Debugging-issues-on-the-Web.md similarity index 100% rename from docs/unsorted_wiki/Debugging-issues-on-the-Web.md rename to docs/platforms/web/Debugging-issues-on-the-Web.md diff --git a/docs/releases/Flutter-Cherrypick-Process.md b/docs/releases/Flutter-Cherrypick-Process.md index 2df5a11334c9a..6e69c44ca830a 100644 --- a/docs/releases/Flutter-Cherrypick-Process.md +++ b/docs/releases/Flutter-Cherrypick-Process.md @@ -32,7 +32,7 @@ Anyone can request a cherry-pick. ### When do I request a cherry pick? - Whenever you have identified a commit on the main/master that fixes an issue that is present on the beta or stable branch. -- Whenever you need to update a pub dependency that fixes an issue that is present on the beta or stable branch (see [Updating dependencies](https://github.com/flutter/flutter/wiki/Updating-dependencies-in-Flutter#to-update-a-single-dependency-for-cherrypicks)) +- Whenever you need to update a pub dependency that fixes an issue that is present on the beta or stable branch (see [Updating dependencies](../infra/Updating-dependencies-in-Flutter.md#to-update-a-single-dependency-for-cherrypicks) ### Who reviews and approves cherry-pick requests? diff --git a/docs/releases/Flutter-build-release-channels.md b/docs/releases/Flutter-build-release-channels.md index c32957fc1de7a..46192e12e70a5 100644 --- a/docs/releases/Flutter-build-release-channels.md +++ b/docs/releases/Flutter-build-release-channels.md @@ -5,7 +5,7 @@ Flutter has the following channels, in increasing order of stability. ### `master` (aka `main`) The current tip-of-tree, absolute latest cutting edge build. Usually functional, though sometimes we accidentally break things. We do not run the entirety of our testing before allowing patches to land on this branch. We do not -recommend using this branch unless [you are contributing to Flutter](https://github.com/flutter/flutter/blob/main/CONTRIBUTING.md). +recommend using this branch unless [you are contributing to Flutter](../../CONTRIBUTING.md). The API documentation for the most recent commit on `master` is staged at: @@ -17,7 +17,7 @@ _We are planning to rename this channel to `main` soon; this work is tracked in The latest stable release. If you want to be using the latest and greatest, the `beta` branch is the right choice. That's the most recent version of Flutter that we have heavily tested. The beta branch has passed all our public testing, has been verified against test suites for Google products that use Flutter, and has been vetted against [contributed private test suites](https://github.com/flutter/tests). -We branch from `master` for a new beta release at the beginning of the month, usually the first Wednesday. This includes a branch for Dart, the engine and the framework. These branches are then "stabilized" for the next couple of weeks, meaning we accept [cherrypick](https://github.com/flutter/flutter/wiki/Flutter-Cherrypick-Process) requests for high impact issues. Once a quarter, the beta branch lives on to become the next stable branch, as detailed below. +We branch from `master` for a new beta release at the beginning of the month, usually the first Wednesday. This includes a branch for Dart, the engine and the framework. These branches are then "stabilized" for the next couple of weeks, meaning we accept [cherrypick](Flutter-Cherrypick-Process.md) requests for high impact issues. Once a quarter, the beta branch lives on to become the next stable branch, as detailed below. On average it takes about two weeks for a fix to end up in the beta branch after it lands in our repository (in the `master` channel). @@ -29,7 +29,7 @@ Roughly speaking, every third `beta` is promoted to `stable`. This is essentiall We recommend using this channel for new users and for production app releases. -In case of high severity, high impact or security issues, we may do a hotfix release for the `stable` channel just like we do for `beta`. This will follow the same [cherrypick](https://github.com/flutter/flutter/wiki/Flutter-Cherrypick-Process) process. +In case of high severity, high impact or security issues, we may do a hotfix release for the `stable` channel just like we do for `beta`. This will follow the same [cherrypick](Flutter-Cherrypick-Process.md) process. The `stable` version of Flutter is the one documented by our API documentation at: @@ -52,12 +52,12 @@ To switch channels, run `flutter channel []`, and then run `flutte ## Will a particular bug fix be provided in a hotfix release? -Depending on the severity of the issue, it is possible. Refer to the [cherrypick process](https://github.com/flutter/flutter/wiki/Flutter-Cherrypick-Process) for details. +Depending on the severity of the issue, it is possible. Refer to the [cherrypick process](Flutter-Cherrypick-Process.md) for details. If you really need a particular patch and it's a fix to the flutter/flutter repository, you should feel free to create a Flutter branch yourself on your development machine and cherry-pick the fix you want onto that branch. Flutter is distributed as a `git` repository and all of `git`'s tools are available to you. If you need a particular patch that's from the flutter/engine repository or one of our dependencies (e.g. Dart or Skia), you could build your own engine but it's probably easier to just wait until the next release. On average, the next `beta` release is about two weeks away. ## See also * [Release process](Release-process.md), which describes the details for how we push builds from channel to channel. -* [Cherrypick process](https://github.com/flutter/flutter/wiki/Flutter-Cherrypick-Process), where we cover how to request an issue for cherrypicking. +* [Cherrypick process](Flutter-Cherrypick-Process.md), where we cover how to request an issue for cherrypicking. * [Release notes](https://flutter.dev/docs/development/tools/sdk/release-notes), where we document changes to each version of the stable channel. diff --git a/docs/releases/Hotfixes-to-the-Stable-Channel.md b/docs/releases/Hotfixes-to-the-Stable-Channel.md index 67a5addd1ce7b..0eae5c4b9e4b1 100644 --- a/docs/releases/Hotfixes-to-the-Stable-Channel.md +++ b/docs/releases/Hotfixes-to-the-Stable-Channel.md @@ -20,12 +20,19 @@ without them needing to read each issue individually. Our goal is to make the list easy for them to scan. More information and tips: -https://github.com/flutter/flutter/wiki/Hotfix-Documentation-Best-Practices +docs/releases/Hotfix-Documentation-Best-Practices.md INTERNAL NOTE --> ## Flutter 3.22 Changes +### [3.22.1](https://github.com/flutter/flutter/releases/tag/3.22.1) (May 22, 2024) +* [dart/55714](https://github.com/dart-lang/sdk/issues/55714) - Fixes a bug in the CFE which could manifest as compilation errors of Flutter + web apps when compiled with dart2wasm. +* [dart/55758](https://github.com/dart-lang/sdk/issues/55758) - Fixes a bug in the pub client, such that `dart run` will not interfere with + Flutter l10n (at least for most cases). +* [flutter/147142](https://github.com/flutter/flutter/issues/147142) - Fixes a read/write permission issue when building Flutter apps for MacOS. + ### [3.22.0](https://github.com/flutter/flutter/releases/tag/3.22.0) (May 14, 2024) Initial stable release. @@ -686,4 +693,4 @@ This hotfix release addresses the following issues: - [flutter/46172](https://github.com/flutter/flutter/issues/46172) - reportFullyDrawn causes crash on Android KitKat ### Hotfix.5 (December 11, 2019) -Initial stable release. \ No newline at end of file +Initial stable release. diff --git a/docs/releases/Quality-Assurance.md b/docs/releases/Quality-Assurance.md index 2efefca32902f..f3f589325a6d3 100644 --- a/docs/releases/Quality-Assurance.md +++ b/docs/releases/Quality-Assurance.md @@ -2,7 +2,7 @@ With each beta we need to test that there are no regressions. We have lots of au ## When to test betas -We announce betas on our Discord (see the [Chat](https://github.com/flutter/flutter/wiki/Chat) page for the invite link), in the #releases channel, about once a month. +We announce betas on our Discord (see the [Chat](../contributing/Chat.md) page for the invite link), in the #releases channel, about once a month. ## How to get a beta build diff --git a/docs/unsorted_wiki/Roadmap.md b/docs/roadmap/Roadmap.md similarity index 95% rename from docs/unsorted_wiki/Roadmap.md rename to docs/roadmap/Roadmap.md index cd98e7c7fa0ee..bb1896d518392 100644 --- a/docs/unsorted_wiki/Roadmap.md +++ b/docs/roadmap/Roadmap.md @@ -2,7 +2,7 @@ In the interest of transparency, we want to share high-level details of our road Our plans will evolve over time based on customer feedback and new market opportunities. We use our quarterly surveys and feedback on GitHub issues to prioritize work. The list here shouldn't be viewed either as exhaustive, nor a promise that we will complete all this work. If you have feedback about what you think we should be working on, we encourage you to get in touch (e.g. by [filing an issue](https://github.com/flutter/flutter/issues/new/choose), or using the "thumbs-up" emoji reaction on an issue's first comment). Flutter is an open source project, we invite contributions both towards the themes presented below and in other areas. -_If you are a contributor or team of contributors with long-term plans for [contributing to Flutter](https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md), and would like your planned efforts reflected in the roadmap, please reach out to Hixie (ian@hixie.ch)._ +_If you are a contributor or team of contributors with long-term plans for [contributing to Flutter](../../CONTRIBUTING.md), and would like your planned efforts reflected in the roadmap, please reach out to Hixie (ian@hixie.ch)._ # 2024 @@ -76,4 +76,4 @@ We're still not planning on investing in built-in support for [code push or hot *** -_We maintain an [archive of roadmaps from previous years](https://github.com/flutter/flutter/wiki/%5BArchive%5D-Old-Roadmaps) in a separate page._ \ No newline at end of file +_We maintain an [archive of roadmaps from previous years]([Archive]-Old-Roadmaps.md) in a separate page._ \ No newline at end of file diff --git a/docs/unsorted_wiki/[Archive]-Old-Roadmaps.md b/docs/roadmap/[Archive]-Old-Roadmaps.md similarity index 98% rename from docs/unsorted_wiki/[Archive]-Old-Roadmaps.md rename to docs/roadmap/[Archive]-Old-Roadmaps.md index 5c50765c0f2de..1e75066c19b0f 100644 --- a/docs/unsorted_wiki/[Archive]-Old-Roadmaps.md +++ b/docs/roadmap/[Archive]-Old-Roadmaps.md @@ -71,7 +71,7 @@ We unfortunately have had to shelve our current efforts to implement hot reload In general we prioritize [issues with the most thumbs-up reactions on GitHub](https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc), and the astute among you may notice that the list of non-goals includes a number of these highest-rated issues. Unfortunately, we have discovered a pattern that we did not expect, though it is obvious in retrospect: when we address all the highest-ranked issues except for those that are technically infeasible or intractable for whatever reason, the result is that the highest-ranked issues that are left are _all_ issues that are infeasible or somehow intractable. -_See also: [[Popular issues]], which discusses each of the top 10 issues._ +_See also: [Popular issues](../contributing/issue_hygiene/Popular-issues.md), which discusses each of the top 10 issues._ # 2022 @@ -172,7 +172,7 @@ While in 2020 we primarily focused on fixing bugs, in 2021 we plan to also add s ## Release Channels and Cadence -Flutter offers three “channels” from which developers can receive updates: master, beta and stable, with increasing levels of stability and confidence of quality but longer lead times for changes to propagate. We plan to release one beta build each month, typically near the start of the month, and about four stable releases throughout the year. We recommend that you use the stable channel for apps released to end-users. For more details on our release process, see the [Flutter build release channels](https://github.com/flutter/flutter/wiki/Flutter-build-release-channels) wiki page. +Flutter offers three “channels” from which developers can receive updates: master, beta and stable, with increasing levels of stability and confidence of quality but longer lead times for changes to propagate. We plan to release one beta build each month, typically near the start of the month, and about four stable releases throughout the year. We recommend that you use the stable channel for apps released to end-users. For more details on our release process, see the [Flutter build release channels](../releases/Flutter-build-release-channels.md) wiki page. We used to also have a _dev_ channel which represented a level of stability between master and beta. At the end of 2021, we retired this channel; it is no longer updated. @@ -198,4 +198,4 @@ We intend to deliver on long-anticipated features such as our router refactor, i In general in 2020 we intend to primarily focus on fixing bugs rather than adding new features. -_We mainly use the "Thumbs-Up" emoji reactions on the first comment of an issue to determine its importance. See the [Issue hygiene](https://github.com/flutter/flutter/wiki/Issue-hygiene) wiki page for more details on our prioritization strategy._ +_We mainly use the "Thumbs-Up" emoji reactions on the first comment of an issue to determine its importance. See the [Issue hygiene](../contributing/issue_hygiene/README.md) wiki page for more details on our prioritization strategy._ diff --git a/docs/unsorted_wiki/Fast-Start.md b/docs/tool/Fast-Start.md similarity index 100% rename from docs/unsorted_wiki/Fast-Start.md rename to docs/tool/Fast-Start.md diff --git a/docs/unsorted_wiki/Managing-template-image-assets.md b/docs/tool/Managing-template-image-assets.md similarity index 84% rename from docs/unsorted_wiki/Managing-template-image-assets.md rename to docs/tool/Managing-template-image-assets.md index 989807308fb5a..c8769b9a0dcc5 100644 --- a/docs/unsorted_wiki/Managing-template-image-assets.md +++ b/docs/tool/Managing-template-image-assets.md @@ -1,3 +1,5 @@ +# Managing template image assets + Image assets used in templates in the `flutter` tool are maintained in the [flutter_template_images][fti_pkg] package on [Pub.dev][pub] and are not checked into the main [flutter/flutter][flutter_repo] repository. Flutter's presubmit checks prevent binaries from being checked in to the repository. Binary files add significant size to the repository and produce large diffs when updated. This negatively impacts Flutter users when running `flutter upgrade`. Downloading a pub package does not involve a full sync of the git history, and is therefore significantly lighter weight. @@ -15,7 +17,7 @@ First, add the images to the flutter_template_images package: 1. Fork the [flutter/packages][packages_repo] repo on GitHub. 2. Add the images at the relevant path under the `templates` directory. Filenames should be the exact final filenames as they will appear in a project generated by the `flutter` tool. They should _not_ include a `.img.tmpl` suffix. 3. Update the version in [`pubspec.yaml`](https://github.com/flutter/packages/blob/main/packages/flutter_template_images/pubspec.yaml). For new assets, increment the _minor_ version in the `major.minor.patch` version number; for updates to existing assets, increment the _patch_ version. -4. Add new heading for this version in [`CHANGELOG.md`](https://github.com/flutter/packages/blob/main/packages/flutter_template_images/CHANGELOG.md) and add a line describing your change. Follow the [Changelog Style][changelog_style] guidelines. +4. Add new heading for this version in [`CHANGELOG.md`](https://github.com/flutter/packages/blob/main/packages/flutter_template_images/CHANGELOG.md) and add a line describing your change. Follow the [Changelog Style](../ecosystem/contributing/README.md#changelog-style) guidelines. 5. Commit your changes and send a pull request. 6. Once your changes are landed, a post-submit job will automatically publish the new version on Pub. You can verify this has occurred under the _Versions_ tab of the [flutter_template_images][fti_pkg] page. @@ -24,10 +26,10 @@ First, add the images to the flutter_template_images package: Once the updated package has been published on Pub, roll your changes into the main Flutter repository. 1. Fork the [flutter/flutter][flutter_repo] repo on GitHub. -2. Edit [`packages/flutter_tools/lib/src/commands/update_packages.dart`](https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/commands/update_packages.dart) and update the pinned version number for the `flutter_template_images` to the new version. +2. Edit [`packages/flutter_tools/lib/src/commands/update_packages.dart`](https://github.com/flutter/flutter/blob/main/packages/flutter_tools/lib/src/commands/update_packages.dart) and update the pinned version number for the `flutter_template_images` to the new version. 3. From within the repo directory, run `flutter update-packages --force-upgrade`. 4. For each image that you added to `flutter_template_images`, add a zero-byte file with a `.img.tmpl` suffix in the corresponding location under the [`templates`][tools_templates_dir] directory of the `flutter_tools` package. -5. Edit [`packages/flutter_tools/templates/template_manifest.json`](https://github.com/flutter/flutter/blob/master/packages/flutter_tools/templates/template_manifest.json) and add an entry for each file you added, including the `.img.tmpl` suffix. +5. Edit [`packages/flutter_tools/templates/template_manifest.json`](https://github.com/flutter/flutter/blob/main/packages/flutter_tools/templates/template_manifest.json) and add an entry for each file you added, including the `.img.tmpl` suffix. 6. Commit your changes, and perform a test run to be sure they're emitted successfully by the `flutter` tool. 7. Assuming everything looks good, send a pull request. @@ -39,6 +41,5 @@ _(This page is referenced by an error message in the Flutter presubmit checks.)_ [flutter_repo]: https://github.com/flutter/flutter [packages_repo]: https://github.com/flutter/packages [package_templates_dir]: https://github.com/flutter/packages/tree/main/packages/flutter_template_images/templates -[tools_templates_dir]: https://github.com/flutter/flutter/tree/master/packages/flutter_tools/templates -[tools_repo]: https://github.com/flutter/flutter/tree/master/packages/flutter_tools -[changelog_style]: https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#changelog-style \ No newline at end of file +[tools_templates_dir]: https://github.com/flutter/flutter/tree/main/packages/flutter_tools/templates +[tools_repo]: https://github.com/flutter/flutter/tree/main/packages/flutter_tools diff --git a/docs/unsorted_wiki/The-flutter-tool.md b/docs/tool/README.md similarity index 94% rename from docs/unsorted_wiki/The-flutter-tool.md rename to docs/tool/README.md index 9667fab252a08..3870cde18ea00 100644 --- a/docs/unsorted_wiki/The-flutter-tool.md +++ b/docs/tool/README.md @@ -1,3 +1,5 @@ +# The `flutter` tool + The `flutter` command-line tool is how developers (or IDEs on behalf of developers) interact with Flutter. @@ -10,7 +12,7 @@ These include: - `flutter update-packages`, which downloads all the Dart dependencies for all Dart packages in the Flutter repository. -- `flutter analyze --flutter-repo`, as described on [[Using the Dart analyzer]]. +- `flutter analyze --flutter-repo`, as described on [Using the Dart analyzer](../contributing/Using-the-Dart-analyzer.md). When contributing to Flutter, use `git pull --rebase` or `git rebase upstream/main` rather than `flutter upgrade`. @@ -21,12 +23,12 @@ you run `git pull --rebase` (or `flutter upgrade`, or anything that changes the ## Documentation The rest of this document assumes that `flutter` and `dart` on your path resolve -to the scripts inside [`/path/to/flutter/bin`](https://github.com/flutter/flutter/tree/master/bin). If either `flutter` or `dart` +to the scripts inside [`/path/to/flutter/bin`](https://github.com/flutter/flutter/tree/main/bin). If either `flutter` or `dart` on your path resolves to another binary, you should either prepend the Flutter SDK `bin` dir to the _front_ of your `$PATH`, or ensure each invocation uses the path to the Flutter SDK controlled `flutter` and `dart` binaries. -Markdown documentation can be found for some commands in [flutter/packages/flutter_tools/doc/](https://github.com/flutter/flutter/tree/master/packages/flutter_tools/doc). +Markdown documentation can be found for some commands in [flutter/packages/flutter_tools/doc/](https://github.com/flutter/flutter/tree/main/packages/flutter_tools/doc). ## Analysis @@ -102,7 +104,7 @@ The following `launch.json` config will allow you to debug the Flutter tool: Note that: -1. The current workspace directory is assumed to be the [root of the flutter_tools package](https://github.com/flutter/flutter/tree/master/packages/flutter_tools). +1. The current workspace directory is assumed to be the [root of the flutter_tools package](https://github.com/flutter/flutter/tree/main/packages/flutter_tools). 2. Update `args` to be whatever arguments you want passed to the tool (i.e. which sub-command you want to debug). 3. To debug the `flutter` command-line tool while running a `flutter` project, add `cwd` to the configuration with the path of the project. @@ -206,7 +208,7 @@ Similar to the [dwds debugging workflow](https://github.com/dart-lang/webdev/blo Each dependency we add to Flutter and the Flutter Tool makes the repo more difficult to update and requires additional work from our clients to update. -Only packages which are developed by the Dart and/or Flutter teams should be permitted into the Flutter Tool. Any third party packages that are currently in use are exempt for historical reasons, but their versions must be pinned in [update_packages.dart](https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/commands/update_packages.dart#L23) . These packages should only be updated after a human review of the new version. If a Dart and/or Flutter team package depends transitively on an un-maintained or unknown package, we should work with the owners to remove or replace that transitive dependency. +Only packages which are developed by the Dart and/or Flutter teams should be permitted into the Flutter Tool. Any third party packages that are currently in use are exempt for historical reasons, but their versions must be pinned in [update_packages.dart](https://github.com/flutter/flutter/blob/main/packages/flutter_tools/lib/src/commands/update_packages.dart#L23) . These packages should only be updated after a human review of the new version. If a Dart and/or Flutter team package depends transitively on an un-maintained or unknown package, we should work with the owners to remove or replace that transitive dependency. Instead of adding a new package, ask yourself the following questions: diff --git a/docs/unsorted_wiki/The-flutter-run-variants.md b/docs/tool/The-flutter-run-variants.md similarity index 88% rename from docs/unsorted_wiki/The-flutter-run-variants.md rename to docs/tool/The-flutter-run-variants.md index b5b0a41ab6d4e..6ac500441ab71 100644 --- a/docs/unsorted_wiki/The-flutter-run-variants.md +++ b/docs/tool/The-flutter-run-variants.md @@ -1,3 +1,5 @@ +# The `flutter run` variants + We aspire to reach a state where `flutter run` has the following modes: - `flutter run`: builds a debug version of the app and starts it in "hot reload" mode, then shows the console UI to manipulate the running instance. @@ -5,7 +7,7 @@ We aspire to reach a state where `flutter run` has the following modes: - `flutter run --profile`: builds a profile version of the app and starts it directly, then shows the console UI to manipulate the running instance. - `flutter run --release`: builds a release version of the app and starts it directly, then shows the console UI to manipulate the running instance. -Adding `--machine` in any of the situations above spawns a [flutter daemon](https://github.com/flutter/flutter/blob/master/packages/flutter_tools/doc/daemon.md#flutter-run---machine) which: +Adding `--machine` in any of the situations above spawns a [flutter daemon](https://github.com/flutter/flutter/blob/main/packages/flutter_tools/doc/daemon.md#flutter-run---machine) which: * changes the output to JSON so that it can be more easily consumed by IDEs, and * allows the use of JSON commands to interact with the running application (e.g. stopping the application). diff --git a/docs/unsorted_wiki/Using-custom-embedders-with-the-Flutter-CLI.md b/docs/tool/Using-custom-embedders-with-the-Flutter-CLI.md similarity index 98% rename from docs/unsorted_wiki/Using-custom-embedders-with-the-Flutter-CLI.md rename to docs/tool/Using-custom-embedders-with-the-Flutter-CLI.md index 55c661c50a20c..23095e785df1c 100644 --- a/docs/unsorted_wiki/Using-custom-embedders-with-the-Flutter-CLI.md +++ b/docs/tool/Using-custom-embedders-with-the-Flutter-CLI.md @@ -1,3 +1,5 @@ +# Using custom embedders with the Flutter CLI + ## Making the Flutter CLI work with custom or third-party embedders The experimental "custom device" feature of the Flutter CLI allows you to make custom or third-party embedders such as [flutter-pi](https://github.com/ardera/flutter-pi) or the [sony embedder](https://github.com/sony/flutter-embedded-linux) work with the Flutter CLI and use features such as hot-reload, hot-restart, debugging and DevTools. Profile/release mode and plugins are not supported right now. diff --git a/docs/unsorted_wiki/Flutter-Web-Triage.md b/docs/triage/Flutter-Web-Triage.md similarity index 100% rename from docs/unsorted_wiki/Flutter-Web-Triage.md rename to docs/triage/Flutter-Web-Triage.md diff --git a/docs/unsorted_wiki/Triage.md b/docs/triage/README.md similarity index 97% rename from docs/unsorted_wiki/Triage.md rename to docs/triage/README.md index f8e81cf828643..c9ef5c3b55398 100644 --- a/docs/unsorted_wiki/Triage.md +++ b/docs/triage/README.md @@ -2,7 +2,7 @@ The process of triaging new incoming bugs consiists of processing the list of [issues without team-* labels, with no assignees, and not labeled `will need additional triage`](https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+no%3Aassignee+-label%3A%22will+need+additional+triage%22+-label%3Ateam-release%2Cteam-codelabs%2Cteam-ecosystem%2Cteam-infra%2Cteam-engine%2Cteam-framework%2Cteam-news%2Cteam-ios%2Cteam-tool%2Cteam-web%2Cteam-desktop%2Cteam-design%2Cteam-android%2Cteam-go_router%2Cteam-games%2Cteam-text-input+) as described in this section, so as to make that list empty. -_See also: [[Issue triage reports]]_ +_See also: [Issue triage reports](../wiki_archive/Nevercode%20[TBD]/Issue-triage-reports.md)_ ### General @@ -22,7 +22,7 @@ Ideally every issue would have a sample app that demonstrated the problem. Performance bugs should have timeline traces. -Crashes should have crash logs with a Flutter version so that the [flutter-symbolizer-bot](https://github.com/flutter-symbolizer-bot) can do its work (see also [[Crashes]]). +Crashes should have crash logs with a Flutter version so that the [flutter-symbolizer-bot](https://github.com/flutter-symbolizer-bot) can do its work (see also [Crashes](../engine/Crashes.md)). #### What makes an issue actionable @@ -60,7 +60,7 @@ Some labels are used to track the flow of issues from the time they're filed unt * `assigned for triage`: The issue is assigned to a domain expert for further triage. * `has reproducible steps`: The issue has a reproducible case or test, Flutter doctor output, and usable stack traces if appropriate. It is actionable in the sense that it can be routed to a domain team for action. * `needs repro info`: We need more reproduction steps in order to be able to act on this issue. - * `workaround available`: A workaround is available to overcome the issue until it is properly addressed. Read more about [providing workarounds](https://github.com/flutter/flutter/wiki/Issue-hygiene#comments-providing-workarounds). + * `workaround available`: A workaround is available to overcome the issue until it is properly addressed. Read more about [providing workarounds](../contributing/issue_hygiene/README.md#comments-providing-workarounds). * `will need additional triage`: Assign this if you don't know how to route it to a team. **To complete the triage of an issue, add one (and only one) `team-*` label**. Team labels differ from the similar category names (such as `engine` or `framework`) in that the category labels indicate what part(s) of the codebase an issue affects, while `team-*` labels indicate the team that owns that work. Most issues will have both, and they won't always match. @@ -124,7 +124,7 @@ Each team has an **incoming issue list**, the issues assigned to that team (team Each issue in this list should be examined, cleaned up (see next section), and either: - closed, with a comment saying why (e.g. is a duplicate, is not actionable, is invalid). The [`r:`](https://github.com/flutter/flutter/labels?q=r%3A) labels may be of use when closing an issue. -- given a [priority](https://github.com/flutter/flutter/wiki/Issue-hygiene#priorities), and tagged with the team's corresponding `triaged-*` label. This marks the issue as triaged. If the priority is P3 and the reporter has expressed that the issue is important to them, it will help the reporter feel welcome if a comment is added expressing empathy for their plight and explaining why it is not something we consider important. +- given a [priority](../contributing/issue_hygiene/README.md#priorities), and tagged with the team's corresponding `triaged-*` label. This marks the issue as triaged. If the priority is P3 and the reporter has expressed that the issue is important to them, it will help the reporter feel welcome if a comment is added expressing empathy for their plight and explaining why it is not something we consider important. - sent to another team, by removing the current `team-*` label and adding another one. A comment should be added explaining the action. - sent back to primary triage, by removing the `team-*` label but not adding another one. A comment should be added explaining the action. - escalated to critical triage, by adding the `will need additional triage` label. A comment should be added explaining the action. @@ -190,7 +190,7 @@ Teams should also go through all PRs in their area (ideally in a separate meetin 2. Check that the assigned reviewers have left comments; if not, contact them to remind them. 3. Check that any questions on the PR from the contributor have been answered. -For more guidance on reviewing PRs, see [Tree Hygiene](https://github.com/flutter/flutter/wiki/Tree-hygiene#how). +For more guidance on reviewing PRs, see [Tree Hygiene](../contributing/Tree-hygiene.md#how). ## Links for teams @@ -303,7 +303,7 @@ PRs are reviewed weekly across the framework, packages, and engine repositories: ### Web platform team (`team-web`) -- See the [Flutter Web Triage](https://github.com/flutter/flutter/wiki/Flutter-Web-Triage) page. +- See the [Flutter Web Triage](Flutter-Web-Triage.md) page. ## Adding a new team diff --git a/docs/unsorted_wiki/Add-Flutter-to-existing-apps.md b/docs/unsorted_wiki/Add-Flutter-to-existing-apps.md deleted file mode 100644 index 451b807741312..0000000000000 --- a/docs/unsorted_wiki/Add-Flutter-to-existing-apps.md +++ /dev/null @@ -1,3 +0,0 @@ -## Moved - -Add-to-app is now released with Flutter v1.12. The updated documentations are at [https://flutter.dev/docs/development/add-to-app/](https://flutter.dev/docs/development/add-to-app/) \ No newline at end of file diff --git a/docs/unsorted_wiki/Binding-to-native-code-via-FFI.md b/docs/unsorted_wiki/Binding-to-native-code-via-FFI.md deleted file mode 100644 index 600fecdb15c4e..0000000000000 --- a/docs/unsorted_wiki/Binding-to-native-code-via-FFI.md +++ /dev/null @@ -1 +0,0 @@ -Please see [Binding to native code using dart:ffi](https://flutter.dev/docs/development/platform-integration/c-interop) on [flutter.dev](https://flutter.dev/) \ No newline at end of file diff --git a/docs/unsorted_wiki/Code-generation-in-Flutter.md b/docs/unsorted_wiki/Code-generation-in-Flutter.md deleted file mode 100644 index a2d90bc4ea187..0000000000000 --- a/docs/unsorted_wiki/Code-generation-in-Flutter.md +++ /dev/null @@ -1,5 +0,0 @@ -Flutter previously supported code generation via `flutter generate`. - -However, `flutter generate` is deprecated and slated to be removed in a future flutter release. Instead, consider `build runner`, which is easier to use directly, and can be used to generate code for Flutter projects. - -_See also: https://pub.dev/packages/build_runner_ diff --git a/docs/unsorted_wiki/Codelabs.md b/docs/unsorted_wiki/Codelabs.md deleted file mode 100644 index 54239f4fcb4b0..0000000000000 --- a/docs/unsorted_wiki/Codelabs.md +++ /dev/null @@ -1,29 +0,0 @@ -The Flutter team currently maintains the following codelabs: - -* [Write Your First Flutter App, part 1](https://codelabs.developers.google.com/codelabs/first-flutter-app-pt1/#0) - * Create a simple mobile app that generates proposed names for a startup company. In part one, you’ll use a package that returns pairs of words at random and inserts them into an infinite scrolling list. -* [Write Your First Flutter App, part 2](https://codelabs.developers.google.com/codelabs/first-flutter-app-pt2/#0) - * Create a simple mobile app that generates proposed names for a startup company. In part two, you’ll extend the example from part 1 to allow the user to select favorite word pairs, and add a second “Saved Favorites” page where users can view the selected names. Finally, you’ll change the app’s theme color. -* [Basic Flutter layout](https://flutter.dev/docs/codelabs/layout-basics) - * Use DartPad in a browser (no need to download Flutter or Dart!) to learn the basics of creating a Flutter layout. -* [Building Beautiful UIs with Flutter](https://codelabs.developers.google.com/codelabs/flutter/#0) - * A deeper “first dive” than “Write Your First Flutter App.” In this codelab you’ll create a chat app that includes a simple animation, and customizes the UI for iOS and Android. -* [Adding Google Maps to a Flutter App](https://codelabs.developers.google.com/codelabs/google-maps-in-flutter/#0) - * Display a Google map in an app, retrieve data from a web service, and display the data as markers on the map. -* [Build a Photo Sharing App with Google Photos and Flutter](https://codelabs.developers.google.com/codelabs/google-photos-sharing/#0) - * Build a field trip app that allows you and other members of the trip to share photos. -* [Building a Cupertino app with Flutter](https://codelabs.developers.google.com/codelabs/flutter-cupertino/#0) - * Build a version of the Shrine shopping app (used in the Material Design codelabs) using the Cupertino package to create an iOS style look and feel. Create multiple tabs and navigate between them. -* [Firebase for Flutter](https://codelabs.developers.google.com/codelabs/flutter-firebase/#0) - * Connect a Flutter app to a Firebase database, and use a transaction to update shared information. -* [MDC 101 Flutter: Material Components (MDC) Basics](https://codelabs.developers.google.com/codelabs/mdc-101-flutter/#0) - * Learn the basics of using Material Components by building a simple app with core components. The four MDC codelabs guide you through building an e-commerce app called Shrine. You’ll start by building a login page using several of MDC Flutter’s components. -* [MDC 102 Flutter: Material Structure and Layout](https://codelabs.developers.google.com/codelabs/mdc-102-flutter/#0) - * Learn how to use Material for structure and layout in Flutter. Continue building the e-commerce app, introduced in MDC-101, by adding navigation, structure, and data. -* [MDC 103 Flutter: Material Theming with Color, Shape, Elevation, and Type](https://codelabs.developers.google.com/codelabs/mdc-103-flutter/#0) - * Discover how Material Components for Flutter make it easy to differentiate your product, and express your brand through design. Continue building your e-commerce app by adding a home screen that displays products. -* [MDC 104 Flutter: Material Advanced Components](https://codelabs.developers.google.com/codelabs/mdc-104-flutter/#0) - * Improve your design and learn to use our advanced component backdrop menu. Finish your e-commerce app by adding a backdrop with a menu that filters products by the selected category. - - -If you find errors with the codelabs, please create [issues](https://github.com/flutter/flutter/issues) with the [dev: docs - codelab](https://github.com/flutter/flutter/labels/dev%3A%20docs%20-%20codelab) and [TODAY](https://github.com/flutter/flutter/labels/%E2%9A%A0%20TODAY) labels. \ No newline at end of file diff --git a/docs/unsorted_wiki/Deferred-Components.md b/docs/unsorted_wiki/Deferred-Components.md deleted file mode 100644 index d3ca0592c8f3e..0000000000000 --- a/docs/unsorted_wiki/Deferred-Components.md +++ /dev/null @@ -1,305 +0,0 @@ -# Deferred Components - -Deferred components is a set of features and tooling that allows developers to write dart code that can be AOT compiled into separate split dynamic libraries as well as package them together with assets into runtime downloadable modules on Android. The primary goal of deferred components is to reduce install apk size as well as reduce storage space taken up by the app by omitting features the user may not use. - -This feature is currently an experimental/preview feature that is only available on Android. It takes advantage of Android and Google Play Store’s dynamic feature modules to deliver the deferred components packaged as Android modules. This does not impact other platforms, which continue to build as normal with all deferred components and assets included at initial install time. - -Though modules can be defer loaded, the entire application must be completely built and uploaded as a single Android App Bundle (`.aab`). Dispatching partial updates without re-uploading new Android App Bundles for the entire application (eg, code push) is not supported. - -This feature only does deferred loading in release and profile mode. In debug mode, all deferred components are present at launch and will instantly load. - -A step by step guide on how to integrate deferred components with your app can be found on the [Flutter.dev documentation](https://flutter.dev/docs/perf/deferred-components). - -## APK size gallery case study - -Flutter Gallery implements deferred components for the crane study. Here, we will examine the initial install size gains in a [fully deferred Flutter gallery branch](https://github.com/flutter/gallery/tree/fully-deferred-gallery) (branch not kept up to date with master) where we implement deferred components for all studies and demos (not just crane). In this example, we have moved all the splittable assets and fonts into deferred components. Compared to a non-deferred components application, the initial installed APK file size breakdown is as follows: - -Deferred components: - -* base-arm64_v8a.apk - 12,325,372 bytes -* base-master.apk - 37,889,309 bytes -* Total deferred components initial installation size: 50,214,681 bytes - -Non-deferred components (regular app): - -* base-arm64_v8a.apk - 12,521,900 bytes -* base-master.apk - 80,605,796 bytes -* Total regular initial installation size: 93,127,696 bytes - -Here, we can see a ~200kB decrease in compiled dart code size (base-arm64_v8a.apk) and a ~43mB decrease in assets (base-master.apk) on initial download. Overall, there is a 46% reduction in initial installation size. The dart code, assets, and google fonts are instead moved into separate components downloaded at runtime only when needed: - -* Crane -* Fortnightly -* Rally -* Shrine -* Cupertino -* Material -* Reference - -The total installed size with all components installed is slightly larger than the non-deferred app, but this increase is on the order of a few kb due to overhead in the dart shared libraries from ELF headers and cross-loading-unit calls. - -## Deferred components app structure - -The deferred Dart libraries are interpreted by `gen_snapshot` (Dart’s compiler) to produce “loading units”, each of which are output as a split AOT shared library (`.so` file) when building in profile or release mode. A loading unit is the smallest set of libraries that are imported exclusively with the deferred keyword by the main code and can be split off of the base libraries. - -The following diagram shows an example app structure and a “lifecycle” of how deferred dart libraries are compiled into loading units and packaged into a `.aab` file. - -![](https://raw.githubusercontent.com/flutter/engine/master/docs/deferred_components_architecture.svg) - -This example app has the following properties: - -* Four Dart libraries, with Dart libraries `lib1` and `lib2` dependent on each other. `lib1`, `lib3`, and `lib4` are imported in the flutter app’s main code as deferred. -* Four loading units, with one being the base loading unit with id 1 and loading unit 2 containing both `lib1` and `lib2`. Loading units 3 and 4 contain `lib3` and `lib4` respectively. -* Three defined deferred components, plus an implicit base component. `component1` contains loading unit 2 and assets. `component2` contains both loading units 3 and 4 and no assets. `component3` is an assets only component. -* `app-release.aab` is the completed build output file, and contains all three components as well as the base component. - -There will always be an implicit base loading unit that contains core flutter packages as well as your base application code. Any libraries that are not fully imported as deferred by your base app code will be included in the base loading unit. If no additional loading units other than base are generated, it likely means you imported your files incorrectly. - -Multiple Dart libraries are compiled as a single loading unit if they import each other eagerly (non-deferred): - -![](https://raw.githubusercontent.com/flutter/engine/master/docs/dart_split_aot_compilation.svg) - -## Lifecycle of a `loadLibrary()` call - -Deferred components are primarily triggered to be downloaded, installed, and loaded via the `loadLibrary()` dart call. This call is handled differently in dart2js vs aot/native. Here, we will trace how the `loadLibrary()` call is translated into an installation of a deferred component: - -![](https://raw.githubusercontent.com/flutter/engine/master/docs/deferred_components_call_lifecycle.svg) - -The `loadLibrary()` dart call's native side implementation calls a `Dart_DeferredLoadHandler` callback that is set using `Dart_SetDeferredLoadHandler` in `DartIsolate::Initialize`. Dart internally retrieves the loading unit ID assigned to the library and passes it to the callback. The callback is implemented as `DartIsolate::OnDartLoadLibrary`. - -The loading unit ID is then passed on through the runtime controller, engine shell and platform view until it passes into the FlutterJNI in the Android embedder. Here, the loading unit ID is passed into the `DeferredComponentsManager`'s `installDeferredComponent` where the ID is converted from an integer to a String name identifying the pubspec-defined deferred component the requested library belongs to. This conversion is handled by a AndroidManifest metadata mapping that is created and verified during the build phase. - -`PlayStoreDeferredComponentManager` then invokes the play store split compat APIs to download the android module. Once the Android module is installed, the manager locates the .so files and passes the paths to the engine to `dlopen`. The engine then passes the symbols to the runtime and and dart isolate, which is able to load the symbols into the dart VM. The loading must be associated with a loading unit ID or the load will not complete the Dart Future returned by `loadLibrary()`. - -Keep in mind that multiple loading units may be contained in a deferred component, but a `loadLibrary` call will only load the dart symbols from the specific dart library the call was made from. Each loading unit must have separate `loadLibrary` calls before use. Subsequent `loadLibrary` calls on components that are already downloaded should complete much faster, however, the loading can never happen synchronously and there will be at least one frame between call and completion. - -### Installation by deferred component string name - -We also provide a [framework-side DeferredComponent utility class](https://master-api.flutter.dev/flutter/services/DeferredComponent-class.html) that allows direct installation via deferred component name as a string. - -This installation path may be used for two purposes: - -* Installing asset-only deferred components that do not have any Dart code to call `loadLibrary()` on. -* Pre-downloading components to use later. However, `loadLibrary()` must still be called in order to use any dart code from the pre-downloaded component. This is useful when the exact dart library needed is not known yet. - -The direct API uses platform channels to directly invoke the `installDeferredComponent` method on the `DynamicFeatureManager` and will not trigger any of the dart code packed in the component to load due to lack of a specified loading unit. Assets will be loaded. To use any dart code, `loadLibrary()` must still be called. - -### Uninstallation - -The [DeferredComponent](https://master-api.flutter.dev/flutter/services/DeferredComponent-class.html) framework utility class also provides an `uninstallDeferredComponent` method that uses platform channels to request that the OS uninstall and remove the files associated with the specified deferred component. Uninstallation is dependent on how the platform handles it and in Android's case, the removal of the files is queued and may take a long time before actually executed. - -Uninstallation may only be requested directly with the string name of the component to be uninstalled. Uninstallation by loading unit id or direct call on a dart import is not yet supported. - -## Tooling - -Deferred components must be built as Android App Bundles (`.aab`) to function. If built as debug or an apk file, dart will compile normally and produce a single `.so` file. - -Deferred components makes use of the existing `$ flutter build appbundle` command and checks for the existence of the `deferred-components:` entry in the `pubspec.yaml` to decide whether to build deferred or not. When the app is opted-in to deferred components and the build mode is release, `gen_snapshot` is passed a `--loading_unit_manifest` path, which tells `gen_snapshot` to attempt to produce split AOT artifacts. This includes a base file as well as a `.so` for every deferred library in the codebase. Each of these split units is called a "loading unit" and is assigned an internal integer ID called the loading unit ID. - -The build process also relies on project setup to function. Each deferred component must correspond to an Android module defined in the `android` directory of your app. The base module is build as the `app` module while each additional component should have a module with the same name as the component. The base module `AndroidManifest.xml` also needs to include the mapping between loading unit IDs and deferred components. - -The `flutter build appbundle` command assists in setting up the project with a validator that guides developers through the changes needed to build properly. This validator is necessary since the exact loading units produced by `gen_snapshot` is not known until `gen_snapshot` finishes compiling. Thus, some project setup can only be done after the `gen_snapshot` step in the build appbundle process. - -Since mistakenly importing a deferred file as non-deferred can cause the file to be compiled into the base loading unit, the deferred components validator also has a mechanism for preventing accidental changes to the app's final generated loading units. This check will cause the build to fail if the generated loading units do not match the results of the previous run which is cached in the `deferred_components_loading_units.yaml` file. After throwing an error upon detecting changes, the build will automatically pass this check on next run if no additional changes are made. This means that this check is not error proof as you are still free to ignore the mismatched loading unit error if the change was intended and accounted for and continue to build. - -*** - -# Fully deferring Flutter in add-to-app - -When using add-to-app, it's possible to convert the entire Flutter module into an Android dynamic feature module to install at runtime. - -Since the structures of add-to-app scenarios are highly variable, Flutter doesn't provide direct tooling to automate/validate full Flutter deferring. Instead, this guide provides details for implementing the components required for full Flutter deferring. The architecture described here is one of the many ways this can work, and is up to you to determine how best to integrate this into your apps. - -Integrating full Flutter deferring is experimental. It requires custom implementations, and setup that is not fully tested due to variability in different apps. Therefore, this feature is considered a very advanced feature, and Flutter may not be able to provide guarantees or technical support for specific use cases. - -Full Flutter deferral requires implementing `SplitInstallManager` in the base app module, as well as adding the dependency on `com.google.android.play:core` in `build.gradle` as an implementation. The dynamic feature module containing Flutter must depend on the base module. - -The base module can no longer include any references to Flutter code. Therefore, the `:flutter` dependency in `build.gradle` should be removed. - -The process described below uses the [fullscreen add-to-app example](https://github.com/flutter/samples/tree/master/add_to_app/fullscreen). - -## SplitInstallManager base module "bootstrapper" - -The base module must use `SplitInstallManager` to install the Flutter dynamic feature. For example, here is a bare-bones implementation called `SplitUtility` that downloads a dynamic feature module named `flutter` when `installFlutterModule` is called: - -```java -import android.annotation.SuppressLint; -import android.content.Context; -import androidx.annotation.NonNull; -import com.google.android.play.core.splitinstall.SplitInstallException; -import com.google.android.play.core.splitinstall.SplitInstallManager; -import com.google.android.play.core.splitinstall.SplitInstallManagerFactory; -import com.google.android.play.core.splitinstall.SplitInstallRequest; -import com.google.android.play.core.splitinstall.SplitInstallSessionState; -import com.google.android.play.core.splitinstall.SplitInstallStateUpdatedListener; -import com.google.android.play.core.splitinstall.model.SplitInstallErrorCode; -import com.google.android.play.core.splitinstall.model.SplitInstallSessionStatus; - -class SplitUtility { - private @NonNull SplitInstallManager splitInstallManager; - private @NonNull FeatureInstallStateUpdatedListener listener; - - private class FeatureInstallStateUpdatedListener implements SplitInstallStateUpdatedListener { - @SuppressLint("DefaultLocale") - public void onStateUpdate(SplitInstallSessionState state) { - int sessionId = state.sessionId(); - switch (state.status()) { - case SplitInstallSessionStatus.FAILED: - break; - case SplitInstallSessionStatus.INSTALLED: - break; - case SplitInstallSessionStatus.CANCELED: - break; - default: - } - } - } - - SplitUtility(Context context) { - splitInstallManager = SplitInstallManagerFactory.create(context); - listener = new FeatureInstallStateUpdatedListener(); - splitInstallManager.registerListener(listener); - } - - void installFlutterModule() { - SplitInstallRequest request = - SplitInstallRequest.newBuilder().addModule("flutter").build(); - - splitInstallManager - // Submits the request to install the module through the - // asynchronous startInstall() task. Your app needs to be - // in the foreground to submit the request. - .startInstall(request) - // Called when the install request is sent successfully. This is different than a successful - // install which is handled in FeatureInstallStateUpdatedListener. - .addOnSuccessListener( - sessionId -> { - // store sessionId somewhere if you want to reference it again. - }) - .addOnFailureListener( - exception -> { - switch (((SplitInstallException) exception).getErrorCode()) { - case SplitInstallErrorCode.NETWORK_ERROR: - break; - case SplitInstallErrorCode.MODULE_UNAVAILABLE: - break; - default: - break; - } - }); - } - - public void destroy() { - splitInstallManager.unregisterListener(listener); - } -} -``` - -The base module should install the Flutter module when appropriate. `PlayStoreDeferredComponentsManager` actually provides much of the same functionality, but it lives inside the Flutter Android embedding, and thus cannot be referenced from the base module. - -## Project configuration - -`build.gradle` of the base module as well as the flutter module should be modified to convert it into a dynamic feature module. The default Flutter android module used is located in the `.android/Flutter` directory. - -It's recommended that you change the path of the Android module as the `.android` directory may be cleared or regenerated by cleaning tasks. You can set a different module or a clone of the default one as the module root directory with `project(":flutter").projectDir = new File(“...”)` in your main android project’s `settings.gradle`. - -The following configuration changes are the base changes needed to convert a fullscreen Flutter add-to-app implementation into a dynamic feature module. - -Base module `build.gradle`: - -* Add `dynamicFeatures = [':flutter']` to the `android` section of the base module `build.gradle`. -* Remove `implementation project(':flutter')` from the dependencies section (the dynamic feature module must depend on the base module). -* Add `implementation "com.google.android.play:core:1.8.0"` to the dependencies section. - -Flutter module `build.gradle`: - -* Replace `apply plugin: 'com.android.library'` with `apply plugin: 'com.android.dynamic-feature'` in the Flutter module `build.gradle` -* Add a dependencies section to the Flutter module `build.gradle`: - -```gradle -dependencies { - implementation fileTree(dir: "libs", include: ["*.jar"]) - implementation project(":app") - api 'androidx.test:core:1.2.0' -} -``` - -Flutter module `AndroidManifest.xml`: - -* Add `xmlns:dist="http://schemas.android.com/apk/distribution"` to the `manifest` section -* Add the dynamic feature module section: - -```xml - - - - - - -``` - -Any references to the Flutter Java API will need to be done within your newly dynamic feature module. You are no longer able to directly launch a `FlutterActivity` from your main activity, and must now wrap it in a new class inside your dynamic feature module. - -It is recommended to create a new Android Activity in your dynamic Flutter module that implements all of the behavior from your base application and base Activity. After installing the Flutter Android split, the new dynamic Flutter Activity can then be launched. - -Depending on your specific apps, additional configuration may be needed to build and run your apps. - -## Regular deferred components integration - -We have not yet tested integration with a pure Flutter app using deferred components. - -Flutter's tooling doesn't yet support building add-to-app and deferred components together. However, it is technically possible to run `gen_snapshot` in split AOT mode, and then package the different `.so` files into additional dynamic feature modules. See the Custom Implementation below for additional details. - -*** - -# Custom Implementations - -It's possible to write a custom implementation that bypasses the Android Play store. This is only recommended for advanced developers, and is primarily aimed at apps with very unique needs such as extremely large asset components, specific download behavior, or distribution in a region that does not have access to the Play Store (e.g. China). - -### Overview - -The Flutter Embedder allows custom implementations that handle customer-unique download and unpacking of deferred components while still allowing access to the core Dart callbacks that register a loading unit with the Dart runtime. This process is far more involved than the default play store version. - -To implement a custom deferred components system, the following major pieces are required: - -* Android embedder implementation of `DeferredComponentManager` that handles communication between the app and the server as well as extracting the `.so` file and assets from the downloaded component. -* Tooling to package the components in a way that is compatible with your `DeferredComponentManager` and to interpret `gen_snapshot` output of loading units. -* A server to host the downloadable components. Without the Play Store acting as a distributor for Android dynamic feature modules, this must be custom. - -The following sections provide a high level guide of what needs to be done in a custom implementation. - -### DeferredComponentManager - Android Embedder - -The Embedder is responsible for downloading and installing the packaged component files. This can be done by implementing the abstract class `DeferredComponentManager` in the Android Embedder. - -The entry point into this class is `installDeferredComponent` which provides both a loading unit id and the component name to help determine what to install. - -`loadLibrary()` calls will pass only a loading unit id while `DeferredComponent.installDeferredComponent()` calls from the framework services package will pass only a component name to load an assets-only component. - -In order to resolve a specific component from the loading unit id, it is typically necessary to store a mapping of loading unit ids to the component name. In the default implementation, we accomplish this by storing a string meta-data in the base app’s `AndroidManifest.xml`, but this can be accomplished in any way desired. - -You may find detailed explanations of each method in `DeferredComponentManager` in the engine source file at `shell/platform/android/io/flutter/embedding/engine/deferredcomponents/DeferredComponentManager.java`. - -The default Play Store implementation is found at `shell/platform/android/io/flutter/embedding/engine/deferredcomponents/PlayStoreDeferredComponentManager.java` and can be used as a rough guide on what needs to be implemented. - -To load Dart libraries, call `FlutterJNI.loadDartDeferredLibrary` with the loading unit id, and a list of paths that potentially contain the `.so` file in your `loadDartLibrary` implementation. The engine will call `dlopen` on each of the paths provided until one is successfully opened. - -To load new assets, create an Android `AssetManager` that has access to the newly downloaded assets. Pass this `AssetManager` to `FlutterJNI.updateJavaAssetManager`. - -The `FlutterJNI` instance is passed in via `setJNI`. - -### Tooling - -Flutter’s tooling comes with the capability to instruct `gen_snapshot` to build split AOT, and pack the `.so` files and assets into an Android dynamic feature module. - -Custom implementations are typically unable to make use of this tooling. Therefore, you may have to write custom tooling to package the `.so` files and assets, so they work alongside the custom `DeferredComponentManager` implementation. - -To make `gen_snapshot` generate loading units, and the `.so` shared libraries, pass the `--loading_unit_manifest=` option to `gen_snapshot`. - -This will create a .json file at your `manifestPath` that contains the loading units and corresponding `.so` libs generated. The `.so` file and assets can then be packed in whatever format you wish to distribute on your file server. It is also your responsibility to unpack this format in your `DeferredComponentManager` implementation. - -### File server - -Since custom implementations typically do not use the Play store, a custom system for hosting and serving files to end users should be implemented. This part is highly variable in how it can be accomplished, and the only requirement is that it functions in tandem with the `DeferredComponentManager` implementation, so it delivers the files needed to load Dart shared libraries, and assets. diff --git a/docs/unsorted_wiki/Experimental-Add-Flutter-Activity.md b/docs/unsorted_wiki/Experimental-Add-Flutter-Activity.md deleted file mode 100644 index 3fb00b39530bb..0000000000000 --- a/docs/unsorted_wiki/Experimental-Add-Flutter-Activity.md +++ /dev/null @@ -1 +0,0 @@ -This document has been moved to https://flutter.dev/docs/development/add-to-app/android/add-flutter-screen \ No newline at end of file diff --git a/docs/unsorted_wiki/Experimental-Add-Flutter-Fragment.md b/docs/unsorted_wiki/Experimental-Add-Flutter-Fragment.md deleted file mode 100644 index 90a3e54099c13..0000000000000 --- a/docs/unsorted_wiki/Experimental-Add-Flutter-Fragment.md +++ /dev/null @@ -1 +0,0 @@ -See [Add a Flutter Fragment to an Android App](https://www.google.com/url?q=https://docs.flutter.dev/add-to-app/android/add-flutter-fragment&sa=D&source=editors&ust=1715879907376746&usg=AOvVaw3G6E8LxUnKldq2WVx0CsZW) \ No newline at end of file diff --git a/docs/unsorted_wiki/Experimental-Create-Flutter-Plugin.md b/docs/unsorted_wiki/Experimental-Create-Flutter-Plugin.md deleted file mode 100644 index 7fccfb7e72e6a..0000000000000 --- a/docs/unsorted_wiki/Experimental-Create-Flutter-Plugin.md +++ /dev/null @@ -1 +0,0 @@ -See https://docs.flutter.dev/development/platform-integration/android/plugin-api-migration for the final version of this document. \ No newline at end of file diff --git a/docs/unsorted_wiki/Flutter-CLI-crash-reporting.md b/docs/unsorted_wiki/Flutter-CLI-crash-reporting.md deleted file mode 100644 index 99a501505ebde..0000000000000 --- a/docs/unsorted_wiki/Flutter-CLI-crash-reporting.md +++ /dev/null @@ -1 +0,0 @@ -See [Flutter Crash Reporting](https://www.google.com/url?q=https://docs.flutter.dev/reference/crash-reporting&sa=D&source=editors&ust=1715879907377300&usg=AOvVaw00lY-HSrn9NegCyjA5TTiG) \ No newline at end of file diff --git a/docs/unsorted_wiki/Game-development-with-Flutter.md b/docs/unsorted_wiki/Game-development-with-Flutter.md deleted file mode 100644 index 4e041f2d933ae..0000000000000 --- a/docs/unsorted_wiki/Game-development-with-Flutter.md +++ /dev/null @@ -1,37 +0,0 @@ -A loose catalog of resources for casual game development with Flutter. - -## Game engines and tools - -- [Flame Engine (2D game engine)](https://flame-engine.org/) -- [Bonfire (RPG games)](https://pub.dev/packages/bonfire) -- [SpriteWidget](https://github.com/spritewidget/spritewidget) -- [Flutter Processing](https://github.com/matthew-carroll/flutter_processing) -- [Rive (animation designer)](https://rive.app/) -- [StageXl (Dart+Web, but not Flutter)](http://www.stagexl.org/) - -## Games built with Flutter / developer experiences -- [4 Pics 1 Word](https://play.google.com/store/apps/details?id=de.lotum.whatsinthefoto.us) -- [Tomb Toad](http://www.missionctrlgames.com/) | [tweet](https://twitter.com/missionctrlgame/status/1329149448971280385) -- [Flame Game Jam entries](https://itch.io/jam/1st-flame-game-jam/entries) -- [A list of Flutter games built on top of Flame](https://flame-engine-store.web.app/#/) -- [Porting an iOS game to Flutter](https://twitter.com/drcoderz/status/1458449373424062474) -- [Space Empire](https://github.com/SatyamX64/space_empires) -- [Sunnyplace](https://play.google.com/store/apps/details?id=br.com.sunnyplace) -- [Tap Hero](https://github.com/mkiisoft/taphero) -- [Pop, Pop, Win!](https://dart-lang.github.io/sample-pop_pop_win/) (Mine Sweeper w/ balloons and darts) – OG Dart+Web game w/ StageXL (not Flutter) -- [Flutter Slide Puzzle](https://flutter.github.io/samples/web/slide_puzzle/) - Created for original Flutter web launch -- [Community-submitted games](https://flutterawesome.com/tag/games/) -- [Flutter Backgammon](https://github.com/csells/fibscli) - -## Tutorials -- [Building a snake game with Flutter](https://www.raywenderlich.com/19430602-how-to-create-a-2d-snake-game-in-flutter) -- [Flappy Bird with Flutter Processing](https://www.youtube.com/watch?v=l2LO_pBEP5Y) -- [Create a game with Flame Engine](https://blog.devowl.de/flutter-flame-step-1-create-your-game-b3b6ee387d77) -- [Flutter games from scratch](https://www.youtube.com/playlist?list=PLlvRDpXh1Se6kipeBLiF1xByAEmxYie6J) - -## Communities -- [FlameCon](https://www.meetup.com/FlameCon/) - -## Other useful resources -- [Monetization](https://flutter.dev/ads) -- [Firebase (auth, storage, hosting, testing, analytics, cloud functions)](https://firebase.flutter.dev/docs/overview) \ No newline at end of file diff --git a/docs/unsorted_wiki/Home.md b/docs/unsorted_wiki/Home.md deleted file mode 100644 index 9e0c85fa4d718..0000000000000 --- a/docs/unsorted_wiki/Home.md +++ /dev/null @@ -1,39 +0,0 @@ -This wiki is primarily aimed at engineers building or making contributions to Flutter. - -If you are new to Flutter, then you will find more general information on the Flutter project, including tutorials and samples, on our Web site at [flutter.dev](https://flutter.dev). For specific information about Flutter's APIs, consider our API reference which can be found at the [api.flutter.dev](https://api.flutter.dev/). - -If you want to know what we're likely to do in the future, our [[roadmap]] may be of interest. - -If you intend to contribute to Flutter, welcome! You are encouraged to start with [our contributor guide](https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md), which helps onboard new team members. It points to the most relevant pages on this wiki. You are also invited to join our [Discord](https://github.com/flutter/flutter/wiki/Chat) server. - -## Search - -[Search this wiki on Google](https://www.google.com/search?q=site%3Ahttps%3A%2F%2Fgithub.com%2Fflutter%2Fflutter%2Fwiki%2F). - -## Index of notable sections - -* [Actionable bugs](https://github.com/flutter/flutter/wiki/Triage#what-makes-an-issue-actionable), and the closing of unactionable bugs -* [Breaking changes](https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes) -* [Cherrypick process](https://github.com/flutter/flutter/wiki/Flutter-Cherrypick-Process) -* [Closing issues](https://github.com/flutter/flutter/wiki/Issue-hygiene#closing-issues) -* [[Dashboards]] -* [Debugging a broken engine autoroll](https://github.com/flutter/flutter/wiki/Debugging-the-engine#bisecting-a-roll-failure) -* [Deprecations](https://github.com/flutter/flutter/wiki/Tree-hygiene#deprecations) -* [[Design documents]] -* [Discord](https://github.com/flutter/flutter/wiki/Chat) -* [Engineering Philosophy](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#philosophy) -* [Flaky tests](https://github.com/flutter/flutter/wiki/Issue-hygiene#flaky-tests) -* [[flutter.dev is down|In case of emergency]] -* [Issue prioritization](https://github.com/flutter/flutter/wiki/Issue-hygiene#priorities) -* [Labels](https://github.com/flutter/flutter/wiki/Issue-hygiene#labels) -* [Milestones](https://github.com/flutter/flutter/wiki/Issue-hygiene#milestones) -* [Plugin compatibility policy](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#plugin-compatibility) -* [Reviewing code](https://github.com/flutter/flutter/wiki/Tree-hygiene#how-to-review-code) -* [RFC process](https://github.com/flutter/flutter/wiki/Issue-hygiene#how-to-propose-a-specific-change) -* [Status of popular issues](https://github.com/flutter/flutter/wiki/Popular-issues) -* [Submitting code, process for](https://github.com/flutter/flutter/wiki/Tree-hygiene#overview) -* [Support levels, definitions of](https://github.com/flutter/flutter/wiki/Values#support) -* [Symbolicating stack traces](https://github.com/flutter/flutter/wiki/Crashes) -* [Threading in the Engine](https://github.com/flutter/flutter/wiki/The-Engine-architecture#threading) -* [When will my bug be fixed?](https://github.com/flutter/flutter/wiki/Issue-hygiene#when-will-my-bug-be-fixed) -* [Security best practices](https://github.com/flutter/flutter/wiki/security#Best-practices) \ No newline at end of file diff --git a/docs/unsorted_wiki/Issue-triage-reports.md b/docs/unsorted_wiki/Issue-triage-reports.md deleted file mode 100644 index 421d9cca3df26..0000000000000 --- a/docs/unsorted_wiki/Issue-triage-reports.md +++ /dev/null @@ -1,8 +0,0 @@ -This page contains weekly issue triage reports from the Nevercode front-line triage team. - -- [2024 reports](https://github.com/flutter/flutter/wiki/2024-Issue-Triage-Reports) -- [2023 reports](https://github.com/flutter/flutter/wiki/2023-Issue-Triage-Reports) -- [2022 reports](https://github.com/flutter/flutter/wiki/2022---Issue-Triage-Reports) -- [2021 reports](https://github.com/flutter/flutter/wiki/2021---Issue-Triage-Reports) - -_See also: [[Triage]]_ \ No newline at end of file diff --git a/docs/unsorted_wiki/Obfuscating-Dart-Code.md b/docs/unsorted_wiki/Obfuscating-Dart-Code.md deleted file mode 100644 index 165cb03c3baa3..0000000000000 --- a/docs/unsorted_wiki/Obfuscating-Dart-Code.md +++ /dev/null @@ -1,40 +0,0 @@ -Code obfuscation hides function and class names in your compiled Dart code, making it difficult for an attacker to reverse engineer your proprietary app. This can be enabled with the `--obfuscate` option, which is required to be paired with `--split-debug-info` to generate a symbol map. - - -As of flutter 1.16.2, the information below is out of date. Only use this if you're on an earlier version of Flutter. If you are using Flutter 1.16.2 or later, please refer to [Obfuscating Dart code](https://flutter.dev/docs/deployment/obfuscate) on flutter.dev. - -## Android - -Add the following line to `/android/gradle.properties`: - -``` -extra-gen-snapshot-options=--obfuscate -``` -For information on obfuscating the Android host, see [Enabling Proguard](https://flutter.dev/android-release/#enabling-proguard) in [Preparing an Android App for Release](https://flutter.dev/android-release/#minify-and-obfuscate). - -## iOS - -### Step 1 - Modify the "build aot" call - -Add the following flag to the `build aot` call in the `/packages/flutter_tools/bin/xcode_backend.sh` file: - -``` -${extra_gen_snapshot_options_or_none} -``` - -Define this flag as follows: - -``` -local extra_gen_snapshot_options_or_none="" -if [[ -n "$EXTRA_GEN_SNAPSHOT_OPTIONS" ]]; then - extra_gen_snapshot_options_or_none="--extra-gen-snapshot-options=$EXTRA_GEN_SNAPSHOT_OPTIONS" -fi -``` - -### Step 2 - Modify the release config - -In `/ios/Flutter/Release.xcconfig`, add the following line: - -``` -EXTRA_GEN_SNAPSHOT_OPTIONS=--obfuscate -``` diff --git a/docs/unsorted_wiki/Reduce-shader-compilation-jank-using-SkSL-warm-up.md b/docs/unsorted_wiki/Reduce-shader-compilation-jank-using-SkSL-warm-up.md deleted file mode 100644 index 3f000c73713cf..0000000000000 --- a/docs/unsorted_wiki/Reduce-shader-compilation-jank-using-SkSL-warm-up.md +++ /dev/null @@ -1 +0,0 @@ -This page has moved to [Reduce shader compilation jank](https://flutter.dev/docs/perf/rendering/shader) on flutter.dev. \ No newline at end of file diff --git a/docs/unsorted_wiki/User-documentation-index.md b/docs/unsorted_wiki/User-documentation-index.md deleted file mode 100644 index d1c5c041398a9..0000000000000 --- a/docs/unsorted_wiki/User-documentation-index.md +++ /dev/null @@ -1,88 +0,0 @@ - - - -Flutter's user-facing documentation should all be on the Flutter web site and the API documentation site: - -- https://docs.flutter.dev/ - - [Release notes](https://flutter.dev/docs/development/tools/sdk/release-notes) -- https://api.flutter.dev/ - -Historically, experimental documentation was sometimes first written on this wiki and later moved to the web site. This is -now discouraged but some of the content created in this way still exists and is listed below. - -_Contributors: please consider moving this content to the web site or deleting it if it is no longer applicable!_ - -## Old documentation - -## General - - -- [Apple Silicon support](https://github.com/flutter/flutter/wiki/Developing-with-Flutter-on-Apple-Silicon) -- [[Bad Builds]] -- [[Binding to native code via FFI]] (moved to website) -- [[Code generation in Flutter]] -- [[Codelabs]] -- [[Data-driven Fixes]] -- [[Desktop shells]] -- [[Deferred Components]] -- [[Flutter CLI crash reporting]] -- [Flutter CLI custom embedder support](https://github.com/flutter/flutter/wiki/Using-custom-embedders-with-the-Flutter-CLI) -- [[Flutter Test Fonts]] -- [[Game development with Flutter]] -- [[Hybrid Composition]] -- [[IntelliJ - Flutter Setup Tips and Tricks]] -- [JIT release builds](https://github.com/flutter/flutter/wiki/JIT-Release-Modes) -- [[Making animated GIFs of Flutter apps]] -- [[Multi-device debugging in VS Code]] -- [Null safety package migration status](https://github.com/dart-lang/sdk/wiki/Null-safety-migration-status) -- [[Obfuscating Dart Code]] -- [[Reduce shader compilation jank using SkSL warm up]] (moved to website) -- [[Upgrading Flutter projects from using PlatformMessages to using channels]] -- [[Writing Effective Tests]] - -### Android - -- [Android Fast Start](https://github.com/flutter/flutter/wiki/Fast-Start) -- [[Android Platform Views]] -- [[Experimental: Add Flutter Activity]] (moved to website) -- [[Experimental: Add Flutter Fragment]] -- [[Experimental: Add Flutter Fragment ViewPager]] -- [[Experimental: Add Flutter View]] -- [[Experimental: Create Flutter Plugin]] (moved to website) -- [[Experimental: Launch Flutter with non main entrypoint]] -- [[Experimental: Reuse FlutterEngine across screens]] -- [[Experimental: Use old plugins with new embedding]] -- [[How Flutter apps are compiled with Gradle for Android]] -- [[Hybrid Composition|Hybrid Composition#Android]] -- [Multidex](https://github.com/flutter/flutter/wiki/Android-Multidex-support) -- [[Texture Layer Hybrid Composition]] -- [[Upgrading Flutter projects to build with gradle]] -- [[Upgrading Flutter projects to Gradle 4.1 and Android Studio Gradle plugin 3.0.1]] -- [[Upgrading pre 1.12 Android projects]] - -### iOS - -- [[Creating an iOS Bitcode enabled app]] -- [[Hybrid Composition|Hybrid Composition#iOS]] -- [[Hybrid Composition iOS]] -- [[PID leak in iOS development workflow]] -- [[State of Catalina Support]] in Flutter 1.9. -- [[Upgrading Flutter added to existing iOS Xcode project]] - -### Web - -- [[Debugging issues on the Web]] -- [[Running Flutter Driver tests with Web]] -- [[Upgrading from package:flutter_web to the Flutter SDK]] - -### Release notes - -- [[Hotfixes to the Stable Channel]] -- [[Release Notes - Changes in 1.2.1]] -- [[Release Notes - Flutter 1.2.1]] -- [[Commits Between 1.2.1 and 1.5.4]] -- [[Release Notes Flutter 1.5.4]] -- [[PRs addressed between 1.5.4 and 1.7.8]] -- [[Release Notes Flutter 1.7.8]] -- [[PRs merged between 1.7.8 and 1.9.1]] -- [[Release Notes Flutter 1.9.1]] diff --git a/docs/unsorted_wiki/Experimental-Add-Flutter-Fragment-ViewPager.md b/docs/wiki_archive/Experimental-Add-Flutter-Fragment-ViewPager.md similarity index 94% rename from docs/unsorted_wiki/Experimental-Add-Flutter-Fragment-ViewPager.md rename to docs/wiki_archive/Experimental-Add-Flutter-Fragment-ViewPager.md index 944418cdb0a10..d08d93afa48af 100644 --- a/docs/unsorted_wiki/Experimental-Add-Flutter-Fragment-ViewPager.md +++ b/docs/wiki_archive/Experimental-Add-Flutter-Fragment-ViewPager.md @@ -40,4 +40,4 @@ Next, alter your `FragmentPagerAdapter` to return a `FlutterFragment` for the de You should now have a Flutter UI as one or more pages within your tabbed navigation. -You may notice a delay between creation of your `FlutterFragment` and the display of your Flutter UI. This delay is caused by the warm-up time for the `FlutterEngine`. This warm-up issue a standard concern that applies to all uses of Flutter, including `FlutterActivity`. The way to minimize this visual delay is to use pre-warmed `FlutterEngine`s. Please see [the page about pre-warming FlutterEngines](https://github.com/flutter/flutter/wiki/Experimental:-Reuse-FlutterEngine-across-screens). \ No newline at end of file +You may notice a delay between creation of your `FlutterFragment` and the display of your Flutter UI. This delay is caused by the warm-up time for the `FlutterEngine`. This warm-up issue a standard concern that applies to all uses of Flutter, including `FlutterActivity`. The way to minimize this visual delay is to use pre-warmed `FlutterEngine`s. Please see [the page about pre-warming FlutterEngines](Experimental-Reuse-FlutterEngine-across-screens.md). \ No newline at end of file diff --git a/docs/unsorted_wiki/Experimental-Add-Flutter-View.md b/docs/wiki_archive/Experimental-Add-Flutter-View.md similarity index 82% rename from docs/unsorted_wiki/Experimental-Add-Flutter-View.md rename to docs/wiki_archive/Experimental-Add-Flutter-View.md index 486a315f44ed1..007704adcce02 100644 --- a/docs/unsorted_wiki/Experimental-Add-Flutter-View.md +++ b/docs/wiki_archive/Experimental-Add-Flutter-View.md @@ -4,10 +4,9 @@ _**Everything in this doc and linked from this doc is experimental. These detail Flutter can be added to an Android app as a single `View` in an `Activity`'s `View` hierarchy. -Before adding Flutter as a single `View`, you should consider if it is possible to add Flutter as a `Fragment` or an `Activity` to reduce your development burden. +Before adding Flutter as a single `View`, you should consider if it is possible to add Flutter as a `Fragment` to reduce your development burden. -* [How to use a `FlutterActivity`](https://github.com/flutter/flutter/wiki/Experimental:-Add-Flutter-Activity) -* [How to use a `FlutterFragment`](https://github.com/flutter/flutter/wiki/Experimental:-Add-Flutter-Fragment) +* [How to use a `FlutterFragment`](Experimental-Add-Flutter-Fragment-ViewPager.md) If you really need to add Flutter as a single `View` then do the following. @@ -15,7 +14,7 @@ If you really need to add Flutter as a single `View` then do the following. ### Create and start a FlutterEngine -Create and start a `FlutterEngine` by following the appropriate instructions. See the [FlutterEngine page](https://github.com/flutter/flutter/wiki/Experimental:-Reuse-FlutterEngine-across-screens) +Create and start a `FlutterEngine` by following the appropriate instructions. See the [FlutterEngine page](Experimental-Reuse-FlutterEngine-across-screens.md) ### Create a FlutterView and add to layout diff --git a/docs/unsorted_wiki/Experimental-Launch-Flutter-with-non-main-entrypoint.md b/docs/wiki_archive/Experimental-Launch-Flutter-with-non-main-entrypoint.md similarity index 100% rename from docs/unsorted_wiki/Experimental-Launch-Flutter-with-non-main-entrypoint.md rename to docs/wiki_archive/Experimental-Launch-Flutter-with-non-main-entrypoint.md diff --git a/docs/unsorted_wiki/Experimental-Reuse-FlutterEngine-across-screens.md b/docs/wiki_archive/Experimental-Reuse-FlutterEngine-across-screens.md similarity index 92% rename from docs/unsorted_wiki/Experimental-Reuse-FlutterEngine-across-screens.md rename to docs/wiki_archive/Experimental-Reuse-FlutterEngine-across-screens.md index 60e2fc6428e2a..4cc4963cbf9a5 100644 --- a/docs/unsorted_wiki/Experimental-Reuse-FlutterEngine-across-screens.md +++ b/docs/wiki_archive/Experimental-Reuse-FlutterEngine-across-screens.md @@ -32,14 +32,6 @@ engine.getDartExecutor().executeDartEntrypoint(entrypoint); To cache one or more `FlutterEngine`s, store the initialized `FlutterEngine`s in a central place that you can access from your desired `Activity`s and `Fragment`s. You could choose to store these `FlutterEngine`s in your `Application` subclass, or you could store them in a statically accessible location of your choice. This choice is up to you, and should consider your specific application architecture and development practices. -## Using a cached FlutterEngine in a FlutterActivity - -See the [FlutterActivity page](https://github.com/flutter/flutter/wiki/Experimental:-Add-Flutter-Activity#using-a-cached-flutterengine) - -## Using a cached FlutterEngine in a FlutterFragment - -See the [FlutterFragment page](https://github.com/flutter/flutter/wiki/Experimental:-Add-Flutter-Activity#using-a-cached-flutterengine) - ## Dart entrypoint restrictions A `FlutterEngine` can only execute a Dart entrypoint one time. Once a `FlutterEngine` has started executing Dart code, it will continue to execute that Dart code until the `FlutterEngine` is disposed. To re-use a `FlutterEngine` that needs to display different experiences at different times you will need to find an approach that accomplishes your goals without restarting Dart execution. Below are a couple options. diff --git a/docs/unsorted_wiki/Experimental-Use-old-plugins-with-new-embedding.md b/docs/wiki_archive/Experimental-Use-old-plugins-with-new-embedding.md similarity index 100% rename from docs/unsorted_wiki/Experimental-Use-old-plugins-with-new-embedding.md rename to docs/wiki_archive/Experimental-Use-old-plugins-with-new-embedding.md diff --git a/docs/unsorted_wiki/Flutter-migrate.md b/docs/wiki_archive/Flutter-migrate.md similarity index 100% rename from docs/unsorted_wiki/Flutter-migrate.md rename to docs/wiki_archive/Flutter-migrate.md diff --git a/docs/unsorted_wiki/IntelliJ---Flutter-Setup-Tips-and-Tricks.md b/docs/wiki_archive/IntelliJ---Flutter-Setup-Tips-and-Tricks.md similarity index 100% rename from docs/unsorted_wiki/IntelliJ---Flutter-Setup-Tips-and-Tricks.md rename to docs/wiki_archive/IntelliJ---Flutter-Setup-Tips-and-Tricks.md diff --git a/docs/unsorted_wiki/Manual-Engine-Roll-with-Breaking-Commits.md b/docs/wiki_archive/Manual-Engine-Roll-with-Breaking-Commits.md similarity index 100% rename from docs/unsorted_wiki/Manual-Engine-Roll-with-Breaking-Commits.md rename to docs/wiki_archive/Manual-Engine-Roll-with-Breaking-Commits.md diff --git a/docs/unsorted_wiki/Multi-device-debugging-in-VS-Code.md b/docs/wiki_archive/Multi-device-debugging-in-VS-Code.md similarity index 100% rename from docs/unsorted_wiki/Multi-device-debugging-in-VS-Code.md rename to docs/wiki_archive/Multi-device-debugging-in-VS-Code.md diff --git a/docs/unsorted_wiki/2021---Issue-Triage-Reports.md b/docs/wiki_archive/Nevercode [TBD]/2021---Issue-Triage-Reports.md similarity index 100% rename from docs/unsorted_wiki/2021---Issue-Triage-Reports.md rename to docs/wiki_archive/Nevercode [TBD]/2021---Issue-Triage-Reports.md diff --git a/docs/unsorted_wiki/2022---Issue-Triage-Reports.md b/docs/wiki_archive/Nevercode [TBD]/2022---Issue-Triage-Reports.md similarity index 100% rename from docs/unsorted_wiki/2022---Issue-Triage-Reports.md rename to docs/wiki_archive/Nevercode [TBD]/2022---Issue-Triage-Reports.md diff --git a/docs/unsorted_wiki/2023-Issue-Triage-Reports.md b/docs/wiki_archive/Nevercode [TBD]/2023-Issue-Triage-Reports.md similarity index 100% rename from docs/unsorted_wiki/2023-Issue-Triage-Reports.md rename to docs/wiki_archive/Nevercode [TBD]/2023-Issue-Triage-Reports.md diff --git a/docs/unsorted_wiki/2024-Issue-Triage-Reports.md b/docs/wiki_archive/Nevercode [TBD]/2024-Issue-Triage-Reports.md similarity index 100% rename from docs/unsorted_wiki/2024-Issue-Triage-Reports.md rename to docs/wiki_archive/Nevercode [TBD]/2024-Issue-Triage-Reports.md diff --git a/docs/wiki_archive/Nevercode [TBD]/Issue-triage-reports.md b/docs/wiki_archive/Nevercode [TBD]/Issue-triage-reports.md new file mode 100644 index 0000000000000..76b2f770e4186 --- /dev/null +++ b/docs/wiki_archive/Nevercode [TBD]/Issue-triage-reports.md @@ -0,0 +1,8 @@ +This page contains weekly issue triage reports from the Nevercode front-line triage team. + +- [2024 reports](2024-Issue-Triage-Reports.md) +- [2023 reports](2023-Issue-Triage-Reports.md) +- [2022 reports](2022---Issue-Triage-Reports.md) +- [2021 reports](2021---Issue-Triage-Reports.md) + +_See also: [Triage](../../triage/README.md)_ \ No newline at end of file diff --git a/docs/unsorted_wiki/Upgrading-Flutter-projects-from-using-PlatformMessages-to-using-channels.md b/docs/wiki_archive/Upgrading-Flutter-projects-from-using-PlatformMessages-to-using-channels.md similarity index 90% rename from docs/unsorted_wiki/Upgrading-Flutter-projects-from-using-PlatformMessages-to-using-channels.md rename to docs/wiki_archive/Upgrading-Flutter-projects-from-using-PlatformMessages-to-using-channels.md index df9eba3b97406..9338e18833ede 100644 --- a/docs/unsorted_wiki/Upgrading-Flutter-projects-from-using-PlatformMessages-to-using-channels.md +++ b/docs/wiki_archive/Upgrading-Flutter-projects-from-using-PlatformMessages-to-using-channels.md @@ -114,7 +114,7 @@ with code like this throw new PlatformException(errorCode, anErrorMessage, someDetails); }); -See [platform_channel](https://github.com/flutter/flutter/blob/master/examples/platform_channel/lib/main.dart) for an example. +See [platform_channel](../../examples/platform_channel/lib/main.dart) for an example. ## Android side @@ -134,7 +134,7 @@ Similar to Flutter side, using `FlutterMessageChannel` and `FlutterMethodChannel } }); -[API documentation](https://docs.flutter.io/javadoc/). See [platform_channel](https://github.com/flutter/flutter/blob/master/examples/platform_channel/android/app/src/main/java/com/example/platformchannel/MainActivity.java) for another example. +[API documentation](https://docs.flutter.io/javadoc/). See [platform_channel](../../examples/platform_channel/android/app/src/main/java/com/example/platformchannel/MainActivity.java) for another example. ## iOS side @@ -155,4 +155,4 @@ Similar to Flutter side, using `FlutterMessageChannel` and `FlutterMethodChannel }]; -[API documentation](https://github.com/flutter/engine/blob/master/shell/platform/darwin/ios/framework/Headers). See [platform_channel](https://github.com/flutter/flutter/blob/master/examples/platform_channel/ios/Runner/AppDelegate.m) for another example. \ No newline at end of file +[API documentation](https://github.com/flutter/engine/blob/main/shell/platform/darwin/ios/framework/Headers). See [platform_channel](../../examples/platform_channel/ios/Runner/AppDelegate.m) for another example. \ No newline at end of file diff --git a/docs/wiki_archive/User-documentation-index.md b/docs/wiki_archive/User-documentation-index.md new file mode 100644 index 0000000000000..73102aa82d24f --- /dev/null +++ b/docs/wiki_archive/User-documentation-index.md @@ -0,0 +1,57 @@ + + + +Flutter's user-facing documentation should all be on the Flutter web site and the API documentation site: + +- https://docs.flutter.dev/ + - [Release notes](https://flutter.dev/docs/development/tools/sdk/release-notes) +- https://api.flutter.dev/ + +Historically, experimental documentation was sometimes first written on this wiki and later moved to the web site. This is +now discouraged but some of the content created in this way still exists and is listed below. + +_Contributors: please consider moving this content to the web site or deleting it if it is no longer applicable!_ + +## Old documentation + +## General + + +- [Apple Silicon support](../platforms/desktop/macos/Developing-with-Flutter-on-Apple-Silicon.md) +- [Bad Builds](../releases/Bad-Builds.md) +- [Binding to native code via FFI](https://flutter.dev/docs/development/platform-integration/c-interop) +- [Data-driven Fixes](../contributing/Data-driven-Fixes.md) +- [Flutter CLI crash reporting](https://docs.flutter.dev/reference/crash-reporting) +- [Flutter CLI custom embedder support](../tool/Using-custom-embedders-with-the-Flutter-CLI.md) +- [Flutter Test Fonts](../contributing/testing/Flutter-Test-Fonts.md) +- [Hybrid Composition](../platforms/Hybrid-Composition.md) +- [IntelliJ - Flutter Setup Tips and Tricks](IntelliJ---Flutter-Setup-Tips-and-Tricks.md) +- [JIT release builds](../engine/JIT-Release-Modes.md) +- [Making animated GIFs of Flutter apps](../contributing/issue_hygiene/Making-animated-GIFs-of-Flutter-apps.md) +- [Multi-device debugging in VS Code](Multi-device-debugging-in-VS-Code.md) +- [Obfuscating Dart Code](https://flutter.dev/docs/deployment/obfuscate) +- [Reduce shader compilation jank using SkSL warm up](https://flutter.dev/docs/perf/rendering/shader) +- [Upgrading Flutter projects from using PlatformMessages to using channels](Upgrading-Flutter-projects-from-using-PlatformMessages-to-using-channels.md) +- [Writing Effective Tests](../contributing/testing/Writing-Effective-Tests.md) + +### Android + +- [Android Fast Start](../tool/Fast-Start.md) +- [Android Platform Views](../platforms/android/Android-Platform-Views.md) +- [How Flutter apps are compiled with Gradle for Android](../platforms/android/How-Flutter-apps-are-compiled-with-Gradle-for-Android.md) +- [Hybrid Composition](../platforms/Hybrid-Composition.md#android) +- [Multidex](../platforms/android/Android-Multidex-support.md) +- [Texture Layer Hybrid Composition](../platforms/android/Texture-Layer-Hybrid-Composition.md) + +### iOS + +- [Hybrid Composition iOS](../platforms/Hybrid-Composition.md#ios) + +### Web + +- [Debugging issues on the Web](../platforms/web/Debugging-issues-on-the-Web.md) +- [Running Flutter Driver tests with Web](../contributing/testing/Running-Flutter-Driver-tests-with-Web.md) + +### Release notes + +- [Hotfixes to the Stable Channel](../releases/Hotfixes-to-the-Stable-Channel.md) diff --git a/docs/unsorted_wiki/Workarounds-for-common-issues.asciidoc b/docs/wiki_archive/Workarounds-for-common-issues.md similarity index 91% rename from docs/unsorted_wiki/Workarounds-for-common-issues.asciidoc rename to docs/wiki_archive/Workarounds-for-common-issues.md index 1dbad12332ca5..c09e4d965d109 100644 --- a/docs/unsorted_wiki/Workarounds-for-common-issues.asciidoc +++ b/docs/wiki_archive/Workarounds-for-common-issues.md @@ -1,23 +1,5 @@ -//// -Enable icons for admonitions -From https://gist.github.com/dcode/0cfbf2699a1fe9b46ff04c41721dda74#admonitions -//// -ifdef::env-github[] -:tip-caption: :bulb: -:note-caption: :information_source: -:important-caption: :heavy_exclamation_mark: -:caution-caption: :fire: -:warning-caption: :warning: -endif::[] - - -:toc: -:toc-placement!: - Common issues Flutter developers might run into and recipes how to fix or work around. -toc::[] - = Flutter Recipes == Flutter installation @@ -134,10 +116,6 @@ In a network where the Internet can only be reached through a proxy and Flutter Proxy setting incomplete or invalid. -==== Ways to fix - -- See https://github.com/flutter/flutter/wiki/Using-Flutter-in-China - ==== Related information (none yet) diff --git a/examples/api/lib/material/snack_bar/snack_bar.2.dart b/examples/api/lib/material/snack_bar/snack_bar.2.dart index 3ad1d7f63ced6..ac62d319e9b8d 100644 --- a/examples/api/lib/material/snack_bar/snack_bar.2.dart +++ b/examples/api/lib/material/snack_bar/snack_bar.2.dart @@ -17,12 +17,7 @@ class SnackBarExampleApp extends StatelessWidget { Widget build(BuildContext context) { return MaterialApp( theme: ThemeData(useMaterial3: true), - home: Scaffold( - appBar: AppBar(title: const Text('SnackBar Sample')), - body: const Center( - child: SnackBarExample(), - ), - ), + home: const SnackBarExample(), ); } } @@ -42,24 +37,25 @@ class _SnackBarExampleState extends State { bool _longActionLabel = false; double _sliderValue = 0.25; - Padding _padRow(List children) => Padding( - padding: const EdgeInsets.all(8.0), - child: Row(children: children), - ); - @override Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.only(left: 50.0), - child: Column( + return Scaffold( + appBar: AppBar(title: const Text('SnackBar Sample')), + floatingActionButton: FloatingActionButton.extended( + onPressed: () { + ScaffoldMessenger.of(context).showSnackBar(_snackBar()); + }, + icon: const Icon(Icons.play_arrow), + label: const Text('Show Snackbar'), + ), + body: ListView( children: [ - _padRow([ - Text('Snack Bar configuration', style: Theme.of(context).textTheme.bodyLarge), - ]), - _padRow( - [ - const Text('Fixed'), - Radio( + ExpansionTile( + title: const Text('Behavior'), + initiallyExpanded: true, + children: [ + RadioListTile( + title: const Text('Fixed'), value: SnackBarBehavior.fixed, groupValue: _snackBarBehavior, onChanged: (SnackBarBehavior? value) { @@ -68,8 +64,8 @@ class _SnackBarExampleState extends State { }); }, ), - const Text('Floating'), - Radio( + RadioListTile( + title: const Text('Floating'), value: SnackBarBehavior.floating, groupValue: _snackBarBehavior, onChanged: (SnackBarBehavior? value) { @@ -80,75 +76,65 @@ class _SnackBarExampleState extends State { ), ], ), - _padRow( - [ - const Text('Include Icon '), - Switch( + ExpansionTile( + title: const Text('Content'), + initiallyExpanded: true, + children: [ + SwitchListTile( + title: const Text('Include close Icon'), value: _withIcon, onChanged: (bool value) { setState(() { - _withIcon = !_withIcon; + _withIcon = value; }); }, ), - ], - ), - _padRow( - [ - const Text('Include Action '), - Switch( + SwitchListTile( + title: const Text('Multi Line Text'), + value: _multiLine, + onChanged: (bool value) { + setState(() { + _multiLine = value; + }); + }, + ), + SwitchListTile( + title: const Text('Include Action'), value: _withAction, onChanged: (bool value) { setState(() { - _withAction = !_withAction; + _withAction = value; }); }, ), - const SizedBox(width: 16.0), - const Text('Long Action Label '), - Switch( + SwitchListTile( + title: const Text('Long Action Label'), value: _longActionLabel, onChanged: !_withAction ? null - : (bool value) { - setState(() { - _longActionLabel = !_longActionLabel; - }); - }, + : (bool value) => setState(() { + _longActionLabel = value; + }), ), ], + ), - _padRow( - [ - const Text('Multi Line Text'), - Switch( - value: _multiLine, - onChanged: switch (_snackBarBehavior) { - SnackBarBehavior.fixed || null => null, - SnackBarBehavior.floating => (bool value) => setState(() { _multiLine = !_multiLine; }), - }, + ExpansionTile( + title: const Text('Action new-line overflow threshold'), + initiallyExpanded: true, + children: [ + Slider( + value: _sliderValue, + divisions: 20, + label: _sliderValue.toStringAsFixed(2), + onChanged: (double value) => setState(() { + _sliderValue = value; + }), ), ], ), - _padRow([ - const Text('Action new-line overflow threshold'), - Slider( - value: _sliderValue, - divisions: 20, - label: _sliderValue.toStringAsFixed(2), - onChanged: switch (_snackBarBehavior) { - SnackBarBehavior.fixed || null => null, - SnackBarBehavior.floating => (double value) => setState(() { _sliderValue = value; }), - }, - ), - ]), - const SizedBox(height: 16.0), - ElevatedButton( - child: const Text('Show Snackbar'), - onPressed: () { - ScaffoldMessenger.of(context).showSnackBar(_snackBar()); - }, - ), + // Avoid hiding content behind the floating action button + const SizedBox(height: 100,), ], ), ); @@ -163,9 +149,14 @@ class _SnackBarExampleState extends State { }, ) : null; - final double? width = _snackBarBehavior == SnackBarBehavior.floating && _multiLine ? 400.0 : null; - final String label = - _multiLine ? 'A Snack Bar with quite a lot of text which spans across multiple lines' : 'Single Line Snack Bar'; + final double? width = _snackBarBehavior == SnackBarBehavior.floating + ? 400.0 + : null; + final String label = _multiLine + ? 'A Snack Bar with quite a lot of text which spans across multiple ' + 'lines. You can look at how the Action Label moves around when trying ' + 'to layout this text.' + : 'Single Line Snack Bar'; return SnackBar( content: Text(label), showCloseIcon: _withIcon, diff --git a/examples/api/lib/widgets/animated_switcher/animated_switcher.0.dart b/examples/api/lib/widgets/animated_switcher/animated_switcher.0.dart index 14055674a74c7..8138ef10aac7e 100644 --- a/examples/api/lib/widgets/animated_switcher/animated_switcher.0.dart +++ b/examples/api/lib/widgets/animated_switcher/animated_switcher.0.dart @@ -23,7 +23,8 @@ class AnimatedSwitcherExample extends StatefulWidget { const AnimatedSwitcherExample({super.key}); @override - State createState() => _AnimatedSwitcherExampleState(); + State createState() => + _AnimatedSwitcherExampleState(); } class _AnimatedSwitcherExampleState extends State { diff --git a/examples/api/lib/widgets/restoration_properties/restorable_value.0.dart b/examples/api/lib/widgets/restoration_properties/restorable_value.0.dart index f16a6994f9281..3f7de573e77bf 100644 --- a/examples/api/lib/widgets/restoration_properties/restorable_value.0.dart +++ b/examples/api/lib/widgets/restoration_properties/restorable_value.0.dart @@ -13,14 +13,13 @@ class RestorableValueExampleApp extends StatelessWidget { @override Widget build(BuildContext context) { - return WidgetsApp( - title: 'RestorableValue Sample', - color: const Color(0xffffffff), - builder: (BuildContext context, Widget? child) { - return const Center( - child: RestorableValueExample(restorationId: 'main'), - ); - }, + return MaterialApp( + home: Scaffold( + appBar: AppBar( + title: const Text('RestorableValue Sample'), + ), + body: const RestorableValueExample(restorationId: 'main'), + ), ); } } @@ -72,9 +71,11 @@ class _RestorableValueExampleState extends State with Re @override Widget build(BuildContext context) { - return OutlinedButton( - onPressed: _incrementAnswer, - child: Text('${_answer.value}'), + return Center( + child: OutlinedButton( + onPressed: _incrementAnswer, + child: Text('${_answer.value}'), + ), ); } } diff --git a/examples/api/lib/widgets/sliver/decorated_sliver.0.dart b/examples/api/lib/widgets/sliver/decorated_sliver.0.dart index 5ccd9b93cfb05..74489c76c5d24 100644 --- a/examples/api/lib/widgets/sliver/decorated_sliver.0.dart +++ b/examples/api/lib/widgets/sliver/decorated_sliver.0.dart @@ -12,6 +12,14 @@ class SliverDecorationExampleApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( + theme: ThemeData( + textTheme: const TextTheme( + titleLarge: TextStyle( + fontSize: 24, + color: Colors.white30, + ), + ), + ), home: Scaffold( appBar: AppBar(title: const Text('SliverDecoration Sample')), body: const SliverDecorationExample(), @@ -28,6 +36,7 @@ class SliverDecorationExample extends StatelessWidget { return CustomScrollView( slivers: [ DecoratedSliver( + key: const ValueKey('radial-gradient'), decoration: const BoxDecoration( gradient: RadialGradient( center: Alignment(-0.5, -0.6), @@ -36,21 +45,60 @@ class SliverDecorationExample extends StatelessWidget { Color(0xFFEEEEEE), Color(0xFF111133), ], - stops: [0.9, 1.0], + stops: [0.4, 0.8], ), ), sliver: SliverList( - delegate: SliverChildListDelegate([ - const Text('Goodnight Moon'), - ]), + delegate: SliverChildListDelegate( + [ + SizedBox( + height: 200.0, + child: Center( + child: Text( + 'A moon on a night sky', + style: Theme.of(context).textTheme.titleLarge, + ), + ), + ), + ], + ), ), ), - const DecoratedSliver( - decoration: BoxDecoration( - color: Colors.amber, - borderRadius: BorderRadius.all(Radius.circular(50)) + DecoratedSliver( + key: const ValueKey('linear-gradient'), + decoration: const BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [ + Color(0xFF111133), + Color(0xFF1A237E), + Color(0xFF283593), + Color(0xFF3949AB), + Color(0xFF3F51B5), + Color(0xFF1976D2), + Color(0xFF1E88E5), + Color(0xFF42A5F5), + ], + ), + ), + sliver: SliverList( + delegate: SliverChildListDelegate( + [ + SizedBox( + height: 500.0, + child: Container( + alignment: Alignment.topCenter, + padding: const EdgeInsets.only(top: 56.0), + child: Text( + 'A blue sky', + style: Theme.of(context).textTheme.titleLarge, + ), + ), + ), + ], + ), ), - sliver: SliverToBoxAdapter(child: SizedBox(height: 300)), ), ], ); diff --git a/examples/api/lib/widgets/transitions/align_transition.0.dart b/examples/api/lib/widgets/transitions/align_transition.0.dart index fa7118c82a7ea..8f0dbb89ba3b0 100644 --- a/examples/api/lib/widgets/transitions/align_transition.0.dart +++ b/examples/api/lib/widgets/transitions/align_transition.0.dart @@ -58,7 +58,7 @@ class _AlignTransitionExampleState extends State with Ti child: AlignTransition( alignment: _animation, child: const Padding( - padding: EdgeInsets.all(8), + padding: EdgeInsets.all(8.0), child: FlutterLogo(size: 150.0), ), ), diff --git a/examples/api/pubspec.yaml b/examples/api/pubspec.yaml index f69da2515bdbf..1f2c5bffec36b 100644 --- a/examples/api/pubspec.yaml +++ b/examples/api/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -36,8 +36,8 @@ dev_dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -93,4 +93,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: d547 +# PUBSPEC CHECKSUM: 934a diff --git a/examples/api/test/material/banner/material_banner.0_test.dart b/examples/api/test/material/banner/material_banner.0_test.dart index 7080e7d91f667..68b14c62489ed 100644 --- a/examples/api/test/material/banner/material_banner.0_test.dart +++ b/examples/api/test/material/banner/material_banner.0_test.dart @@ -7,6 +7,21 @@ import 'package:flutter_api_samples/material/banner/material_banner.0.dart' as e import 'package:flutter_test/flutter_test.dart'; void main() { + testWidgets('Shows all elements', (WidgetTester tester) async { + await tester.pumpWidget( + const example.MaterialBannerExampleApp(), + ); + + expect(find.byType(MaterialBanner), findsOneWidget); + expect(find.byType(AppBar), findsOneWidget); + expect(find.byType(TextButton), findsNWidgets(2)); + expect(find.text('Hello, I am a Material Banner'), findsOneWidget); + expect(find.text('The MaterialBanner is below'), findsOneWidget); + expect(find.text('OPEN'), findsOneWidget); + expect(find.text('DISMISS'), findsOneWidget); + expect(find.byIcon(Icons.agriculture_outlined), findsOneWidget); + }); + testWidgets('BottomNavigationBar Updates Screen Content', (WidgetTester tester) async { await tester.pumpWidget( const example.MaterialBannerExampleApp(), @@ -18,4 +33,16 @@ void main() { expect(find.widgetWithText(TextButton, 'OPEN'), findsOne); expect(find.widgetWithText(TextButton, 'DISMISS'), findsOne); }); + + testWidgets('The banner is below the text saying so', (WidgetTester tester) async { + await tester.pumpWidget( + const example.MaterialBannerExampleApp(), + ); + + expect(find.byType(MaterialBanner), findsOneWidget); + expect(find.text('The MaterialBanner is below'), findsOneWidget); + final double bannerY = tester.getCenter(find.byType(MaterialBanner)).dy; + final double textY = tester.getCenter(find.text('The MaterialBanner is below')).dy; + expect(bannerY, greaterThan(textY)); + }); } diff --git a/examples/api/test/material/banner/material_banner.1_test.dart b/examples/api/test/material/banner/material_banner.1_test.dart index c3d1e5b5ce00c..0d65238377327 100644 --- a/examples/api/test/material/banner/material_banner.1_test.dart +++ b/examples/api/test/material/banner/material_banner.1_test.dart @@ -3,10 +3,32 @@ // found in the LICENSE file. import 'package:flutter/material.dart'; -import 'package:flutter_api_samples/material/banner/material_banner.1.dart' as example; +import 'package:flutter_api_samples/material/banner/material_banner.1.dart' + as example; import 'package:flutter_test/flutter_test.dart'; void main() { + testWidgets('Shows all elements when needed', (WidgetTester tester) async { + await tester.pumpWidget(const example.MaterialBannerExampleApp()); + await tester.pumpAndSettle(); + expect(find.text('The MaterialBanner is below'), findsOneWidget); + expect(find.text('Show MaterialBanner'), findsOneWidget); + expect(find.byType(MaterialBanner), findsNothing); + expect(find.text('DISMISS'), findsNothing); + expect(find.byIcon(Icons.agriculture_outlined), findsNothing); + + await tester.tap(find.text('Show MaterialBanner')); + await tester.pumpAndSettle(); + expect(find.byType(MaterialBanner), findsOneWidget); + expect(find.text('DISMISS'), findsOneWidget); + expect(find.byIcon(Icons.agriculture_outlined), findsOneWidget); + + final MaterialBanner banner = tester.widget( + find.byType(MaterialBanner), + ); + expect(banner.backgroundColor, Colors.green); + }); + testWidgets('BottomNavigationBar Updates Screen Content', (WidgetTester tester) async { await tester.pumpWidget( const example.MaterialBannerExampleApp(), @@ -20,6 +42,17 @@ void main() { expect(find.text('Hello, I am a Material Banner'), findsOne); expect(find.byIcon(Icons.agriculture_outlined), findsOne); expect(find.widgetWithText(TextButton, 'DISMISS'), findsOne); + }); + + testWidgets('The banner is below the text saying so', (WidgetTester tester) async { + await tester.pumpWidget(const example.MaterialBannerExampleApp()); + await tester.tap(find.text('Show MaterialBanner')); + await tester.pumpAndSettle(); + expect(find.byType(MaterialBanner), findsOneWidget); + expect(find.text('The MaterialBanner is below'), findsOneWidget); + final double bannerY = tester.getCenter(find.byType(MaterialBanner)).dy; + final double textY = tester.getCenter(find.text('The MaterialBanner is below')).dy; + expect(bannerY, greaterThan(textY)); }); } diff --git a/examples/api/test/material/radio/radio.toggleable.0_test.dart b/examples/api/test/material/radio/radio.toggleable.0_test.dart new file mode 100644 index 0000000000000..9b071ad9b16bd --- /dev/null +++ b/examples/api/test/material/radio/radio.toggleable.0_test.dart @@ -0,0 +1,32 @@ +// 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/radio/radio.toggleable.0.dart' + as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('StreamBuilder listens to internal stream', (WidgetTester tester) async { + await tester.pumpWidget( + const example.ToggleableExampleApp(), + ); + + expect(find.byType(Radio), findsExactly(5)); + expect(find.text('Hercules Mulligan'), findsOne); + expect(find.text('Eliza Hamilton'), findsOne); + expect(find.text('Philip Schuyler'), findsOne); + expect(find.text('Maria Reynolds'), findsOne); + expect(find.text('Samuel Seabury'), findsOne); + + for (int i = 0; i < 5; i++) { + await tester.tap(find.byType(Radio).at(i)); + await tester.pump(); + expect( + find.byWidgetPredicate((Widget widget) => widget is Radio && widget.groupValue == i), + findsExactly(5), + ); + } + }); +} diff --git a/examples/api/test/material/scaffold/scaffold.0_test.dart b/examples/api/test/material/scaffold/scaffold.0_test.dart new file mode 100644 index 0000000000000..6716da938045a --- /dev/null +++ b/examples/api/test/material/scaffold/scaffold.0_test.dart @@ -0,0 +1,25 @@ +// 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/scaffold/scaffold.0.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('The count should be incremented when the floating action button is tapped', (WidgetTester tester) async { + await tester.pumpWidget( + const example.ScaffoldExampleApp(), + ); + + expect(find.widgetWithText(AppBar, 'Sample Code'), findsOne); + expect(find.widgetWithIcon(FloatingActionButton, Icons.add), findsOne); + expect(find.text('You have pressed the button 0 times.'), findsOne); + + for (int i = 1; i <= 5; i++) { + await tester.tap(find.byType(FloatingActionButton)); + await tester.pump(); + expect(find.text('You have pressed the button $i times.'), findsOne); + } + }); +} diff --git a/examples/api/test/material/scaffold/scaffold.1_test.dart b/examples/api/test/material/scaffold/scaffold.1_test.dart index a468b509b9104..e456910162ae3 100644 --- a/examples/api/test/material/scaffold/scaffold.1_test.dart +++ b/examples/api/test/material/scaffold/scaffold.1_test.dart @@ -21,5 +21,8 @@ void main() { await tester.pump(); expect(find.text('You have pressed the button $i times.'), findsOne); } + + final Scaffold scaffold = tester.firstWidget(find.byType(Scaffold)); + expect(scaffold.backgroundColor, Colors.blueGrey.shade200); }); } diff --git a/examples/api/test/material/scaffold/scaffold.2_test.dart b/examples/api/test/material/scaffold/scaffold.2_test.dart new file mode 100644 index 0000000000000..1c27441e5c399 --- /dev/null +++ b/examples/api/test/material/scaffold/scaffold.2_test.dart @@ -0,0 +1,27 @@ +// 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/scaffold/scaffold.2.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('The count should be incremented when the centered floating action button is tapped', (WidgetTester tester) async { + await tester.pumpWidget( + const example.ScaffoldExampleApp(), + ); + + expect(find.widgetWithText(AppBar, 'Sample Code'), findsOne); + expect(find.widgetWithIcon(FloatingActionButton, Icons.add), findsOne); + expect(find.text('You have pressed the button 0 times.'), findsOne); + expect(find.byType(BottomAppBar), findsOne); + expect(tester.getCenter(find.byType(FloatingActionButton)).dx, 400); + + for (int i = 1; i <= 5; i++) { + await tester.tap(find.byType(FloatingActionButton)); + await tester.pump(); + expect(find.text('You have pressed the button $i times.'), findsOne); + } + }); +} diff --git a/examples/api/test/material/snack_bar/snack_bar.0_test.dart b/examples/api/test/material/snack_bar/snack_bar.0_test.dart index f4dac77128086..74f6a883abeea 100644 --- a/examples/api/test/material/snack_bar/snack_bar.0_test.dart +++ b/examples/api/test/material/snack_bar/snack_bar.0_test.dart @@ -15,7 +15,7 @@ void main() { expect(find.widgetWithText(AppBar, 'SnackBar Sample'), findsOneWidget); expect(find.widgetWithText(ElevatedButton, 'Show Snackbar'), findsOneWidget); await tester.tap(find.widgetWithText(ElevatedButton, 'Show Snackbar')); - await tester.pumpAndSettle(); + await tester.pump(); expect(find.text('Awesome Snackbar!'), findsOneWidget); expect(find.text('Action'), findsOneWidget); }); diff --git a/examples/api/test/material/snack_bar/snack_bar.1_test.dart b/examples/api/test/material/snack_bar/snack_bar.1_test.dart new file mode 100644 index 0000000000000..5514a0d49e44a --- /dev/null +++ b/examples/api/test/material/snack_bar/snack_bar.1_test.dart @@ -0,0 +1,60 @@ +// 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/snack_bar/snack_bar.1.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Tapping on button shows snackbar', (WidgetTester tester) async { + await tester.pumpWidget( + const example.SnackBarExampleApp(), + ); + + expect(find.byType(SnackBar), findsNothing); + expect(find.widgetWithText(AppBar, 'SnackBar Sample'), findsOneWidget); + + await tester.tap(find.widgetWithText(ElevatedButton, 'Show Snackbar')); + await tester.pump(); + + expect(find.text('Awesome SnackBar!'), findsOneWidget); + expect(find.widgetWithText(SnackBarAction, 'Action'), findsOneWidget); + + final SnackBar bar = tester.widget(find.ancestor( + of: find.text('Awesome SnackBar!'), + matching: find.byType(SnackBar))); + expect(bar.behavior, SnackBarBehavior.floating); + }); + + testWidgets('Snackbar is styled correctly', (WidgetTester tester) async { + await tester.pumpWidget( + const example.SnackBarExampleApp(), + ); + await tester.tap(find.byType(ElevatedButton)); + await tester.pump(); + + expect(find.byType(SnackBar), findsOneWidget); + + final SnackBar bar = tester.widget(find.byType(SnackBar)); + expect(bar.behavior, SnackBarBehavior.floating); + expect(bar.width, 280.0); + expect(bar.shape, isA() + .having((RoundedRectangleBorder b) => b.borderRadius, 'radius', BorderRadius.circular(10.0))); + }); + + testWidgets('Snackbar should disappear after timeout', (WidgetTester tester) async { + await tester.pumpWidget( + const example.SnackBarExampleApp(), + ); + expect(find.byType(SnackBar), findsNothing); + + await tester.tap(find.byType(ElevatedButton)); + await tester.pumpAndSettle(); + expect(find.byType(SnackBar), findsOneWidget); + + await tester.pump(const Duration(milliseconds: 1500)); + await tester.pumpAndSettle(); + expect(find.byType(SnackBar), findsNothing); + }); +} diff --git a/examples/api/test/material/snack_bar/snack_bar.2_test.dart b/examples/api/test/material/snack_bar/snack_bar.2_test.dart new file mode 100644 index 0000000000000..325454ff9b843 --- /dev/null +++ b/examples/api/test/material/snack_bar/snack_bar.2_test.dart @@ -0,0 +1,154 @@ +// 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/snack_bar/snack_bar.2.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Shows correct static elements', (WidgetTester tester) async { + await tester.pumpWidget( + const example.SnackBarExampleApp(), + ); + + expect(find.byType(SnackBar), findsNothing); + expect(find.widgetWithText(AppBar, 'SnackBar Sample'), findsOneWidget); + expect(find.widgetWithText(FloatingActionButton, 'Show Snackbar'), findsOneWidget); + expect(find.text('Behavior'), findsOneWidget); + expect(find.text('Fixed'), findsOneWidget); + expect(find.text('Floating'), findsOneWidget); + expect(find.text('Content'), findsOneWidget); + expect(find.widgetWithText(SwitchListTile, 'Include close Icon'), findsOneWidget); + expect(find.widgetWithText(SwitchListTile, 'Multi Line Text'), findsOneWidget); + expect(find.widgetWithText(SwitchListTile, 'Include Action'), findsOneWidget); + expect(find.widgetWithText(SwitchListTile, 'Long Action Label'), findsOneWidget); + + await tester.scrollUntilVisible(find.byType(Slider), 30); + expect(find.text('Action new-line overflow threshold'), findsOneWidget); + expect(find.byType(Slider), findsOneWidget); + }); + + testWidgets('Applies default configuration to snackbar', (WidgetTester tester) async { + await tester.pumpWidget( + const example.SnackBarExampleApp(), + ); + + expect(find.byType(SnackBar), findsNothing); + expect(find.text('Single Line Snack Bar'), findsNothing); + expect(find.textContaining('spans across multiple lines'), findsNothing); + expect(find.text('Long Action Text'), findsNothing); + expect(find.text('Action'), findsNothing); + expect(find.byIcon(Icons.close), findsNothing); + + await tester.tap(find.text('Show Snackbar')); + await tester.pumpAndSettle(); + + expect(find.byType(SnackBar), findsOneWidget); + expect(find.text('Single Line Snack Bar'), findsOneWidget); + expect(find.text('Action'), findsOneWidget); + expect(find.byIcon(Icons.close), findsOneWidget); + expect(tester + .widget(find.byType(SnackBar)) + .behavior, + SnackBarBehavior.floating); + + await tester.tap(find.byIcon(Icons.close)); + await tester.pumpAndSettle(); + expect(find.byType(SnackBar), findsNothing); + }); + + testWidgets('Can configure fixed snack bar with long text', (WidgetTester tester) async { + await tester.pumpWidget( + const example.SnackBarExampleApp(), + ); + + await tester.tap(find.text('Fixed')); + await tester.tap(find.text('Multi Line Text')); + await tester.tap(find.text('Long Action Label')); + await tester.tap(find.text('Show Snackbar')); + await tester.pumpAndSettle(); + + expect(find.byType(SnackBar), findsOneWidget); + expect(find.textContaining('spans across multiple lines'), findsOneWidget); + expect(find.text('Long Action Text'), findsOneWidget); + expect(find.byIcon(Icons.close), findsOneWidget); + expect(tester + .widget(find.byType(SnackBar)) + .behavior, + SnackBarBehavior.fixed); + + await tester.tap(find.byIcon(Icons.close)); + await tester.pumpAndSettle(); + expect(find.byType(SnackBar), findsNothing); + }); + + testWidgets('Can configure to remove action and close icon', (WidgetTester tester) async { + await tester.pumpWidget( + const example.SnackBarExampleApp(), + ); + + await tester.tap(find.text('Include close Icon')); + await tester.tap(find.text('Include Action')); + await tester.tap(find.text('Show Snackbar')); + await tester.pumpAndSettle(); + + expect(find.byType(SnackBar), findsOneWidget); + expect(find.byType(SnackBarAction), findsNothing); + expect(find.byIcon(Icons.close), findsNothing); + }); + + testWidgets('Higher overflow threshold leads to smaller snack bars', (WidgetTester tester) async { + await tester.pumpWidget( + const example.SnackBarExampleApp(), + ); + + await tester.tap(find.text('Fixed')); + await tester.tap(find.text('Multi Line Text')); + await tester.tap(find.text('Long Action Label')); + + // Establish max size with low threshold (causes overflow) + await tester.scrollUntilVisible(find.byType(Slider), 30); + TestGesture gesture = await tester.startGesture(tester.getCenter(find.byType(Slider))); + await gesture.moveTo(tester.getBottomLeft(find.byType(Slider))); + await gesture.up(); + await tester.tapAt(tester.getBottomLeft(find.byType(Slider))); + await tester.tap(find.text('Show Snackbar')); + await tester.pumpAndSettle(); + + final double highSnackBar = tester.getSize(find.byType(SnackBar)).height; + await tester.tap(find.byIcon(Icons.close)); + await tester.pumpAndSettle(); + + // Configure high threshold (everything is in one row) + gesture = await tester.startGesture(tester.getCenter(find.byType(Slider))); + await gesture.moveTo(tester.getTopRight(find.byType(Slider))); + await gesture.up(); + await tester.tapAt(tester.getTopRight(find.byType(Slider))); + await tester.tap(find.text('Show Snackbar')); + await tester.pumpAndSettle(); + + expect(tester.getSize(find.byType(SnackBar)).height, + lessThan(highSnackBar)); + }); + + testWidgets('Disable unusable elements', (WidgetTester tester) async { + await tester.pumpWidget( + const example.SnackBarExampleApp(), + ); + + expect(find.text('Long Action Label'), findsOneWidget); + expect(tester.widget(find.ancestor( + of: find.text('Long Action Label'), + matching: find.byType(SwitchListTile), + )).onChanged, isNotNull); + + await tester.tap(find.text('Include Action')); + await tester.pumpAndSettle(); + + expect(tester.widget(find.ancestor( + of: find.text('Long Action Label'), + matching: find.byType(SwitchListTile), + )).onChanged, isNull); + }); +} diff --git a/examples/api/test/widgets/actions/actions.0_test.dart b/examples/api/test/widgets/actions/actions.0_test.dart index e2e5f03ec51e1..1aa359203e5b0 100644 --- a/examples/api/test/widgets/actions/actions.0_test.dart +++ b/examples/api/test/widgets/actions/actions.0_test.dart @@ -21,7 +21,7 @@ void main() { return button.style?.foregroundColor?.resolve({}); } - testWidgets('increments and decrements value', (WidgetTester tester) async { + testWidgets('Increments and decrements value', (WidgetTester tester) async { await tester.pumpWidget( const example.ActionsExampleApp(), ); diff --git a/examples/api/test/widgets/animated_switcher/animated_switcher.0_test.dart b/examples/api/test/widgets/animated_switcher/animated_switcher.0_test.dart new file mode 100644 index 0000000000000..dea3a416928c5 --- /dev/null +++ b/examples/api/test/widgets/animated_switcher/animated_switcher.0_test.dart @@ -0,0 +1,99 @@ +// 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/widgets/animated_switcher/animated_switcher.0.dart' + as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Increments counter on button tap', (WidgetTester tester) async { + await tester.pumpWidget( + const example.AnimatedSwitcherExampleApp(), + ); + + int counter = 0; + + expect(find.text('$counter'), findsOneWidget); + + while (counter < 10) { + // Tap on the button to increment the counter. + await tester.tap( + find.ancestor( + of: find.text('Increment'), + matching: find.byType(ElevatedButton), + ), + ); + await tester.pumpAndSettle(); + + counter += 1; + + expect(find.text('${counter - 1}'), findsNothing); + expect(find.text('$counter'), findsOneWidget); + } + }); + + testWidgets('Animates counter change', (WidgetTester tester) async { + await tester.pumpWidget( + const example.AnimatedSwitcherExampleApp(), + ); + + // The animation duration defined in the example app. + const Duration animationDuration = Duration(milliseconds: 500); + + final Finder zeroTransitionFinder = find.ancestor( + of: find.text('0'), + matching: find.byType(ScaleTransition), + ); + final Finder oneTransitionFinder = find.ancestor( + of: find.text('1'), + matching: find.byType(ScaleTransition), + ); + + expect(zeroTransitionFinder, findsOneWidget); + ScaleTransition zeroTransition = tester.widget(zeroTransitionFinder); + expect(zeroTransition.scale.value, equals(1.0)); + + expect(oneTransitionFinder, findsNothing); + + // Tap on the button to increment the counter. + await tester.tap( + find.ancestor( + of: find.text('Increment'), + matching: find.byType(ElevatedButton), + ), + ); + await tester.pump(); + + expect(zeroTransitionFinder, findsOneWidget); + zeroTransition = tester.widget(zeroTransitionFinder); + expect(zeroTransition.scale.value, equals(1.0)); + + expect(oneTransitionFinder, findsOneWidget); + ScaleTransition oneTransition = tester.widget(oneTransitionFinder); + expect(oneTransition.scale.value, equals(0.0)); + + // Advance animation to the middle. + await tester.pump(animationDuration ~/ 2); + + expect(zeroTransitionFinder, findsOneWidget); + zeroTransition = tester.widget(zeroTransitionFinder); + expect(zeroTransition.scale.value, equals(0.5)); + + expect(oneTransitionFinder, findsOneWidget); + oneTransition = tester.widget(oneTransitionFinder); + expect(oneTransition.scale.value, equals(0.5)); + + // Advance animation to the end. + await tester.pump(animationDuration ~/ 2); + + expect(zeroTransitionFinder, findsOneWidget); + zeroTransition = tester.widget(zeroTransitionFinder); + expect(zeroTransition.scale.value, equals(0.0)); + + expect(oneTransitionFinder, findsOneWidget); + oneTransition = tester.widget(oneTransitionFinder); + expect(oneTransition.scale.value, equals(1.0)); + }); +} diff --git a/examples/api/test/widgets/async/future_builder.0_test.dart b/examples/api/test/widgets/async/future_builder.0_test.dart new file mode 100644 index 0000000000000..98587ceb4b943 --- /dev/null +++ b/examples/api/test/widgets/async/future_builder.0_test.dart @@ -0,0 +1,29 @@ +// 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/widgets/async/future_builder.0.dart' + as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('StreamBuilder listens to internal stream', (WidgetTester tester) async { + await tester.pumpWidget( + const example.FutureBuilderExampleApp(), + ); + + expect(find.byType(CircularProgressIndicator), findsOne); + expect(find.text('Awaiting result...'), findsOne); + + await tester.pump(const Duration(seconds: 1)); + + expect(find.byType(CircularProgressIndicator), findsOne); + expect(find.text('Awaiting result...'), findsOne); + + await tester.pump(const Duration(seconds: 1)); + + expect(find.byIcon(Icons.check_circle_outline), findsOne); + expect(find.text('Result: Data Loaded'), findsOne); + }); +} diff --git a/examples/api/test/widgets/autocomplete/raw_autocomplete.0_test.dart b/examples/api/test/widgets/autocomplete/raw_autocomplete.0_test.dart new file mode 100644 index 0000000000000..80bae5d87094c --- /dev/null +++ b/examples/api/test/widgets/autocomplete/raw_autocomplete.0_test.dart @@ -0,0 +1,47 @@ +// 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/widgets/autocomplete/raw_autocomplete.0.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Autocomplete example is visible', (WidgetTester tester) async { + await tester.pumpWidget(const example.AutocompleteExampleApp()); + expect(find.text('RawAutocomplete Basic'), findsOneWidget); + expect(find.byType(TextFormField), findsOneWidget); + + expect(find.text('aardvark'), findsNothing); + expect(find.text('bobcat'), findsNothing); + expect(find.text('chameleon'), findsNothing); + }); + + testWidgets('Options are shown correctly and selectable', (WidgetTester tester) async { + await tester.pumpWidget(const example.AutocompleteExampleApp()); + await tester.tap(find.byType(TextFormField)); + await tester.pump(); + + expect(find.byType(ListTile), findsNWidgets(3)); + expect(find.text('aardvark'), findsOneWidget); + expect(find.text('bobcat'), findsOneWidget); + expect(find.text('chameleon'), findsOneWidget); + + await tester.enterText(find.byType(TextFormField), 'b'); + await tester.pump(); + + expect(find.byType(ListTile), findsOneWidget); + expect(find.text('aardvark'), findsNothing); + expect(find.text('bobcat'), findsOneWidget); + expect(find.text('chameleon'), findsNothing); + + await tester.tap(find.text('bobcat')); + await tester.pump(); + + expect(find.byType(ListTile), findsNothing); + expect(find.descendant( + of: find.byType(TextFormField), + matching: find.text('bobcat'), + ), findsOneWidget); + }); +} diff --git a/examples/api/test/widgets/autocomplete/raw_autocomplete.1_test.dart b/examples/api/test/widgets/autocomplete/raw_autocomplete.1_test.dart new file mode 100644 index 0000000000000..b625c64e2335f --- /dev/null +++ b/examples/api/test/widgets/autocomplete/raw_autocomplete.1_test.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_api_samples/widgets/autocomplete/raw_autocomplete.1.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Autocomplete example is visible', (WidgetTester tester) async { + await tester.pumpWidget(const example.AutocompleteExampleApp()); + expect(find.text('RawAutocomplete Custom Type'), findsOneWidget); + expect(find.byType(TextFormField), findsOneWidget); + + expect(find.text('Alice'), findsNothing); + expect(find.text('Bob'), findsNothing); + expect(find.text('Charlie'), findsNothing); + }); + + testWidgets('Options are shown correctly and selectable', (WidgetTester tester) async { + await tester.pumpWidget(const example.AutocompleteExampleApp()); + await tester.tap(find.byType(TextFormField)); + await tester.pump(); + + expect(find.byType(ListTile), findsNWidgets(3)); + expect(find.text('Alice'), findsOneWidget); + expect(find.text('Bob'), findsOneWidget); + expect(find.text('Charlie'), findsOneWidget); + + await tester.enterText(find.byType(TextFormField), 'b'); + await tester.pump(); + + expect(find.byType(ListTile), findsOneWidget); + expect(find.text('Alice'), findsNothing); + expect(find.text('Bob'), findsOneWidget); + expect(find.text('Charlie'), findsNothing); + + await tester.tap(find.text('Bob')); + await tester.pump(); + + expect(find.byType(ListTile), findsNothing); + expect(find.descendant( + of: find.byType(TextFormField), + matching: find.text('Bob'), + ), findsOneWidget); + }); + + testWidgets('Finds users by email address', (WidgetTester tester) async { + await tester.pumpWidget(const example.AutocompleteExampleApp()); + + await tester.enterText(find.byType(TextFormField), '@'); + await tester.pump(); + + expect(find.byType(ListTile), findsNWidgets(3)); + expect(find.text('Alice'), findsOneWidget); + expect(find.text('Bob'), findsOneWidget); + expect(find.text('Charlie'), findsOneWidget); + + await tester.enterText(find.byType(TextFormField), '@gmail'); + await tester.pump(); + + expect(find.byType(ListTile), findsOneWidget); + expect(find.text('Alice'), findsNothing); + expect(find.text('Bob'), findsNothing); + expect(find.text('Charlie'), findsOneWidget); + + await tester.tap(find.text('Charlie')); + await tester.pump(); + + expect(find.byType(ListTile), findsNothing); + expect(find.descendant( + of: find.byType(TextFormField), + matching: find.text('Charlie'), + ), findsOneWidget); + }); +} diff --git a/examples/api/test/widgets/autocomplete/raw_autocomplete.2_test.dart b/examples/api/test/widgets/autocomplete/raw_autocomplete.2_test.dart new file mode 100644 index 0000000000000..313ed73366f1b --- /dev/null +++ b/examples/api/test/widgets/autocomplete/raw_autocomplete.2_test.dart @@ -0,0 +1,86 @@ +// 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/widgets/autocomplete/raw_autocomplete.2.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Form is entirely visible and rejects invalid responses', (WidgetTester tester) async { + await tester.pumpWidget(const example.AutocompleteExampleApp()); + expect(find.text('RawAutocomplete Form'), findsOneWidget); + expect(find.byType(TextFormField), findsNWidgets(2)); + expect(find.byIcon(Icons.arrow_downward), findsOneWidget); + expect(find.text('This is a regular DropdownButtonFormField'), findsOneWidget); + expect(find.text('This is a regular TextFormField'), findsOneWidget); + expect(find.text('This is a RawAutocomplete!'), findsOneWidget); + expect(find.text('Submit'), findsOneWidget); + + expect(find.text('One'), findsNothing); + expect(find.text('Two'), findsNothing); + expect(find.text('Free'), findsNothing); + expect(find.text('Four'), findsNothing); + expect(find.text('aardvark'), findsNothing); + expect(find.text('bobcat'), findsNothing); + expect(find.text('chameleon'), findsNothing); + + expect(find.text('Must make a selection.'), findsNothing); + expect(find.text("Can't be empty."), findsNothing); + expect(find.text('Nothing selected.'), findsNothing); + await tester.tap(find.text('Submit')); + await tester.pump(); + expect(find.text('Must make a selection.'), findsOneWidget); + expect(find.text("Can't be empty."), findsOneWidget); + expect(find.text('Nothing selected.'), findsOneWidget); + }); + + testWidgets('Form accepts valid inputs', (WidgetTester tester) async { + await tester.pumpWidget(const example.AutocompleteExampleApp()); + await tester.tap(find.byIcon(Icons.arrow_downward)); + await tester.pump(); + + expect(find.text('One'), findsOneWidget); + expect(find.text('Two'), findsOneWidget); + expect(find.text('Free'), findsOneWidget); + expect(find.text('Four'), findsOneWidget); + await tester.tap(find.text('Free')); + await tester.pump(); + expect(find.text('Two'), findsNothing); + expect(find.text('Free'), findsOneWidget); + + expect(find.text('This is a regular TextFormField'), findsOneWidget); + await tester.enterText( + find.ancestor( + of: find.text('This is a regular TextFormField'), + matching: find.byType(TextFormField), + ), + 'regular user input', + ); + + await tester.tap(find.ancestor( + of: find.text('This is a RawAutocomplete!'), + matching: find.byType(TextFormField), + )); + await tester.pump(); + expect(find.text('aardvark'), findsOneWidget); + expect(find.text('bobcat'), findsOneWidget); + expect(find.text('chameleon'), findsOneWidget); + await tester.tap(find.text('aardvark')); + await tester.pump(); + + expect(find.byType(AlertDialog), findsNothing); + await tester.tap(find.text('Submit')); + await tester.pump(); + expect(find.byType(AlertDialog), findsOneWidget); + expect(find.text('Successfully submitted'), findsOneWidget); + expect(find.text('DropdownButtonFormField: "Free"'), findsOneWidget); + expect(find.text('TextFormField: "regular user input"'), findsOneWidget); + expect(find.text('RawAutocomplete: "aardvark"'), findsOneWidget); + expect(find.text('Ok'), findsOneWidget); + + await tester.tap(find.text('Ok')); + await tester.pump(); + expect(find.byType(AlertDialog), findsNothing); + }); +} diff --git a/examples/api/test/widgets/autocomplete/raw_autocomplete.focus_node.0_test.dart b/examples/api/test/widgets/autocomplete/raw_autocomplete.focus_node.0_test.dart new file mode 100644 index 0000000000000..36c097a4b1d39 --- /dev/null +++ b/examples/api/test/widgets/autocomplete/raw_autocomplete.focus_node.0_test.dart @@ -0,0 +1,66 @@ +// 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/widgets/autocomplete/raw_autocomplete.focus_node.0.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Autocomplete example is visible', (WidgetTester tester) async { + await tester.pumpWidget(const example.AutocompleteExampleApp()); + expect(find.text('Split RawAutocomplete App'), findsOneWidget); + expect(find.byType(AppBar), findsOneWidget); + expect(find.byType(TextFormField), findsOneWidget); + expect( + find.descendant( + of: find.byType(AppBar), + matching: find.byType(TextFormField) + ), + findsOneWidget, + ); + + expect(find.byType(RawAutocomplete), findsOneWidget); + expect(find.text('aardvark'), findsNothing); + expect(find.text('bobcat'), findsNothing); + expect(find.text('chameleon'), findsNothing); + expect( + find.ancestor( + matching: find.byType(AppBar), + of: find.byType(RawAutocomplete) + ), + findsNothing, + ); + }); + + testWidgets('Options are shown correctly and selectable', (WidgetTester tester) async { + await tester.pumpWidget(const example.AutocompleteExampleApp()); + await tester.tap(find.byType(TextFormField)); + await tester.pump(); + + expect(find.byType(ListTile), findsNWidgets(3)); + expect(find.text('aardvark'), findsOneWidget); + expect(find.text('bobcat'), findsOneWidget); + expect(find.text('chameleon'), findsOneWidget); + + await tester.enterText(find.byType(TextFormField), 'b'); + await tester.pump(); + + expect(find.byType(ListTile), findsOneWidget); + expect(find.text('aardvark'), findsNothing); + expect(find.text('bobcat'), findsOneWidget); + expect(find.text('chameleon'), findsNothing); + + await tester.tap(find.text('bobcat')); + await tester.pump(); + + expect(find.byType(ListTile), findsNothing); + expect( + find.descendant( + of: find.byType(TextFormField), + matching: find.text('bobcat'), + ), + findsOneWidget, + ); + }); +} diff --git a/examples/api/test/widgets/editable_text/editable_text.on_changed.0_test.dart b/examples/api/test/widgets/editable_text/editable_text.on_changed.0_test.dart new file mode 100644 index 0000000000000..6bb420d04f335 --- /dev/null +++ b/examples/api/test/widgets/editable_text/editable_text.on_changed.0_test.dart @@ -0,0 +1,68 @@ +// 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/widgets/editable_text/editable_text.on_changed.0.dart' + as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Verify correct labels are displayed', (WidgetTester tester) async { + await tester.pumpWidget( + const example.OnChangedExampleApp(), + ); + + expect( + find.text('What number comes next in the sequence?'), + findsOneWidget, + ); + expect(find.text('1, 1, 2, 3, 5, 8...?'), findsOneWidget); + }); + + testWidgets('Does not show dialog when answer is not correct', (WidgetTester tester) async { + await tester.pumpWidget( + const example.OnChangedExampleApp(), + ); + + await tester.enterText(find.byType(TextField), '33'); + await tester.pumpAndSettle(); + + expect(find.byType(AlertDialog), findsNothing); + }); + + testWidgets('Shows dialog when answer is correct', (WidgetTester tester) async { + await tester.pumpWidget( + const example.OnChangedExampleApp(), + ); + + await tester.enterText(find.byType(TextField), '13'); + await tester.pumpAndSettle(); + + expect(find.byType(AlertDialog), findsOneWidget); + expect(find.text('That is correct!'), findsOneWidget); + expect(find.text('13 is the right answer.'), findsOneWidget); + expect(find.text('OK'), findsOneWidget); + }); + + testWidgets('Closes dialog on OK button tap', (WidgetTester tester) async { + await tester.pumpWidget( + const example.OnChangedExampleApp(), + ); + + await tester.enterText(find.byType(TextField), '13'); + await tester.pumpAndSettle(); + + expect(find.byType(AlertDialog), findsOneWidget); + + await tester.tap( + find.ancestor( + of: find.text('OK'), + matching: find.byType(TextButton), + ), + ); + await tester.pumpAndSettle(); + + expect(find.byType(AlertDialog), findsNothing); + }); +} diff --git a/examples/api/test/widgets/editable_text/text_editing_controller.0_test.dart b/examples/api/test/widgets/editable_text/text_editing_controller.0_test.dart new file mode 100644 index 0000000000000..11737ed0240e7 --- /dev/null +++ b/examples/api/test/widgets/editable_text/text_editing_controller.0_test.dart @@ -0,0 +1,67 @@ +// 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/widgets/editable_text/text_editing_controller.0.dart' + as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Forces text to be lower case', (WidgetTester tester) async { + await tester.pumpWidget( + const example.TextEditingControllerExampleApp(), + ); + + const String input = 'Almost Everything Is a WIDGET! 💙'; + + await tester.enterText(find.byType(TextFormField), input); + await tester.pump(); + + final TextFormField textField = tester.widget(find.byType(TextFormField)); + final TextEditingController controller = textField.controller!; + + expect(find.text(input.toLowerCase()), findsOneWidget); + expect(controller.text, input.toLowerCase()); + }); + + testWidgets('Keeps the caret at the end of the input', (WidgetTester tester) async { + await tester.pumpWidget( + const example.TextEditingControllerExampleApp(), + ); + + const String input = 'flutter'; + + await tester.enterText(find.byType(TextFormField), input); + await tester.pump(); + + expect(find.text(input), findsOneWidget); + + final TextFormField textField = tester.widget(find.byType(TextFormField)); + final TextEditingController controller = textField.controller!; + + // Verify that the caret positioned at the end of the input. + expect( + controller.selection, + const TextSelection.collapsed(offset: input.length), + ); + + final RenderBox box = tester.renderObject(find.byType(TextFormField)); + + // Calculate the center-left point of the field. + final Offset centerLeftPoint = box.localToGlobal( + Offset(0, box.size.height / 2), + ); + + // Tap on the center-left point of the field to try to change the caret + // position. + await tester.tapAt(centerLeftPoint); + await tester.pump(); + + // Verify that the caret position remains unchanged. + expect( + controller.selection, + const TextSelection.collapsed(offset: input.length), + ); + }); +} diff --git a/examples/api/test/widgets/inherited_theme/inherited_theme.0_test.dart b/examples/api/test/widgets/inherited_theme/inherited_theme.0_test.dart new file mode 100644 index 0000000000000..03067fb20e99e --- /dev/null +++ b/examples/api/test/widgets/inherited_theme/inherited_theme.0_test.dart @@ -0,0 +1,30 @@ +// 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/widgets/inherited_theme/inherited_theme.0.dart' + as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('StreamBuilder listens to internal stream', (WidgetTester tester) async { + await tester.pumpWidget( + const example.InheritedThemeExampleApp(), + ); + + expect(find.byType(GestureDetector), findsOne); + expect(find.text('Tap Here'), findsOne); + + final DefaultTextStyle bodyDefaultTextStyle = DefaultTextStyle.of(tester.element(find.text('Tap Here'))); + expect(bodyDefaultTextStyle.style, const TextStyle(fontSize: 48, color: Colors.blue)); + + await tester.tap(find.text('Tap Here')); + await tester.pumpAndSettle(); + + expect(find.text('Hello World'), findsOne); + + final DefaultTextStyle routeDefaultTextStyle = DefaultTextStyle.of(tester.element(find.text('Hello World'))); + expect(routeDefaultTextStyle.style, const TextStyle(fontSize: 48, color: Colors.blue)); + }); +} diff --git a/examples/api/test/widgets/restoration_properties/restorable_value.0_test.dart b/examples/api/test/widgets/restoration_properties/restorable_value.0_test.dart new file mode 100644 index 0000000000000..8c52ea8c5cfee --- /dev/null +++ b/examples/api/test/widgets/restoration_properties/restorable_value.0_test.dart @@ -0,0 +1,56 @@ +// 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/widgets/restoration_properties/restorable_value.0.dart' + as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Increments answer on OutlinedButton tap', (WidgetTester tester) async { + await tester.pumpWidget( + const example.RestorableValueExampleApp(), + ); + + // Verify that the initial answer value in the example equals 42. + expect(find.text('42'), findsOneWidget); + + // Tap the button to increment the answer value by 1. + await tester.tap(find.byType(OutlinedButton)); + await tester.pump(); + + // Verify that the answer value increased by 1. + expect(find.text('43'), findsOneWidget); + }); + + testWidgets('Restores answer value after restart', (WidgetTester tester) async { + await tester.pumpWidget( + const MaterialApp( + home: RootRestorationScope( + restorationId: 'root', + child: example.RestorableValueExample(restorationId: 'child'), + ), + ), + ); + + // The initial answer value in the example equals 42. + expect(find.text('42'), findsOneWidget); + + // Tap the button 10 times to change the answer value. + for (int i = 0; i < 10; i++) { + await tester.tap(find.byType(OutlinedButton)); + await tester.pump(); + } + + // Verify that the answer value increased by 10. + expect(find.text('52'), findsOneWidget); + + // Simulate restoring the state of the widget tree after the application + // is restarted. + await tester.restartAndRestore(); + + // Verify that the answer value is restored correctly. + expect(find.text('52'), findsOneWidget); + }); +} diff --git a/examples/api/test/widgets/sliver/decorated_sliver.0_test.dart b/examples/api/test/widgets/sliver/decorated_sliver.0_test.dart new file mode 100644 index 0000000000000..6298215aca67c --- /dev/null +++ b/examples/api/test/widgets/sliver/decorated_sliver.0_test.dart @@ -0,0 +1,74 @@ +// 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/widgets/sliver/decorated_sliver.0.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Verify the texts are displayed', (WidgetTester tester) async { + await tester.pumpWidget( + const example.SliverDecorationExampleApp(), + ); + + final Finder moonText = find.text('A moon on a night sky'); + expect(moonText, findsOneWidget); + + final Finder blueSkyText = find.text('A blue sky'); + expect(blueSkyText, findsOneWidget); + }); + + testWidgets('Verify the sliver with key `radial-gradient` has a RadialGradient', (WidgetTester tester) async { + await tester.pumpWidget( + const example.SliverDecorationExampleApp(), + ); + + final DecoratedSliver radialDecoratedSliver = tester.widget( + find.byKey(const ValueKey('radial-gradient')), + ); + expect( + radialDecoratedSliver.decoration, + const BoxDecoration( + gradient: RadialGradient( + center: Alignment(-0.5, -0.6), + radius: 0.15, + colors: [ + Color(0xFFEEEEEE), + Color(0xFF111133), + ], + stops: [0.4, 0.8], + ), + ), + ); + }); + + testWidgets('Verify that the sliver with key `linear-gradient` has a LinearGradient', (WidgetTester tester) async { + await tester.pumpWidget( + const example.SliverDecorationExampleApp(), + ); + + final DecoratedSliver linearDecoratedSliver = tester.widget( + find.byKey(const ValueKey('linear-gradient')), + ); + expect( + linearDecoratedSliver.decoration, + const BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [ + Color(0xFF111133), + Color(0xFF1A237E), + Color(0xFF283593), + Color(0xFF3949AB), + Color(0xFF3F51B5), + Color(0xFF1976D2), + Color(0xFF1E88E5), + Color(0xFF42A5F5), + ], + ), + ), + ); + }); +} diff --git a/examples/api/test/widgets/transitions/align_transition.0_test.dart b/examples/api/test/widgets/transitions/align_transition.0_test.dart new file mode 100644 index 0000000000000..f321592de37ab --- /dev/null +++ b/examples/api/test/widgets/transitions/align_transition.0_test.dart @@ -0,0 +1,49 @@ +// 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/widgets/transitions/align_transition.0.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Shows flutter logo in transition', (WidgetTester tester) async { + await tester.pumpWidget(const example.AlignTransitionExampleApp()); + expect(find.byType(ColoredBox), findsOneWidget); + expect( + find.byWidgetPredicate((Widget padding) => padding is Padding + && padding.padding == const EdgeInsets.all(8.0)), + findsOneWidget, + ); + expect(find.byType(FlutterLogo), findsOneWidget); + expect(find.byType(AlignTransition), findsOneWidget); + }); + + testWidgets('Animates repeatedly every 2 seconds', (WidgetTester tester) async { + await tester.pumpWidget(const example.AlignTransitionExampleApp()); + final Finder paddingFinder = find.byWidgetPredicate( + (Widget padding) => padding is Padding + && padding.padding == const EdgeInsets.all(8.0)); + + expect( + tester.getBottomLeft(paddingFinder), + tester.getBottomLeft(find.byType(AlignTransition)), + ); + + await tester.pump(const Duration(seconds: 2)); + await tester.pump(); + + expect( + tester.getCenter(paddingFinder), + tester.getCenter(find.byType(AlignTransition)), + ); + + await tester.pump(const Duration(seconds: 2)); + await tester.pump(); + + expect( + tester.getBottomLeft(paddingFinder), + tester.getBottomLeft(find.byType(AlignTransition)), + ); + }); +} diff --git a/examples/api/test/widgets/transitions/animated_builder.0_test.dart b/examples/api/test/widgets/transitions/animated_builder.0_test.dart new file mode 100644 index 0000000000000..84735c358ce0f --- /dev/null +++ b/examples/api/test/widgets/transitions/animated_builder.0_test.dart @@ -0,0 +1,30 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:math' as math; + +import 'package:flutter/material.dart'; +import 'package:flutter_api_samples/widgets/transitions/animated_builder.0.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Rotates text and container', (WidgetTester tester) async { + await tester.pumpWidget(const example.AnimatedBuilderExampleApp()); + expect(find.text('Whee!'), findsOneWidget); + expect(find.byType(Container), findsOneWidget); + expect(tester.widget(find.byType(Container)), isA() + .having((Container container) => container.color, 'color', Colors.green)); + + expect(find.byWidgetPredicate((Widget widget) => widget is Transform + && widget.transform == Transform.rotate(angle: 0.0).transform), + findsOneWidget); + + await tester.pump(const Duration(seconds: 5)); + await tester.pump(); + + expect(find.byWidgetPredicate((Widget widget) => widget is Transform + && widget.transform == Transform.rotate(angle: math.pi).transform), + findsOneWidget); + }); +} diff --git a/examples/api/test/widgets/transitions/animated_widget.0_test.dart b/examples/api/test/widgets/transitions/animated_widget.0_test.dart new file mode 100644 index 0000000000000..46b6de6efcfd5 --- /dev/null +++ b/examples/api/test/widgets/transitions/animated_widget.0_test.dart @@ -0,0 +1,29 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:math' as math; + +import 'package:flutter/material.dart'; +import 'package:flutter_api_samples/widgets/transitions/animated_widget.0.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Rotates green container', (WidgetTester tester) async { + await tester.pumpWidget(const example.AnimatedWidgetExampleApp()); + expect(find.byType(Container), findsOneWidget); + expect(tester.widget(find.byType(Container)), isA() + .having((Container container) => container.color, 'color', Colors.green)); + + expect(find.byWidgetPredicate((Widget widget) => widget is Transform + && widget.transform == Transform.rotate(angle: 0.0).transform), + findsOneWidget); + + await tester.pump(const Duration(seconds: 5)); + await tester.pump(); + + expect(find.byWidgetPredicate((Widget widget) => widget is Transform + && widget.transform == Transform.rotate(angle: math.pi).transform), + findsOneWidget); + }); +} diff --git a/examples/api/test/widgets/transitions/decorated_box_transition.0_test.dart b/examples/api/test/widgets/transitions/decorated_box_transition.0_test.dart new file mode 100644 index 0000000000000..95b26ee0e034a --- /dev/null +++ b/examples/api/test/widgets/transitions/decorated_box_transition.0_test.dart @@ -0,0 +1,66 @@ +// 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/widgets/transitions/decorated_box_transition.0.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Shows container in 3 second loop', (WidgetTester tester) async { + await tester.pumpWidget(const example.DecoratedBoxTransitionExampleApp()); + expect(find.byType(FlutterLogo), findsOneWidget); + expect(find.byType(Center), findsOneWidget); + expect(find.descendant( + of: find.byType(Center), + matching: find.byType(FlutterLogo) + ), findsOneWidget); + expect(find.ancestor( + of: find.byType(FlutterLogo), + matching: find.byType(Container) + ), findsAtLeast(1)); + expect(find.byType(DecoratedBoxTransition), findsOneWidget); + + expect( + tester.widget(find.byType(DecoratedBoxTransition)), + isA() + .having( + (DecoratedBoxTransition transition) => transition.decoration.value, + 'decoration', + BoxDecoration( + color: const Color(0xFFFFFFFF), + border: Border.all(style: BorderStyle.none), + borderRadius: BorderRadius.circular(60.0), + boxShadow: const [ + BoxShadow( + color: Color(0x66666666), + blurRadius: 10.0, + spreadRadius: 3.0, + offset: Offset(0, 6.0), + ), + ], + ), + ), + ); + + await tester.pump(const Duration(seconds: 3)); + await tester.pump(); + + expect( + tester.widget(find.byType(DecoratedBoxTransition)), + isA() + .having( + (DecoratedBoxTransition transition) => transition.decoration.value, + 'decoration', + BoxDecoration( + color: const Color(0xFFFFFFFF), + border: Border.all( + style: BorderStyle.none, + ), + borderRadius: BorderRadius.zero, + // No shadow. + ), + ), + ); + }); +} diff --git a/examples/api/test/widgets/transitions/default_text_style_transition.0_test.dart b/examples/api/test/widgets/transitions/default_text_style_transition.0_test.dart new file mode 100644 index 0000000000000..f31d4f10392cc --- /dev/null +++ b/examples/api/test/widgets/transitions/default_text_style_transition.0_test.dart @@ -0,0 +1,56 @@ +// 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/widgets/transitions/default_text_style_transition.0.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Transforms text style periodically', (WidgetTester tester) async { + await tester.pumpWidget(const example.DefaultTextStyleTransitionExampleApp()); + expect(find.byType(Center), findsOneWidget); + expect(find.byType(Text), findsOneWidget); + expect(find.text('Flutter'), findsOneWidget); + expect( + find.descendant( + of: find.byType(Center), + matching: find.byType(Text) + ), + findsOneWidget, + ); + expect(find.byType(DefaultTextStyleTransition), findsOneWidget); + expect(tester.widget(find.byType(DefaultTextStyleTransition)), + isA() + .having( + (DefaultTextStyleTransition transition) => transition.style.value, + 'style', + const TextStyle(fontSize: 50, color: Colors.blue, fontWeight: FontWeight.w900), + ), + ); + + await tester.pump(const Duration(seconds: 2)); + await tester.pump(); + + expect(tester.widget(find.byType(DefaultTextStyleTransition)), + isA() + .having( + (DefaultTextStyleTransition transition) => transition.style.value, + 'style', + const TextStyle(fontSize: 50, color: Colors.red, fontWeight: FontWeight.w100), + ), + ); + + await tester.pump(const Duration(seconds: 2)); + await tester.pump(); + + expect(tester.widget(find.byType(DefaultTextStyleTransition)), + isA() + .having( + (DefaultTextStyleTransition transition) => transition.style.value, + 'style', + const TextStyle(fontSize: 50, color: Colors.blue, fontWeight: FontWeight.w900), + ), + ); + }); +} diff --git a/examples/api/test/widgets/transitions/listenable_builder.2_test.dart b/examples/api/test/widgets/transitions/listenable_builder.2_test.dart new file mode 100644 index 0000000000000..60b6e22d1acb3 --- /dev/null +++ b/examples/api/test/widgets/transitions/listenable_builder.2_test.dart @@ -0,0 +1,34 @@ +// 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/widgets/transitions/listenable_builder.2.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Increments counter', (WidgetTester tester) async { + await tester.pumpWidget(const example.ListenableBuilderExample()); + expect(find.text('ListenableBuilder Example'), findsOneWidget); + expect(find.text('Current counter value:'), findsOneWidget); + expect(find.byIcon(Icons.add), findsOneWidget); + expect(find.descendant( + of: find.byType(FloatingActionButton), + matching: find.byIcon(Icons.add) + ), findsOneWidget); + + + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + + for (int i = 0; i < 4; i++) { + await tester.tap(find.byIcon(Icons.add)); + } + await tester.pump(); + expect(find.text('5'), findsOneWidget); + }); +} diff --git a/examples/api/test/widgets/transitions/positioned_transition.0_test.dart b/examples/api/test/widgets/transitions/positioned_transition.0_test.dart new file mode 100644 index 0000000000000..94945e8576ec9 --- /dev/null +++ b/examples/api/test/widgets/transitions/positioned_transition.0_test.dart @@ -0,0 +1,42 @@ +// 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/widgets/transitions/positioned_transition.0.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Shows flutter logo in transition', (WidgetTester tester) async { + await tester.pumpWidget(const example.PositionedTransitionExampleApp()); + expect(find.byType(FlutterLogo), findsOneWidget); + expect(find.byType(Padding), findsAtLeast(1)); + expect(find.byType(PositionedTransition), findsOneWidget); + }); + + testWidgets('Animates repeatedly every 2 seconds', (WidgetTester tester) async { + await tester.pumpWidget(const example.PositionedTransitionExampleApp()); + + expect(tester.getSize(find.byType(FlutterLogo)), const Size(100.0 - 2.0 * 8.0, 100.0 - 2.0 * 8.0)); + expect(tester.getTopLeft(find.byType(FlutterLogo)), const Offset(8.0, 8.0)); + + await tester.pump(const Duration(seconds: 2)); + await tester.pump(); + + final Size canvasSize = tester.getSize(find.byType(LayoutBuilder)); + expect(tester.getSize(find.byType(FlutterLogo)), const Size(200.0 - 2.0 * 8.0, 200.0 - 2.0 * 8.0)); + expect(tester.getBottomRight(find.byType(FlutterLogo)), Offset(canvasSize.width - 8.0, canvasSize.height - 8.0)); + + await tester.pump(const Duration(seconds: 2)); + await tester.pump(); + + expect(tester.getSize(find.byType(FlutterLogo)), const Size(100.0 - 2.0 * 8.0, 100.0 - 2.0 * 8.0)); + expect(tester.getTopLeft(find.byType(FlutterLogo)), const Offset(8.0, 8.0)); + + await tester.pump(const Duration(seconds: 2)); + await tester.pump(); + + expect(tester.getSize(find.byType(FlutterLogo)), const Size(200.0 - 2.0 * 8.0, 200.0 - 2.0 * 8.0)); + expect(tester.getBottomRight(find.byType(FlutterLogo)), Offset(canvasSize.width - 8.0, canvasSize.height - 8.0)); + }); +} diff --git a/examples/api/test/widgets/transitions/relative_positioned_transition.0_test.dart b/examples/api/test/widgets/transitions/relative_positioned_transition.0_test.dart new file mode 100644 index 0000000000000..0cd06b3219810 --- /dev/null +++ b/examples/api/test/widgets/transitions/relative_positioned_transition.0_test.dart @@ -0,0 +1,42 @@ +// 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/widgets/transitions/relative_positioned_transition.0.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Shows flutter logo in transition', (WidgetTester tester) async { + await tester.pumpWidget(const example.RelativePositionedTransitionExampleApp()); + expect(find.byType(FlutterLogo), findsOneWidget); + expect(find.byType(Padding), findsAtLeast(1)); + expect(find.byType(RelativePositionedTransition), findsOneWidget); + }); + + testWidgets('Animates repeatedly every 2 seconds', (WidgetTester tester) async { + await tester.pumpWidget(const example.RelativePositionedTransitionExampleApp()); + + expect(tester.getSize(find.byType(FlutterLogo)), const Size(200.0 - 2.0 * 8.0, 200.0 - 2.0 * 8.0)); + expect(tester.getTopLeft(find.byType(FlutterLogo)), const Offset(8.0, 8.0)); + + await tester.pump(const Duration(seconds: 2)); + await tester.pump(); + + final Size canvasSize = tester.getSize(find.byType(LayoutBuilder)); + expect(tester.getSize(find.byType(FlutterLogo)), const Size(100.0 - 2.0 * 8.0, 100.0 - 2.0 * 8.0)); + expect(tester.getBottomRight(find.byType(FlutterLogo)), Offset(canvasSize.width - 8.0, canvasSize.height - 8.0)); + + await tester.pump(const Duration(seconds: 2)); + await tester.pump(); + + expect(tester.getSize(find.byType(FlutterLogo)), const Size(200.0 - 2.0 * 8.0, 200.0 - 2.0 * 8.0)); + expect(tester.getTopLeft(find.byType(FlutterLogo)), const Offset(8.0, 8.0)); + + await tester.pump(const Duration(seconds: 2)); + await tester.pump(); + + expect(tester.getSize(find.byType(FlutterLogo)), const Size(100.0 - 2.0 * 8.0, 100.0 - 2.0 * 8.0)); + expect(tester.getBottomRight(find.byType(FlutterLogo)), Offset(canvasSize.width - 8.0, canvasSize.height - 8.0)); + }); +} diff --git a/examples/api/test/widgets/transitions/rotation_transition.0_test.dart b/examples/api/test/widgets/transitions/rotation_transition.0_test.dart new file mode 100644 index 0000000000000..5cd269aeb7e67 --- /dev/null +++ b/examples/api/test/widgets/transitions/rotation_transition.0_test.dart @@ -0,0 +1,46 @@ +// 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/widgets/transitions/rotation_transition.0.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Shows flutter logo in rotation transition', (WidgetTester tester) async { + await tester.pumpWidget(const example.RotationTransitionExampleApp()); + expect( + find.byWidgetPredicate((Widget widget) => widget is RotationTransition + && widget.turns is CurvedAnimation + && (widget.turns as CurvedAnimation).curve == Curves.elasticOut, + ), findsOneWidget); + expect(find.byType(FlutterLogo), findsOneWidget); + expect(find.byType(Padding), findsAtLeast(1)); + expect( + find.descendant( + of: find.byType(Center), + matching: find.byType(FlutterLogo) + ), + findsOneWidget, + ); + + expect( + find.byWidgetPredicate((Widget widget) => widget is RotationTransition + && widget.turns is CurvedAnimation + && widget.turns.value == 0.0 + && widget.turns.status == AnimationStatus.forward + ), findsOneWidget); + + await tester.pump(); + await tester.pump(const Duration(seconds: 3)); + await tester.pump(); + + expect( + find.byWidgetPredicate((Widget widget) => widget is RotationTransition + && widget.turns is CurvedAnimation + && (widget.turns as CurvedAnimation).parent is AnimationController + && ((widget.turns as CurvedAnimation).parent as AnimationController).value == 0.5 + && widget.turns.status == AnimationStatus.reverse + ), findsOneWidget); + }); +} diff --git a/examples/api/test/widgets/transitions/scale_transition.0_test.dart b/examples/api/test/widgets/transitions/scale_transition.0_test.dart new file mode 100644 index 0000000000000..785058ed3c7cd --- /dev/null +++ b/examples/api/test/widgets/transitions/scale_transition.0_test.dart @@ -0,0 +1,47 @@ +// 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/widgets/transitions/scale_transition.0.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Shows flutter logo in transition', (WidgetTester tester) async { + await tester.pumpWidget(const example.ScaleTransitionExampleApp()); + expect(find.byType(FlutterLogo), findsOneWidget); + expect(find.byType(Center), findsOneWidget); + expect(find.descendant( + of: find.byType(Center), + matching: find.byType(ScaleTransition) + ), findsOneWidget); + expect( + find.byWidgetPredicate((Widget widget) => widget is ScaleTransition + && widget.scale is CurvedAnimation + && (widget.scale as CurvedAnimation).curve == Curves.fastOutSlowIn, + ), findsOneWidget); + }); + + testWidgets('Scales every 2 seconds', (WidgetTester tester) async { + await tester.pumpWidget(const example.ScaleTransitionExampleApp()); + final Finder transformFinder = find.descendant( + of: find.byType(Center), + matching: find.byType(Transform) + ); + + Transform transform = tester.widget(transformFinder); + expect(transform.transform[0], 0); + + await tester.pump(const Duration(seconds: 2)); + await tester.pump(); + + transform = tester.widget(transformFinder); + expect(transform.transform[0], 1.0); + + await tester.pump(const Duration(seconds: 2)); + await tester.pump(); + + transform = tester.widget(transformFinder); + expect(transform.transform[0], 0); + }); +} diff --git a/examples/api/test/widgets/transitions/size_transition.0_test.dart b/examples/api/test/widgets/transitions/size_transition.0_test.dart new file mode 100644 index 0000000000000..d3228e20db9fe --- /dev/null +++ b/examples/api/test/widgets/transitions/size_transition.0_test.dart @@ -0,0 +1,32 @@ +// 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/widgets/transitions/size_transition.0.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Shows flutter logo in transition', (WidgetTester tester) async { + await tester.pumpWidget(const example.SizeTransitionExampleApp()); + expect(find.byType(FlutterLogo), findsOneWidget); + expect(find.byType(Center), findsOneWidget); + expect(find.descendant( + of: find.byType(Center), + matching: find.byType(FlutterLogo) + ), findsOneWidget); + expect(find.byType(SizeTransition), findsOneWidget); + + expect( + tester.widget(find.byType(SizeTransition)), + isA() + .having((SizeTransition transition) => transition.axis, 'axis', Axis.horizontal) + .having((SizeTransition transition) => transition.axisAlignment, 'axis alignment', -1) + .having((SizeTransition transition) => transition.sizeFactor, 'factor', isA() + .having((CurvedAnimation animation) => animation.curve, 'curve', Curves.fastOutSlowIn) + .having((CurvedAnimation animation) => animation.parent, 'paren', isA() + .having((AnimationController controller) => controller.duration, 'duration', const Duration(seconds: 3))) + ) + ); + }); +} diff --git a/examples/api/test/widgets/transitions/slide_transition.0_test.dart b/examples/api/test/widgets/transitions/slide_transition.0_test.dart new file mode 100644 index 0000000000000..a637caca8a531 --- /dev/null +++ b/examples/api/test/widgets/transitions/slide_transition.0_test.dart @@ -0,0 +1,44 @@ +// 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/widgets/transitions/slide_transition.0.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Shows flutter logo in transition', (WidgetTester tester) async { + await tester.pumpWidget(const example.SlideTransitionExampleApp()); + expect(find.text('SlideTransition Sample'), findsOneWidget); + expect(find.byType(Center), findsOneWidget); + expect(find.byType(FlutterLogo), findsOneWidget); + expect(find.byType(Padding), findsAtLeast(1)); + expect(find.byType(SlideTransition), findsOneWidget); + }); + + testWidgets('Animates repeatedly every 2 seconds', (WidgetTester tester) async { + await tester.pumpWidget(const example.SlideTransitionExampleApp()); + + expect( + tester.getCenter(find.byType(FlutterLogo)), + tester.getCenter(find.byType(Center)), + ); + + await tester.pump(const Duration(seconds: 2)); + await tester.pump(); + + final double width = tester.getSize(find.byType(FlutterLogo)).width + 2 * 8.0; + expect( + tester.getCenter(find.byType(FlutterLogo)).dx, + tester.getCenter(find.byType(Center)).dx + 1.5 * width, + ); + + await tester.pump(const Duration(seconds: 2)); + await tester.pump(); + + expect( + tester.getCenter(find.byType(FlutterLogo)), + tester.getCenter(find.byType(Center)), + ); + }); +} diff --git a/examples/api/test/widgets/transitions/sliver_fade_transition.0_test.dart b/examples/api/test/widgets/transitions/sliver_fade_transition.0_test.dart new file mode 100644 index 0000000000000..e766e3f96e209 --- /dev/null +++ b/examples/api/test/widgets/transitions/sliver_fade_transition.0_test.dart @@ -0,0 +1,44 @@ +// 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/rendering.dart'; +import 'package:flutter_api_samples/widgets/transitions/sliver_fade_transition.0.dart' as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Shows color list in transition', (WidgetTester tester) async { + await tester.pumpWidget(const example.SliverFadeTransitionExampleApp()); + expect(find.text('SliverFadeTransition Sample'), findsOneWidget); + expect(find.byType(SliverFadeTransition), findsOneWidget); + expect(find.byType(CustomScrollView), findsOneWidget); + expect(find.byWidgetPredicate( + (Widget widget) => widget is Container && + widget.color == Colors.indigo[200] + ), findsNWidgets(3)); + expect(find.byWidgetPredicate( + (Widget widget) => widget is Container && + widget.color == Colors.orange[200] + ), findsNWidgets(2)); + }); + + testWidgets('Animates repeatedly every second', (WidgetTester tester) async { + await tester.pumpWidget(const example.SliverFadeTransitionExampleApp()); + + expect( + tester.renderObject(find.byType(SliverFadeTransition)), + isA() + .having((RenderSliverAnimatedOpacity obj) => obj.opacity.value, 'opacity', 0.0) + ); + + await tester.pump(const Duration(seconds: 1)); + await tester.pump(); + + expect( + tester.renderObject(find.byType(SliverFadeTransition)), + isA() + .having((RenderSliverAnimatedOpacity obj) => obj.opacity.value, 'opacity', 1.0) + ); + }); +} diff --git a/examples/flutter_view/pubspec.yaml b/examples/flutter_view/pubspec.yaml index 6e4cab61adf84..fbd3743e3936e 100644 --- a/examples/flutter_view/pubspec.yaml +++ b/examples/flutter_view/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" flutter: @@ -19,4 +19,4 @@ flutter: assets: - assets/flutter-mark-square-64.png -# PUBSPEC CHECKSUM: edc2 +# PUBSPEC CHECKSUM: 17c3 diff --git a/examples/hello_world/pubspec.yaml b/examples/hello_world/pubspec.yaml index 8ec122f8ba016..3cca766cfa747 100644 --- a/examples/hello_world/pubspec.yaml +++ b/examples/hello_world/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -20,8 +20,8 @@ dev_dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -71,4 +71,4 @@ dev_dependencies: webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: b45a +# PUBSPEC CHECKSUM: 3b5d diff --git a/examples/image_list/pubspec.yaml b/examples/image_list/pubspec.yaml index cfbc66a6eacac..efe19f94f1b35 100644 --- a/examples/image_list/pubspec.yaml +++ b/examples/image_list/pubspec.yaml @@ -17,7 +17,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -57,4 +57,4 @@ flutter: assets: - images/coast.jpg -# PUBSPEC CHECKSUM: bb0d +# PUBSPEC CHECKSUM: 000e diff --git a/examples/layers/pubspec.yaml b/examples/layers/pubspec.yaml index d9d1e9673b04c..7c9274edd7a46 100644 --- a/examples/layers/pubspec.yaml +++ b/examples/layers/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -39,4 +39,4 @@ flutter: - services/data.json uses-material-design: true -# PUBSPEC CHECKSUM: 8b62 +# PUBSPEC CHECKSUM: cf63 diff --git a/examples/platform_channel/pubspec.yaml b/examples/platform_channel/pubspec.yaml index e611a9b17282d..798ef55256058 100644 --- a/examples/platform_channel/pubspec.yaml +++ b/examples/platform_channel/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -20,8 +20,8 @@ dev_dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -74,4 +74,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: b45a +# PUBSPEC CHECKSUM: 3b5d diff --git a/examples/platform_channel_swift/pubspec.yaml b/examples/platform_channel_swift/pubspec.yaml index 8b9372d1faa1b..8fe49f120b181 100644 --- a/examples/platform_channel_swift/pubspec.yaml +++ b/examples/platform_channel_swift/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -20,8 +20,8 @@ dev_dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -74,4 +74,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: b45a +# PUBSPEC CHECKSUM: 3b5d diff --git a/examples/platform_view/pubspec.yaml b/examples/platform_view/pubspec.yaml index 02699b7036424..60ad90f829077 100644 --- a/examples/platform_view/pubspec.yaml +++ b/examples/platform_view/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" flutter: @@ -19,4 +19,4 @@ flutter: assets: - assets/flutter-mark-square-64.png -# PUBSPEC CHECKSUM: edc2 +# PUBSPEC CHECKSUM: 17c3 diff --git a/examples/splash/pubspec.yaml b/examples/splash/pubspec.yaml index c58b773c8ff33..6514bfb4a48ea 100644 --- a/examples/splash/pubspec.yaml +++ b/examples/splash/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -34,4 +34,4 @@ dev_dependencies: test_api: 0.7.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 14.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 8b62 +# PUBSPEC CHECKSUM: cf63 diff --git a/examples/texture/pubspec.yaml b/examples/texture/pubspec.yaml index 03447f8a8f7ea..201fd2dc3088b 100644 --- a/examples/texture/pubspec.yaml +++ b/examples/texture/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -18,8 +18,8 @@ dev_dependencies: sdk: flutter test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -67,4 +67,4 @@ dev_dependencies: webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 1f14 +# PUBSPEC CHECKSUM: e417 diff --git a/packages/flutter/lib/painting.dart b/packages/flutter/lib/painting.dart index 2fa89c23cf8bc..b5d55b5b89bbe 100644 --- a/packages/flutter/lib/painting.dart +++ b/packages/flutter/lib/painting.dart @@ -17,7 +17,7 @@ /// painting boxes. library painting; -export 'dart:ui' show PlaceholderAlignment, Shadow, TextHeightBehavior, TextLeadingDistribution; +export 'dart:ui' show PlaceholderAlignment, Shadow, TextHeightBehavior, TextLeadingDistribution, kTextHeightNone; export 'src/painting/alignment.dart'; export 'src/painting/basic_types.dart'; diff --git a/packages/flutter/lib/src/cupertino/date_picker.dart b/packages/flutter/lib/src/cupertino/date_picker.dart index ff4c5349cde56..76266b3817abe 100644 --- a/packages/flutter/lib/src/cupertino/date_picker.dart +++ b/packages/flutter/lib/src/cupertino/date_picker.dart @@ -70,6 +70,10 @@ const Widget _startSelectionOverlay = CupertinoPickerDefaultSelectionOverlay(cap const Widget _centerSelectionOverlay = CupertinoPickerDefaultSelectionOverlay(capStartEdge: false, capEndEdge: false); const Widget _endSelectionOverlay = CupertinoPickerDefaultSelectionOverlay(capStartEdge: false); +/// Defines a function signature for creating a widget that serves as a selection overlay, +/// given the current context, the selected item's index, and the total number of columns. +typedef SelectionOverlayBuilder = Widget? Function(BuildContext context, { required int columnCount, required int selectedIndex }); + // Lays out the date picker based on how much space each single column needs. // // Each column is a child of this delegate, indexed from 0 to number of columns - 1. @@ -291,6 +295,7 @@ class CupertinoDatePicker extends StatefulWidget { this.backgroundColor, this.showDayOfWeek = false, this.itemExtent = _kItemExtent, + this.selectionOverlayBuilder, }) : initialDateTime = initialDateTime ?? DateTime.now(), assert( itemExtent > 0, @@ -413,6 +418,48 @@ class CupertinoDatePicker extends StatefulWidget { /// Defaults to a value that matches the default iOS date picker wheel. final double itemExtent; + /// A function that returns a widget that is overlaid on the picker + /// to highlight the currently selected entry. + /// + /// If unspecified, it defaults to a [CupertinoPickerDefaultSelectionOverlay] + /// which is a gray rounded rectangle overlay in iOS 14 style. + /// + /// If the selection overlay builder returns null, no overlay will be drawn. + /// + /// {@tool snippet} + /// + /// This example shows how to recreate the default selection overlay + /// with selectionOverlayBuilder. + /// + /// ```dart + /// CupertinoDatePicker( + /// onDateTimeChanged: (DateTime newDateTime) {}, + /// mode: CupertinoDatePickerMode.date, + /// initialDateTime: DateTime(2018, 9, 15), + /// selectionOverlayBuilder: ( + /// BuildContext context, { + /// required int selectedIndex, + /// required int columnCount, + /// }) { + /// if (selectedIndex == 0) { + /// return const CupertinoPickerDefaultSelectionOverlay( + /// capEndEdge: false, + /// ); + /// } else if (selectedIndex == columnCount - 1) { + /// return const CupertinoPickerDefaultSelectionOverlay( + /// capStartEdge: false, + /// ); + /// } + /// return const CupertinoPickerDefaultSelectionOverlay( + /// capStartEdge: false, + /// capEndEdge: false, + /// ); + /// }, + /// ) + /// ``` + /// {@end-tool} + final SelectionOverlayBuilder? selectionOverlayBuilder; + @override State createState() { // ignore: no_logic_in_create_state, https://github.com/flutter/flutter/issues/70499 @@ -511,7 +558,7 @@ class CupertinoDatePicker extends StatefulWidget { } } -typedef _ColumnBuilder = Widget Function(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget selectionOverlay); +typedef _ColumnBuilder = Widget Function(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget? selectionOverlay); class _CupertinoDatePickerDateTimeState extends State { // Fraction of the farthest column's vanishing point vs its width. Eyeballed @@ -716,7 +763,7 @@ class _CupertinoDatePickerDateTimeState extends State { } // Builds the date column. The date is displayed in medium date format (e.g. Fri Aug 31). - Widget _buildMediumDatePicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget selectionOverlay) { + Widget _buildMediumDatePicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget? selectionOverlay) { return NotificationListener( onNotification: (ScrollNotification notification) { if (notification is ScrollStartNotification) { @@ -794,7 +841,7 @@ class _CupertinoDatePickerDateTimeState extends State { && !(widget.maximumDate?.isBefore(rangeStart) ?? false); } - Widget _buildHourPicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget selectionOverlay) { + Widget _buildHourPicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget? selectionOverlay) { return NotificationListener( onNotification: (ScrollNotification notification) { if (notification is ScrollStartNotification) { @@ -859,7 +906,7 @@ class _CupertinoDatePickerDateTimeState extends State { ); } - Widget _buildMinutePicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget selectionOverlay) { + Widget _buildMinutePicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget? selectionOverlay) { return NotificationListener( onNotification: (ScrollNotification notification) { if (notification is ScrollStartNotification) { @@ -909,7 +956,7 @@ class _CupertinoDatePickerDateTimeState extends State { ); } - Widget _buildAmPmPicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget selectionOverlay) { + Widget _buildAmPmPicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget? selectionOverlay) { return NotificationListener( onNotification: (ScrollNotification notification) { if (notification is ScrollStartNotification) { @@ -1053,10 +1100,21 @@ class _CupertinoDatePickerDateTimeState extends State { for (final (int i, double width) in columnWidths.indexed) { final (bool firstColumn, bool lastColumn) = (i == 0, i == columnWidths.length - 1); double offAxisFraction = 0.0; - Widget selectionOverlay = _centerSelectionOverlay; + Widget? selectionOverlay = _centerSelectionOverlay; + + if (widget.selectionOverlayBuilder != null) { + selectionOverlay = + widget.selectionOverlayBuilder!(context, selectedIndex: i, columnCount: columnWidths.length); + } else { + if (firstColumn) { + selectionOverlay = _startSelectionOverlay; + } else if (lastColumn) { + selectionOverlay = _endSelectionOverlay; + } + } + if (firstColumn) { offAxisFraction = -_kMaximumOffAxisFraction * textDirectionFactor; - selectionOverlay = _startSelectionOverlay; } else if (i >= 2 || columnWidths.length == 2) { offAxisFraction = _kMaximumOffAxisFraction * textDirectionFactor; } @@ -1064,7 +1122,6 @@ class _CupertinoDatePickerDateTimeState extends State { EdgeInsets padding = const EdgeInsets.only(right: _kDatePickerPadSize); if (lastColumn) { padding = padding.flipped; - selectionOverlay = _endSelectionOverlay; } if (textDirectionFactor == -1) { padding = padding.flipped; @@ -1204,7 +1261,7 @@ class _CupertinoDatePickerDateState extends State { // Let `DateTime` handle the year/month overflow. DateTime _lastDayInMonth(int year, int month) => DateTime(year, month + 1, 0); - Widget _buildDayPicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget selectionOverlay) { + Widget _buildDayPicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget? selectionOverlay) { final int daysInCurrentMonth = _lastDayInMonth(selectedYear, selectedMonth).day; return NotificationListener( onNotification: (ScrollNotification notification) { @@ -1255,7 +1312,7 @@ class _CupertinoDatePickerDateState extends State { ); } - Widget _buildMonthPicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget selectionOverlay) { + Widget _buildMonthPicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget? selectionOverlay) { return NotificationListener( onNotification: (ScrollNotification notification) { if (notification is ScrollStartNotification) { @@ -1301,7 +1358,7 @@ class _CupertinoDatePickerDateState extends State { ); } - Widget _buildYearPicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget selectionOverlay) { + Widget _buildYearPicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget? selectionOverlay) { return NotificationListener( onNotification: (ScrollNotification notification) { if (notification is ScrollStartNotification) { @@ -1462,13 +1519,20 @@ class _CupertinoDatePickerDateState extends State { padding = const EdgeInsets.only(left: _kDatePickerPadSize); } - Widget selectionOverlay = _centerSelectionOverlay; - if (firstColumn) { - selectionOverlay = _startSelectionOverlay; - } else if (i == columnWidths.length - 1) { - selectionOverlay = _endSelectionOverlay; + Widget? selectionOverlay = _centerSelectionOverlay; + + if (widget.selectionOverlayBuilder != null) { + selectionOverlay = + widget.selectionOverlayBuilder!(context, selectedIndex: i, columnCount: columnWidths.length); + } else { + if (firstColumn) { + selectionOverlay = _startSelectionOverlay; + } else if (lastColumn) { + selectionOverlay = _endSelectionOverlay; + } } + totalColumnWidths += width + (2 * _kDatePickerPadSize); pickers.add(LayoutId( @@ -1593,7 +1657,7 @@ class _CupertinoDatePickerMonthYearState extends State { estimatedColumnWidths[_PickerColumnType.year.index] = CupertinoDatePicker._getColumnWidth(_PickerColumnType.year, localizations, context, false); } - Widget _buildMonthPicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget selectionOverlay) { + Widget _buildMonthPicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget? selectionOverlay) { return NotificationListener( onNotification: (ScrollNotification notification) { if (notification is ScrollStartNotification) { @@ -1639,7 +1703,7 @@ class _CupertinoDatePickerMonthYearState extends State { ); } - Widget _buildYearPicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget selectionOverlay) { + Widget _buildYearPicker(double offAxisFraction, TransitionBuilder itemPositioningBuilder, Widget? selectionOverlay) { return NotificationListener( onNotification: (ScrollNotification notification) { if (notification is ScrollStartNotification) { @@ -1772,6 +1836,19 @@ class _CupertinoDatePickerMonthYearState extends State { totalColumnWidths += width + (2 * _kDatePickerPadSize); + Widget? selectionOverlay = _centerSelectionOverlay; + + if (widget.selectionOverlayBuilder != null) { + selectionOverlay = + widget.selectionOverlayBuilder!(context, selectedIndex: i, columnCount: columnWidths.length); + } else { + if (firstColumn) { + selectionOverlay = _startSelectionOverlay; + } else if (lastColumn) { + selectionOverlay = _endSelectionOverlay; + } + } + pickers.add(LayoutId( id: i, child: pickerBuilders[i]( @@ -1797,11 +1874,7 @@ class _CupertinoDatePickerMonthYearState extends State { child: contents, ); }, - switch (lastColumn) { - _ when firstColumn => _startSelectionOverlay, - false => _centerSelectionOverlay, - true => _endSelectionOverlay, - }, + selectionOverlay, ), )); } @@ -1912,6 +1985,7 @@ class CupertinoTimerPicker extends StatefulWidget { this.backgroundColor, this.itemExtent = _kItemExtent, required this.onTimerDurationChanged, + this.selectionOverlayBuilder, }) : assert(initialTimerDuration >= Duration.zero), assert(initialTimerDuration < const Duration(days: 1)), assert(minuteInterval > 0 && 60 % minuteInterval == 0), @@ -1955,6 +2029,46 @@ class CupertinoTimerPicker extends StatefulWidget { /// Defaults to a value that matches the default iOS timer picker wheel. final double itemExtent; + /// A function that returns a widget that is overlaid on the picker + /// to highlight the currently selected entry. + /// + /// If unspecified, it defaults to a [CupertinoPickerDefaultSelectionOverlay] + /// which is a gray rounded rectangle overlay in iOS 14 style. + /// + /// If the selection overlay builder returns null, no overlay will be drawn. + /// + /// {@tool snippet} + /// + /// This example shows how to recreate the default selection overlay + /// with selectionOverlayBuilder. + /// + /// ```dart + /// CupertinoTimerPicker( + /// onTimerDurationChanged: (Duration newDateTime) {}, + /// selectionOverlayBuilder: ( + /// BuildContext context, { + /// required int selectedIndex, + /// required int columnCount, + /// }) { + /// if (selectedIndex == 0) { + /// return const CupertinoPickerDefaultSelectionOverlay( + /// capEndEdge: false, + /// ); + /// } else if (selectedIndex == columnCount - 1) { + /// return const CupertinoPickerDefaultSelectionOverlay( + /// capStartEdge: false, + /// ); + /// } + /// return const CupertinoPickerDefaultSelectionOverlay( + /// capStartEdge: false, + /// capEndEdge: false, + /// ); + /// }, + /// ) + /// ``` + /// {@end-tool} + final SelectionOverlayBuilder? selectionOverlayBuilder; + @override State createState() => _CupertinoTimerPickerState(); } @@ -2182,7 +2296,7 @@ class _CupertinoTimerPickerState extends State { ); } - Widget _buildHourPicker(EdgeInsetsDirectional additionalPadding, Widget selectionOverlay) { + Widget _buildHourPicker(EdgeInsetsDirectional additionalPadding, Widget? selectionOverlay) { _hourScrollController ??= FixedExtentScrollController( initialItem: selectedHour! ); @@ -2221,7 +2335,7 @@ class _CupertinoTimerPickerState extends State { ); } - Widget _buildHourColumn(EdgeInsetsDirectional additionalPadding, Widget selectionOverlay) { + Widget _buildHourColumn(EdgeInsetsDirectional additionalPadding, Widget? selectionOverlay) { additionalPadding = EdgeInsetsDirectional.only( start: math.max(additionalPadding.start, 0), end: math.max(additionalPadding.end, 0), @@ -2244,7 +2358,7 @@ class _CupertinoTimerPickerState extends State { ); } - Widget _buildMinutePicker(EdgeInsetsDirectional additionalPadding, Widget selectionOverlay) { + Widget _buildMinutePicker(EdgeInsetsDirectional additionalPadding, Widget? selectionOverlay) { _minuteScrollController ??= FixedExtentScrollController( initialItem: selectedMinute ~/ widget.minuteInterval, ); @@ -2288,7 +2402,7 @@ class _CupertinoTimerPickerState extends State { ); } - Widget _buildMinuteColumn(EdgeInsetsDirectional additionalPadding, Widget selectionOverlay) { + Widget _buildMinuteColumn(EdgeInsetsDirectional additionalPadding, Widget? selectionOverlay) { additionalPadding = EdgeInsetsDirectional.only( start: math.max(additionalPadding.start, 0), end: math.max(additionalPadding.end, 0), @@ -2311,7 +2425,7 @@ class _CupertinoTimerPickerState extends State { ); } - Widget _buildSecondPicker(EdgeInsetsDirectional additionalPadding, Widget selectionOverlay) { + Widget _buildSecondPicker(EdgeInsetsDirectional additionalPadding, Widget? selectionOverlay) { _secondScrollController ??= FixedExtentScrollController( initialItem: selectedSecond! ~/ widget.secondInterval, ); @@ -2355,7 +2469,7 @@ class _CupertinoTimerPickerState extends State { ); } - Widget _buildSecondColumn(EdgeInsetsDirectional additionalPadding, Widget selectionOverlay) { + Widget _buildSecondColumn(EdgeInsetsDirectional additionalPadding, Widget? selectionOverlay) { additionalPadding = EdgeInsetsDirectional.only( start: math.max(additionalPadding.start, 0), end: math.max(additionalPadding.end, 0), @@ -2447,20 +2561,30 @@ class _CupertinoTimerPickerState extends State { minuteColumnEndPadding = _kTimerPickerMinHorizontalPadding; } + Widget? hourSelectionOverlay = _startSelectionOverlay; + Widget? minuteSelectionOverlay = _endSelectionOverlay; + + if (widget.selectionOverlayBuilder != null) { + hourSelectionOverlay = + widget.selectionOverlayBuilder!(context, selectedIndex: 0, columnCount: 2); + minuteSelectionOverlay = + widget.selectionOverlayBuilder!(context, selectedIndex: 1, columnCount: 2); + } + columns = [ _buildHourColumn( EdgeInsetsDirectional.only( start: hourColumnStartPadding, end: pickerColumnWidth - hourColumnStartPadding - hourLabelContentWidth, ), - _startSelectionOverlay, + hourSelectionOverlay, ), _buildMinuteColumn( EdgeInsetsDirectional.only( start: pickerColumnWidth - minuteColumnEndPadding - minuteLabelContentWidth, end: minuteColumnEndPadding, ), - _endSelectionOverlay, + minuteSelectionOverlay, ), ]; case CupertinoTimerPickerMode.ms: @@ -2477,20 +2601,30 @@ class _CupertinoTimerPickerState extends State { minuteColumnStartPadding = _kTimerPickerMinHorizontalPadding; } + Widget? minuteSelectionOverlay = _startSelectionOverlay; + Widget? secondSelectionOverlay = _endSelectionOverlay; + + if (widget.selectionOverlayBuilder != null) { + minuteSelectionOverlay = + widget.selectionOverlayBuilder!(context, selectedIndex: 0, columnCount: 2); + secondSelectionOverlay = + widget.selectionOverlayBuilder!(context, selectedIndex: 1, columnCount: 2); + } + columns = [ _buildMinuteColumn( EdgeInsetsDirectional.only( start: minuteColumnStartPadding, end: pickerColumnWidth - minuteColumnStartPadding - minuteLabelContentWidth, ), - _startSelectionOverlay, + minuteSelectionOverlay, ), _buildSecondColumn( EdgeInsetsDirectional.only( start: pickerColumnWidth - secondColumnEndPadding - minuteLabelContentWidth, end: secondColumnEndPadding, ), - _endSelectionOverlay, + secondSelectionOverlay, ), ]; case CupertinoTimerPickerMode.hms: @@ -2501,27 +2635,41 @@ class _CupertinoTimerPickerState extends State { final double secondColumnStartPadding = pickerColumnWidth - baseLabelContentWidth - secondLabelWidth - _kTimerPickerMinHorizontalPadding; + + Widget? hourSelectionOverlay = _startSelectionOverlay; + Widget? minuteSelectionOverlay = _centerSelectionOverlay; + Widget? secondSelectionOverlay = _endSelectionOverlay; + + if (widget.selectionOverlayBuilder != null) { + hourSelectionOverlay = + widget.selectionOverlayBuilder!(context, selectedIndex: 0, columnCount: 3); + minuteSelectionOverlay = + widget.selectionOverlayBuilder!(context, selectedIndex: 1, columnCount: 3); + secondSelectionOverlay = + widget.selectionOverlayBuilder!(context, selectedIndex: 2, columnCount: 3); + } + columns = [ _buildHourColumn( EdgeInsetsDirectional.only( start: _kTimerPickerMinHorizontalPadding, end: math.max(hourColumnEndPadding, 0), ), - _startSelectionOverlay, + hourSelectionOverlay, ), _buildMinuteColumn( EdgeInsetsDirectional.only( start: minuteColumnPadding, end: minuteColumnPadding, ), - _centerSelectionOverlay, + minuteSelectionOverlay, ), _buildSecondColumn( EdgeInsetsDirectional.only( start: math.max(secondColumnStartPadding, 0), end: _kTimerPickerMinHorizontalPadding, ), - _endSelectionOverlay, + secondSelectionOverlay, ), ]; } diff --git a/packages/flutter/lib/src/cupertino/route.dart b/packages/flutter/lib/src/cupertino/route.dart index 5c622a69fbaef..eb96c18ca9ad6 100644 --- a/packages/flutter/lib/src/cupertino/route.dart +++ b/packages/flutter/lib/src/cupertino/route.dart @@ -1245,23 +1245,7 @@ final Animatable _dialogScaleTween = Tween(begin: 1.3, end: 1.0) .chain(CurveTween(curve: Curves.linearToEaseOut)); Widget _buildCupertinoDialogTransitions(BuildContext context, Animation animation, Animation secondaryAnimation, Widget child) { - final CurvedAnimation fadeAnimation = CurvedAnimation( - parent: animation, - curve: Curves.easeInOut, - ); - if (animation.status == AnimationStatus.reverse) { - return FadeTransition( - opacity: fadeAnimation, - child: child, - ); - } - return FadeTransition( - opacity: fadeAnimation, - child: ScaleTransition( - scale: animation.drive(_dialogScaleTween), - child: child, - ), - ); + return child; } /// Displays an iOS-style dialog above the current contents of the app, with @@ -1388,14 +1372,58 @@ class CupertinoDialogRoute extends RawDialogRoute { String? barrierLabel, // This transition duration was eyeballed comparing with iOS super.transitionDuration = const Duration(milliseconds: 250), - super.transitionBuilder = _buildCupertinoDialogTransitions, + this.transitionBuilder, super.settings, super.anchorPoint, }) : super( pageBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation) { return builder(context); }, + transitionBuilder: transitionBuilder ?? _buildCupertinoDialogTransitions, barrierLabel: barrierLabel ?? CupertinoLocalizations.of(context).modalBarrierDismissLabel, barrierColor: barrierColor ?? CupertinoDynamicColor.resolve(kCupertinoModalBarrierColor, context), ); + + /// Custom transition builder + RouteTransitionsBuilder? transitionBuilder; + + CurvedAnimation? _fadeAnimation; + + @override + Widget buildTransitions(BuildContext context, Animation animation, Animation secondaryAnimation, Widget child) { + + if (transitionBuilder != null) { + return super.buildTransitions(context, animation, secondaryAnimation, child); + } + + if (_fadeAnimation?.parent != animation) { + _fadeAnimation?.dispose(); + _fadeAnimation = CurvedAnimation( + parent: animation, + curve: Curves.easeInOut, + ); + } + + final CurvedAnimation fadeAnimation = _fadeAnimation!; + + if (animation.status == AnimationStatus.reverse) { + return FadeTransition( + opacity: fadeAnimation, + child: super.buildTransitions(context, animation, secondaryAnimation, child), + ); + } + return FadeTransition( + opacity: fadeAnimation, + child: ScaleTransition( + scale: animation.drive(_dialogScaleTween), + child: super.buildTransitions(context, animation, secondaryAnimation, child), + ), + ); + } + + @override + void dispose() { + _fadeAnimation?.dispose(); + super.dispose(); + } } diff --git a/packages/flutter/lib/src/cupertino/text_field.dart b/packages/flutter/lib/src/cupertino/text_field.dart index 9948bd96d98a1..4f657b67ae881 100644 --- a/packages/flutter/lib/src/cupertino/text_field.dart +++ b/packages/flutter/lib/src/cupertino/text_field.dart @@ -221,6 +221,7 @@ class CupertinoTextField extends StatefulWidget { /// characters" and how it may differ from the intuitive meaning. const CupertinoTextField({ super.key, + this.groupId = EditableText, this.controller, this.focusNode, this.undoController, @@ -351,6 +352,7 @@ class CupertinoTextField extends StatefulWidget { /// characters" and how it may differ from the intuitive meaning. const CupertinoTextField.borderless({ super.key, + this.groupId = EditableText, this.controller, this.focusNode, this.undoController, @@ -446,6 +448,9 @@ class CupertinoTextField extends StatefulWidget { keyboardType = keyboardType ?? (maxLines == 1 ? TextInputType.text : TextInputType.multiline), enableInteractiveSelection = enableInteractiveSelection ?? (!readOnly || !obscureText); + /// {@macro flutter.widgets.editableText.groupId} + final Object groupId; + /// Controls the text being edited. /// /// If null, this widget will create its own [TextEditingController]. @@ -1387,6 +1392,7 @@ class _CupertinoTextFieldState extends State with Restoratio selectionColor: _effectiveFocusNode.hasFocus ? selectionColor : null, selectionControls: widget.selectionEnabled ? textSelectionControls : null, + groupId: widget.groupId, onChanged: widget.onChanged, onSelectionChanged: _handleSelectionChanged, onEditingComplete: widget.onEditingComplete, diff --git a/packages/flutter/lib/src/material/action_buttons.dart b/packages/flutter/lib/src/material/action_buttons.dart index c417bfb2e19fc..9af90b6025c40 100644 --- a/packages/flutter/lib/src/material/action_buttons.dart +++ b/packages/flutter/lib/src/material/action_buttons.dart @@ -179,7 +179,7 @@ class BackButtonIcon extends StatelessWidget { /// will override [color] for states where [ButtonStyle.foregroundColor] resolves to non-null. /// /// When deciding to display a [BackButton], consider using -/// `ModalRoute.of(context)?.canPop` to check whether the current route can be +/// `ModalRoute.canPopOf(context)` to check whether the current route can be /// popped. If that value is false (e.g., because the current route is the /// initial route), the [BackButton] will not have any effect when pressed, /// which could frustrate the user. diff --git a/packages/flutter/lib/src/material/input_decorator.dart b/packages/flutter/lib/src/material/input_decorator.dart index f69ef7a9aa3b7..1e2642533eeaa 100644 --- a/packages/flutter/lib/src/material/input_decorator.dart +++ b/packages/flutter/lib/src/material/input_decorator.dart @@ -4570,7 +4570,7 @@ class _InputDecoratorDefaultsM2 extends InputDecorationTheme { @override TextStyle? get helperStyle => MaterialStateTextStyle.resolveWith((Set states) { - final ThemeData themeData= Theme.of(context); + final ThemeData themeData = Theme.of(context); if (states.contains(MaterialState.disabled)) { return themeData.textTheme.bodySmall!.copyWith(color: Colors.transparent); } @@ -4580,7 +4580,7 @@ class _InputDecoratorDefaultsM2 extends InputDecorationTheme { @override TextStyle? get errorStyle => MaterialStateTextStyle.resolveWith((Set states) { - final ThemeData themeData= Theme.of(context); + final ThemeData themeData = Theme.of(context); if (states.contains(MaterialState.disabled)) { return themeData.textTheme.bodySmall!.copyWith(color: Colors.transparent); } @@ -4630,6 +4630,9 @@ class _InputDecoratorDefaultsM2 extends InputDecorationTheme { if (states.contains(MaterialState.disabled) && !states.contains(MaterialState.focused)) { return Theme.of(context).disabledColor; } + if (states.contains(MaterialState.error)) { + return Theme.of(context).colorScheme.error; + } if (states.contains(MaterialState.focused)) { return Theme.of(context).colorScheme.primary; } diff --git a/packages/flutter/lib/src/material/popup_menu.dart b/packages/flutter/lib/src/material/popup_menu.dart index d16e0aacfba9a..dc0d4d5c019ea 100644 --- a/packages/flutter/lib/src/material/popup_menu.dart +++ b/packages/flutter/lib/src/material/popup_menu.dart @@ -1439,7 +1439,10 @@ class PopupMenuButtonState extends State> { void showButtonMenu() { final PopupMenuThemeData popupMenuTheme = PopupMenuTheme.of(context); final RenderBox button = context.findRenderObject()! as RenderBox; - final RenderBox overlay = Navigator.of(context).overlay!.context.findRenderObject()! as RenderBox; + final RenderBox overlay = Navigator.of( + context, + rootNavigator: widget.useRootNavigator, + ).overlay!.context.findRenderObject()! as RenderBox; final PopupMenuPosition popupMenuPosition = widget.position ?? popupMenuTheme.position ?? PopupMenuPosition.over; late Offset offset; switch (popupMenuPosition) { diff --git a/packages/flutter/lib/src/material/progress_indicator.dart b/packages/flutter/lib/src/material/progress_indicator.dart index a2ca5fb04bea0..6736e4f969237 100644 --- a/packages/flutter/lib/src/material/progress_indicator.dart +++ b/packages/flutter/lib/src/material/progress_indicator.dart @@ -566,11 +566,11 @@ class CircularProgressIndicator extends ProgressIndicator { }) : _indicatorType = _ActivityIndicatorType.material; /// Creates an adaptive progress indicator that is a - /// [CupertinoActivityIndicator] in iOS and [CircularProgressIndicator] in - /// material theme/non-iOS. + /// [CupertinoActivityIndicator] in [TargetPlatform.iOS] & [TargetPlatform.macOS] and [CircularProgressIndicator] in + /// material theme/non-Apple platforms. /// /// The [value], [valueColor], [strokeWidth], [semanticsLabel], and - /// [semanticsValue] will be ignored in iOS. + /// [semanticsValue] will be ignored in iOS & macOS. /// /// {@macro flutter.material.ProgressIndicator.ProgressIndicator} const CircularProgressIndicator.adaptive({ diff --git a/packages/flutter/lib/src/material/search_anchor.dart b/packages/flutter/lib/src/material/search_anchor.dart index cd3ca13e37bad..94a36af30eec6 100644 --- a/packages/flutter/lib/src/material/search_anchor.dart +++ b/packages/flutter/lib/src/material/search_anchor.dart @@ -792,9 +792,15 @@ class _ViewContentState extends State<_ViewContent> { _timer?.cancel(); _timer = Timer(Duration.zero, () async { searchValue = _controller.text; - result = await widget.suggestionsBuilder(context, _controller); + final Iterable suggestions = + await widget.suggestionsBuilder(context, _controller); _timer?.cancel(); _timer = null; + if (mounted) { + setState(() { + result = suggestions; + }); + } }); } } diff --git a/packages/flutter/lib/src/material/slider.dart b/packages/flutter/lib/src/material/slider.dart index 31f4836c163f7..23cd273b1dbd7 100644 --- a/packages/flutter/lib/src/material/slider.dart +++ b/packages/flutter/lib/src/material/slider.dart @@ -817,6 +817,11 @@ class _SliderState extends State with TickerProviderStateMixin { ?? MaterialStateProperty.resolveAs(defaults.overlayColor, states); } + TextStyle valueIndicatorTextStyle = sliderTheme.valueIndicatorTextStyle ?? defaults.valueIndicatorTextStyle!; + if (MediaQuery.boldTextOf(context)) { + valueIndicatorTextStyle = valueIndicatorTextStyle.merge(const TextStyle(fontWeight: FontWeight.bold)); + } + sliderTheme = sliderTheme.copyWith( trackHeight: sliderTheme.trackHeight ?? defaults.trackHeight, activeTrackColor: widget.activeColor ?? sliderTheme.activeTrackColor ?? defaults.activeTrackColor, @@ -839,7 +844,7 @@ class _SliderState extends State with TickerProviderStateMixin { overlayShape: sliderTheme.overlayShape ?? defaultOverlayShape, valueIndicatorShape: valueIndicatorShape, showValueIndicator: sliderTheme.showValueIndicator ?? defaultShowValueIndicator, - valueIndicatorTextStyle: sliderTheme.valueIndicatorTextStyle ?? defaults.valueIndicatorTextStyle, + valueIndicatorTextStyle: valueIndicatorTextStyle, ); final MouseCursor effectiveMouseCursor = MaterialStateProperty.resolveAs(widget.mouseCursor, states) ?? sliderTheme.mouseCursor?.resolve(states) diff --git a/packages/flutter/lib/src/material/snack_bar.dart b/packages/flutter/lib/src/material/snack_bar.dart index b0a466ed8aaf9..dd6263f2d78cc 100644 --- a/packages/flutter/lib/src/material/snack_bar.dart +++ b/packages/flutter/lib/src/material/snack_bar.dart @@ -5,7 +5,6 @@ import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; -import 'button_style.dart'; import 'color_scheme.dart'; import 'colors.dart'; import 'icon_button.dart'; @@ -204,10 +203,11 @@ class _SnackBarActionState extends State { } return TextButton( - style: ButtonStyle( - foregroundColor: resolveForegroundColor(), - backgroundColor: resolveBackgroundColor(), - ), + style: TextButton.styleFrom(overlayColor: resolveForegroundColor()) + .copyWith( + foregroundColor: resolveForegroundColor(), + backgroundColor: resolveBackgroundColor(), + ), onPressed: _haveTriggeredAction ? null : _handlePressed, child: Text(widget.label), ); @@ -387,7 +387,8 @@ class SnackBar extends StatefulWidget { /// Defines how the snack bar area, including margin, will behave during hit testing. /// - /// If this property is null and [margin] is not null, then [HitTestBehavior.deferToChild] is used by default. + /// If this property is null, and [margin] is not null or [SnackBarThemeData.insetPadding] of + /// [ThemeData.snackBarTheme] is not null, then [HitTestBehavior.deferToChild] is used by default. /// /// Please refer to [HitTestBehavior] for a detailed explanation of every behavior. final HitTestBehavior? hitTestBehavior; @@ -671,9 +672,6 @@ class _SnackBarState extends State { final double actionHorizontalMargin = (widget.padding?.resolve(TextDirection.ltr).right ?? horizontalPadding) / 2; final double iconHorizontalMargin = (widget.padding?.resolve(TextDirection.ltr).right ?? horizontalPadding) / 12.0; - - - final IconButton? iconButton = showCloseIcon ? IconButton( icon: const Icon(Icons.close), @@ -818,7 +816,7 @@ class _SnackBarState extends State { key: const Key('dismissible'), direction: dismissDirection, resizeDuration: null, - behavior: widget.hitTestBehavior ?? (widget.margin != null ? HitTestBehavior.deferToChild : HitTestBehavior.opaque), + behavior: widget.hitTestBehavior ?? (widget.margin != null || snackBarTheme.insetPadding != null ? HitTestBehavior.deferToChild : HitTestBehavior.opaque), onDismissed: (DismissDirection direction) { ScaffoldMessenger.of(context).removeCurrentSnackBar(reason: SnackBarClosedReason.swipe); }, diff --git a/packages/flutter/lib/src/material/text_field.dart b/packages/flutter/lib/src/material/text_field.dart index d2c2ef0b7c02d..9a22c381a587e 100644 --- a/packages/flutter/lib/src/material/text_field.dart +++ b/packages/flutter/lib/src/material/text_field.dart @@ -259,6 +259,7 @@ class TextField extends StatefulWidget { /// characters" and how it may differ from the intuitive meaning. const TextField({ super.key, + this.groupId = EditableText, this.controller, this.focusNode, this.undoController, @@ -368,6 +369,9 @@ class TextField extends StatefulWidget { /// {@end-tool} final TextMagnifierConfiguration? magnifierConfiguration; + /// {@macro flutter.widgets.editableText.groupId} + final Object groupId; + /// Controls the text being edited. /// /// If null, this widget will create its own [TextEditingController]. @@ -1499,6 +1503,7 @@ class _TextFieldState extends State with RestorationMixin implements onEditingComplete: widget.onEditingComplete, onSubmitted: widget.onSubmitted, onAppPrivateCommand: widget.onAppPrivateCommand, + groupId: widget.groupId, onSelectionHandleTapped: _handleSelectionHandleTapped, onTapOutside: widget.onTapOutside, inputFormatters: formatters, diff --git a/packages/flutter/lib/src/material/text_form_field.dart b/packages/flutter/lib/src/material/text_form_field.dart index c9d8613adfe21..00566770e634d 100644 --- a/packages/flutter/lib/src/material/text_form_field.dart +++ b/packages/flutter/lib/src/material/text_form_field.dart @@ -101,6 +101,7 @@ class TextFormField extends FormField { /// and [TextField.new], the constructor. TextFormField({ super.key, + this.groupId = EditableText, this.controller, String? initialValue, FocusNode? focusNode, @@ -203,6 +204,7 @@ class TextFormField extends FormField { return UnmanagedRestorationScope( bucket: field.bucket, child: TextField( + groupId: groupId, restorationId: restorationId, controller: state._effectiveController, focusNode: focusNode, @@ -279,6 +281,9 @@ class TextFormField extends FormField { /// initialize its [TextEditingController.text] with [initialValue]. final TextEditingController? controller; + /// {@macro flutter.widgets.editableText.groupId} + final Object groupId; + /// {@template flutter.material.TextFormField.onChanged} /// Called when the user initiates a change to the TextField's /// value: when they have inserted or deleted text or reset the form. diff --git a/packages/flutter/lib/src/painting/text_style.dart b/packages/flutter/lib/src/painting/text_style.dart index 24de4a5bb4e7f..e03ea5b736af9 100644 --- a/packages/flutter/lib/src/painting/text_style.dart +++ b/packages/flutter/lib/src/painting/text_style.dart @@ -8,6 +8,7 @@ import 'dart:ui' as ui show Shadow, StrutStyle, TextStyle, + kTextHeightNone, lerpDouble; import 'package:flutter/foundation.dart'; @@ -640,14 +641,13 @@ class TextStyle with Diagnosticable { /// The height of this text span, as a multiple of the font size. /// - /// When [height] is null or omitted, the line height will be determined - /// by the font's metrics directly, which may differ from the fontSize. - /// When [height] is non-null, the line height of the span of text will be a - /// multiple of [fontSize] and be exactly `fontSize * height` logical pixels - /// tall. + /// When [height] is [kTextHeightNone], the line height will be determined by + /// the font's metrics directly, which may differ from the fontSize. Otherwise + /// the line height of the span of text will be a multiple of [fontSize], + /// and be exactly `fontSize * height` logical pixels tall. /// - /// For most fonts, setting [height] to 1.0 is not the same as omitting or - /// setting height to null because the [fontSize] sets the height of the EM-square, + /// For most fonts, setting [height] to 1.0 is not the same as setting height + /// to [kTextHeightNone] because the [fontSize] sets the height of the EM-square, /// which is different than the font provided metrics for line height. The /// following diagram illustrates the difference between the font-metrics /// defined line height and the line height produced with `height: 1.0` @@ -954,7 +954,8 @@ class TextStyle with Diagnosticable { /// [TextStyle] with a [FontWeight.w300]. /// /// If the underlying values are null, then the corresponding factors and/or - /// deltas must not be specified. + /// deltas must not be specified. Additionally, if [height] is [kTextHeightNone] + /// it will not be modified by this method. /// /// If [foreground] is specified on this object, then applying [color] here /// will have no effect and if [background] is specified on this object, then @@ -1014,7 +1015,7 @@ class TextStyle with Diagnosticable { letterSpacing: letterSpacing == null ? null : letterSpacing! * letterSpacingFactor + letterSpacingDelta, wordSpacing: wordSpacing == null ? null : wordSpacing! * wordSpacingFactor + wordSpacingDelta, textBaseline: textBaseline ?? this.textBaseline, - height: height == null ? null : height! * heightFactor + heightDelta, + height: (height == null || height == ui.kTextHeightNone) ? height : height! * heightFactor + heightDelta, leadingDistribution: leadingDistribution ?? this.leadingDistribution, locale: locale ?? this.locale, foreground: foreground, diff --git a/packages/flutter/lib/src/rendering/flex.dart b/packages/flutter/lib/src/rendering/flex.dart index 4726bd4f01e87..45de3a51d1405 100644 --- a/packages/flutter/lib/src/rendering/flex.dart +++ b/packages/flutter/lib/src/rendering/flex.dart @@ -308,6 +308,8 @@ enum CrossAxisAlignment { /// See also: /// /// * [RenderBox.getDistanceToBaseline], which defines the baseline of a box. + /// * [IgnoreBaseline], which can be used to ignore a child for the purpose of + /// baseline alignment. baseline; double _getChildCrossAxisOffset(double freeSpace, bool flipped) { @@ -821,13 +823,17 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin? fromPath; + // [target, ...., commonAncestorRenderObject], or null if `target` is the + // common ancestor. + List? toPath; + + RenderObject from = this; + RenderObject to = target ?? owner!.rootNode!; + + while (!identical(from, to)) { + final int fromDepth = from.depth; + final int toDepth = to.depth; + + if (fromDepth >= toDepth) { + final RenderObject fromParent = from.parent ?? (throw FlutterError('$target and $this are not in the same render tree.')); + (fromPath ??= [this]).add(fromParent); + from = fromParent; + } + if (fromDepth <= toDepth) { + final RenderObject toParent = to.parent ?? (throw FlutterError('$target and $this are not in the same render tree.')); + assert(target != null, '$this has a depth that is less than or equal to ${owner?.rootNode}'); + (toPath ??= [target!]).add(toParent); + to = toParent; + } + } + + Matrix4? fromTransform; + if (fromPath != null) { + assert(fromPath.length > 1); + fromTransform = Matrix4.identity(); + final int lastIndex = target == null ? fromPath.length - 2 : fromPath.length - 1; + for (int index = lastIndex; index > 0; index -= 1) { + fromPath[index].applyPaintTransform(fromPath[index - 1], fromTransform); } } - final List renderers = []; - for (RenderObject renderer = this; renderer != ancestor; renderer = renderer.parent!) { - renderers.add(renderer); - assert(renderer.parent != null); // Failed to find ancestor in parent chain. + if (toPath == null) { + return fromTransform ?? Matrix4.identity(); } - if (ancestorSpecified) { - renderers.add(ancestor!); + + assert(toPath.length > 1); + final Matrix4 toTransform = Matrix4.identity(); + for (int index = toPath.length - 1; index > 0; index -= 1) { + toPath[index].applyPaintTransform(toPath[index - 1], toTransform); } - final Matrix4 transform = Matrix4.identity(); - for (int index = renderers.length - 1; index > 0; index -= 1) { - renderers[index].applyPaintTransform(renderers[index - 1], transform); + if (toTransform.invert() == 0) { // If the matrix is singular then `invert()` doesn't do anything. + return Matrix4.zero(); } - return transform; + return (fromTransform?..multiply(toTransform)) ?? toTransform; } - /// Returns a rect in this object's coordinate system that describes /// the approximate bounding box of the clip rect that would be /// applied to the given child during the paint phase, if any. diff --git a/packages/flutter/lib/src/widgets/default_text_editing_shortcuts.dart b/packages/flutter/lib/src/widgets/default_text_editing_shortcuts.dart index 46ec7c22594ae..7670241a0e672 100644 --- a/packages/flutter/lib/src/widgets/default_text_editing_shortcuts.dart +++ b/packages/flutter/lib/src/widgets/default_text_editing_shortcuts.dart @@ -529,7 +529,20 @@ class DefaultTextEditingShortcuts extends StatelessWidget { Map? _getDisablingShortcut() { if (kIsWeb) { - return _webDisablingTextShortcuts; + switch (defaultTargetPlatform) { + case TargetPlatform.linux: + return { + ..._webDisablingTextShortcuts, + for (final ShortcutActivator activator in _linuxNumpadShortcuts.keys) + activator as SingleActivator: const DoNothingAndStopPropagationTextIntent(), + }; + case TargetPlatform.android: + case TargetPlatform.fuchsia: + case TargetPlatform.windows: + case TargetPlatform.iOS: + case TargetPlatform.macOS: + return _webDisablingTextShortcuts; + } } switch (defaultTargetPlatform) { case TargetPlatform.android: diff --git a/packages/flutter/lib/src/widgets/editable_text.dart b/packages/flutter/lib/src/widgets/editable_text.dart index 069230666e9f5..688b1095f4012 100644 --- a/packages/flutter/lib/src/widgets/editable_text.dart +++ b/packages/flutter/lib/src/widgets/editable_text.dart @@ -314,7 +314,7 @@ class TextEditingController extends ValueNotifier { /// If the new selection is outside the composing range, the composing range is /// cleared. set selection(TextSelection newSelection) { - if (!_isSelectionWithinTextBounds(newSelection)) { + if (text.length < newSelection.end || text.length < newSelection.start) { throw FlutterError('invalid text selection: $newSelection'); } final TextRange newComposing = _isSelectionWithinComposingRange(newSelection) ? value.composing : TextRange.empty; @@ -348,11 +348,6 @@ class TextEditingController extends ValueNotifier { value = value.copyWith(composing: TextRange.empty); } - /// Check that the [selection] is inside of the bounds of [text]. - bool _isSelectionWithinTextBounds(TextSelection selection) { - return selection.start <= text.length && selection.end <= text.length; - } - /// Check that the [selection] is inside of the composing range. bool _isSelectionWithinComposingRange(TextSelection selection) { return selection.start >= value.composing.start && selection.end <= value.composing.end; @@ -841,6 +836,7 @@ class EditableText extends StatefulWidget { this.onAppPrivateCommand, this.onSelectionChanged, this.onSelectionHandleTapped, + this.groupId = EditableText, this.onTapOutside, List? inputFormatters, this.mouseCursor, @@ -1470,6 +1466,19 @@ class EditableText extends StatefulWidget { /// {@macro flutter.widgets.SelectionOverlay.onSelectionHandleTapped} final VoidCallback? onSelectionHandleTapped; + /// {@template flutter.widgets.editableText.groupId} + /// The group identifier for the [TextFieldTapRegion] of this text field. + /// + /// Text fields with the same group identifier share the same tap region. + /// Defaults to the type of [EditableText]. + /// + /// See also: + /// + /// * [TextFieldTapRegion], to give a [groupId] to a widget that is to be + /// included in a [EditableText]'s tap region that has [groupId] set. + /// {@endtemplate} + final Object groupId; + /// {@template flutter.widgets.editableText.onTapOutside} /// Called for each tap that occurs outside of the[TextFieldTapRegion] group /// when the text field is focused. @@ -3939,7 +3948,8 @@ class EditableTextState extends State with AutomaticKeepAliveClien // We return early if the selection is not valid. This can happen when the // text of [EditableText] is updated at the same time as the selection is // changed by a gesture event. - if (!widget.controller._isSelectionWithinTextBounds(selection)) { + final String text = widget.controller.value.text; + if (text.length < selection.end || text.length < selection.start) { return; } @@ -4494,7 +4504,6 @@ class EditableTextState extends State with AutomaticKeepAliveClien Rect? composingRect = renderEditable.getRectForComposingRange(composingRange); // Send the caret location instead if there's no marked text yet. if (composingRect == null) { - assert(!composingRange.isValid || composingRange.isCollapsed); final int offset = composingRange.isValid ? composingRange.start : 0; composingRect = renderEditable.getLocalRectForCaret(TextPosition(offset: offset)); } @@ -5171,6 +5180,7 @@ class EditableTextState extends State with AutomaticKeepAliveClien compositeCallback: _compositeCallback, enabled: _hasInputConnection, child: TextFieldTapRegion( + groupId: widget.groupId, onTapOutside: _hasFocus ? widget.onTapOutside ?? _defaultOnTapOutside : null, debugLabel: kReleaseMode ? null : 'EditableText', child: MouseRegion( diff --git a/packages/flutter/lib/src/widgets/focus_manager.dart b/packages/flutter/lib/src/widgets/focus_manager.dart index f27293118f3b1..44f49601b007d 100644 --- a/packages/flutter/lib/src/widgets/focus_manager.dart +++ b/packages/flutter/lib/src/widgets/focus_manager.dart @@ -1532,19 +1532,29 @@ class FocusManager with DiagnosticableTreeMixin, ChangeNotifier { if (kFlutterMemoryAllocationsEnabled) { ChangeNotifier.maybeDispatchObjectCreation(this); } - if (kIsWeb || defaultTargetPlatform != TargetPlatform.android) { - // It appears that some Android keyboard implementations can cause - // app lifecycle state changes: adding this listener would cause the - // text field to unfocus as the user is trying to type. - // - // Until this is resolved, we won't be adding the listener to Android apps. - // https://github.com/flutter/flutter/pull/142930#issuecomment-1981750069 + if (_respondToWindowFocus) { _appLifecycleListener = _AppLifecycleListener(_appLifecycleChange); WidgetsBinding.instance.addObserver(_appLifecycleListener!); } rootScope._manager = this; } + /// It appears that some Android keyboard implementations can cause + /// app lifecycle state changes: adding the app lifecycle listener would + /// cause the text field to unfocus as the user is trying to type. + /// + /// Additionally, on iOS, input fields aren't automatically populated + /// with relevant data when using autofill. + /// + /// Until these are resolved, we won't be adding the listener to mobile platforms. + /// https://github.com/flutter/flutter/issues/148475#issuecomment-2118407411 + /// https://github.com/flutter/flutter/pull/142930#issuecomment-1981750069 + bool get _respondToWindowFocus => kIsWeb || switch (defaultTargetPlatform) { + TargetPlatform.android || TargetPlatform.iOS => false, + TargetPlatform.fuchsia || TargetPlatform.linux => true, + TargetPlatform.windows || TargetPlatform.macOS => true, + }; + /// Registers global input event handlers that are needed to manage focus. /// /// This calls the [HardwareKeyboard.addHandler] on the shared instance of @@ -1875,7 +1885,7 @@ class FocusManager with DiagnosticableTreeMixin, ChangeNotifier { /// Enables this [FocusManager] to listen to changes of the application /// lifecycle if it does not already have an application lifecycle listener - /// active, and the current platform is detected as [kIsWeb] or non-Android. + /// active, and the app isn't running on a native mobile platform. /// /// Typically, the application lifecycle listener for this [FocusManager] is /// setup at construction, but sometimes it is necessary to manually initialize @@ -1889,13 +1899,7 @@ class FocusManager with DiagnosticableTreeMixin, ChangeNotifier { /// supported. @visibleForTesting void listenToApplicationLifecycleChangesIfSupported() { - if (_appLifecycleListener == null && (kIsWeb || defaultTargetPlatform != TargetPlatform.android)) { - // It appears that some Android keyboard implementations can cause - // app lifecycle state changes: adding this listener would cause the - // text field to unfocus as the user is trying to type. - // - // Until this is resolved, we won't be adding the listener to Android apps. - // https://github.com/flutter/flutter/pull/142930#issuecomment-1981750069 + if (_appLifecycleListener == null && _respondToWindowFocus) { _appLifecycleListener = _AppLifecycleListener(_appLifecycleChange); WidgetsBinding.instance.addObserver(_appLifecycleListener!); } diff --git a/packages/flutter/lib/src/widgets/routes.dart b/packages/flutter/lib/src/widgets/routes.dart index 2d140c9b14565..8fdb6671a9c84 100644 --- a/packages/flutter/lib/src/widgets/routes.dart +++ b/packages/flutter/lib/src/widgets/routes.dart @@ -18,6 +18,7 @@ import 'focus_manager.dart'; import 'focus_scope.dart'; import 'focus_traversal.dart'; import 'framework.dart'; +import 'inherited_model.dart'; import 'modal_barrier.dart'; import 'navigator.dart'; import 'overlay.dart'; @@ -883,7 +884,16 @@ class _DismissModalAction extends DismissAction { } } -class _ModalScopeStatus extends InheritedWidget { +enum _ModalRouteAspect { + /// Specifies the aspect corresponding to [ModalRoute.isCurrent]. + isCurrent, + /// Specifies the aspect corresponding to [ModalRoute.canPop]. + canPop, + /// Specifies the aspect corresponding to [ModalRoute.settings]. + settings, +} + +class _ModalScopeStatus extends InheritedModel<_ModalRouteAspect> { const _ModalScopeStatus({ required this.isCurrent, required this.canPop, @@ -912,6 +922,15 @@ class _ModalScopeStatus extends InheritedWidget { description.add(FlagProperty('canPop', value: canPop, ifTrue: 'can pop')); description.add(FlagProperty('impliesAppBarDismissal', value: impliesAppBarDismissal, ifTrue: 'implies app bar dismissal')); } + + @override + bool updateShouldNotifyDependent(covariant _ModalScopeStatus oldWidget, Set<_ModalRouteAspect> dependencies) { + return dependencies.any((_ModalRouteAspect dependency) => switch (dependency) { + _ModalRouteAspect.isCurrent => isCurrent != oldWidget.isCurrent, + _ModalRouteAspect.canPop => canPop != oldWidget.canPop, + _ModalRouteAspect.settings => route.settings != oldWidget.route.settings, + }); + } } class _ModalScope extends StatefulWidget { @@ -1146,10 +1165,40 @@ abstract class ModalRoute extends TransitionRoute with LocalHistoryRoute? of(BuildContext context) { - final _ModalScopeStatus? widget = context.dependOnInheritedWidgetOfExactType<_ModalScopeStatus>(); - return widget?.route as ModalRoute?; + return _of(context); + } + + static ModalRoute? _of(BuildContext context, [_ModalRouteAspect? aspect]) { + return InheritedModel.inheritFrom<_ModalScopeStatus>(context, aspect: aspect)?.route as ModalRoute?; } + /// Returns [ModalRoute.isCurrent] for the modal route most closely associated + /// with the given context. + /// + /// Returns null if the given context is not associated with a modal route. + /// + /// Use of this method will cause the given [context] to rebuild any time that + /// the [ModalRoute.isCurrent] property of the ancestor [_ModalScopeStatus] changes. + static bool? isCurrentOf(BuildContext context) => _of(context, _ModalRouteAspect.isCurrent)?.isCurrent; + + /// Returns [ModalRoute.canPop] for the modal route most closely associated + /// with the given context. + /// + /// Returns null if the given context is not associated with a modal route. + /// + /// Use of this method will cause the given [context] to rebuild any time that + /// the [ModalRoute.canPop] property of the ancestor [_ModalScopeStatus] changes. + static bool? canPopOf(BuildContext context) => _of(context, _ModalRouteAspect.canPop)?.canPop; + + /// Returns [ModalRoute.settings] for the modal route most closely associated + /// with the given context. + /// + /// Returns null if the given context is not associated with a modal route. + /// + /// Use of this method will cause the given [context] to rebuild any time that + /// the [ModalRoute.settings] property of the ancestor [_ModalScopeStatus] changes. + static RouteSettings? settingsOf(BuildContext context) => _of(context, _ModalRouteAspect.settings)?.settings; + /// Schedule a call to [buildTransitions]. /// /// Whenever you need to change internal state for a [ModalRoute] object, make diff --git a/packages/flutter/lib/src/widgets/service_extensions.dart b/packages/flutter/lib/src/widgets/service_extensions.dart index caeb190758ac0..54971b59c3864 100644 --- a/packages/flutter/lib/src/widgets/service_extensions.dart +++ b/packages/flutter/lib/src/widgets/service_extensions.dart @@ -144,7 +144,22 @@ enum WidgetInspectorServiceExtensions { /// extension is registered. trackRebuildDirtyWidgets, + /// Name of service extension that, when called, returns the mapping of + /// widget locations to ids. + /// + /// This service extension is only supported if + /// [WidgetInspectorService._widgetCreationTracked] is true. + /// + /// See also: + /// + /// * [trackRebuildDirtyWidgets], which toggles dispatching events that use + /// these ids to efficiently indicate the locations of widgets. + /// * [WidgetInspectorService.initServiceExtensions], where the service + /// extension is registered. + widgetLocationIdMap, + /// Name of service extension that, when called, determines whether + /// [WidgetInspectorService._trackRepaintWidgets], which determines whether /// a callback is invoked for every [RenderObject] painted each frame. /// /// See also: diff --git a/packages/flutter/lib/src/widgets/tap_region.dart b/packages/flutter/lib/src/widgets/tap_region.dart index d00ec9d408414..756feaa9a2cd2 100644 --- a/packages/flutter/lib/src/widgets/tap_region.dart +++ b/packages/flutter/lib/src/widgets/tap_region.dart @@ -635,5 +635,6 @@ class TextFieldTapRegion extends TapRegion { super.onTapInside, super.consumeOutsideTaps, super.debugLabel, - }) : super(groupId: EditableText); + super.groupId = EditableText, + }); } diff --git a/packages/flutter/lib/src/widgets/two_dimensional_viewport.dart b/packages/flutter/lib/src/widgets/two_dimensional_viewport.dart index 356a8dbab2a26..403a1be71eac9 100644 --- a/packages/flutter/lib/src/widgets/two_dimensional_viewport.dart +++ b/packages/flutter/lib/src/widgets/two_dimensional_viewport.dart @@ -1649,6 +1649,10 @@ abstract class RenderTwoDimensionalViewport extends RenderBox implements RenderA _children.remove(slot); } assert(_debugTrackOrphans(noLongerOrphan: child)); + if (_keepAliveBucket[childParentData.vicinity] == child) { + _keepAliveBucket.remove(childParentData.vicinity); + } + assert(_keepAliveBucket[childParentData.vicinity] != child); dropChild(child); return; } diff --git a/packages/flutter/lib/src/widgets/widget_inspector.dart b/packages/flutter/lib/src/widgets/widget_inspector.dart index 356b71c369aef..5b284201fdb07 100644 --- a/packages/flutter/lib/src/widgets/widget_inspector.dart +++ b/packages/flutter/lib/src/widgets/widget_inspector.dart @@ -1114,6 +1114,14 @@ mixin WidgetInspectorService { registerExtension: registerExtension, ); + _registerSignalServiceExtension( + name: WidgetInspectorServiceExtensions.widgetLocationIdMap.name, + callback: () { + return _locationIdMapToJson(); + }, + registerExtension: registerExtension, + ); + _registerBoolServiceExtension( name: WidgetInspectorServiceExtensions.trackRepaintWidgets.name, getter: () async => _trackRepaintWidgets, @@ -2365,9 +2373,11 @@ mixin WidgetInspectorService { bool? _widgetCreationTracked; late Duration _frameStart; + late int _frameNumber; void _onFrameStart(Duration timeStamp) { _frameStart = timeStamp; + _frameNumber = PlatformDispatcher.instance.frameData.frameNumber; SchedulerBinding.instance.addPostFrameCallback(_onFrameEnd, debugLabel: 'WidgetInspector.onFrameStart'); } @@ -2381,7 +2391,13 @@ mixin WidgetInspectorService { } void _postStatsEvent(String eventName, _ElementLocationStatsTracker stats) { - postEvent(eventName, stats.exportToJson(_frameStart)); + postEvent( + eventName, + stats.exportToJson( + _frameStart, + frameNumber: _frameNumber, + ), + ); } /// All events dispatched by a [WidgetInspectorService] use this method @@ -2590,7 +2606,7 @@ class _ElementLocationStatsTracker { /// Exports the current counts and then resets the stats to prepare to track /// the next frame of data. - Map exportToJson(Duration startTime) { + Map exportToJson(Duration startTime, {required int frameNumber}) { final List events = List.filled(active.length * 2, 0); int j = 0; for (final _LocationCount stat in active) { @@ -2600,6 +2616,7 @@ class _ElementLocationStatsTracker { final Map json = { 'startTime': startTime.inMicroseconds, + 'frameNumber': frameNumber, 'events': events, }; @@ -3246,12 +3263,21 @@ class _InspectorOverlayLayer extends Layer { final Rect targetRect = MatrixUtils.transformRect( state.selected.transform, state.selected.rect, ); - final Offset target = Offset(targetRect.left, targetRect.center.dy); - const double offsetFromWidget = 9.0; - final double verticalOffset = (targetRect.height) / 2 + offsetFromWidget; - - _paintDescription(canvas, state.tooltip, state.textDirection, target, verticalOffset, size, targetRect); - + if (!targetRect.hasNaN) { + final Offset target = Offset(targetRect.left, targetRect.center.dy); + const double offsetFromWidget = 9.0; + final double verticalOffset = (targetRect.height) / 2 + offsetFromWidget; + + _paintDescription( + canvas, + state.tooltip, + state.textDirection, + target, + verticalOffset, + size, + targetRect, + ); + } // TODO(jacobr): provide an option to perform a debug paint of just the // selected widget. return recorder.endRecording(); @@ -3630,6 +3656,34 @@ int _toLocationId(_Location location) { return id; } +Map _locationIdMapToJson() { + const String idsKey = 'ids'; + const String linesKey = 'lines'; + const String columnsKey = 'columns'; + const String namesKey = 'names'; + + final Map>> fileLocationsMap = + >>{}; + for (final MapEntry<_Location, int> entry in _locationToId.entries) { + final _Location location = entry.key; + final Map> locations = fileLocationsMap.putIfAbsent( + location.file, + () => >{ + idsKey: [], + linesKey: [], + columnsKey: [], + namesKey: [], + }, + ); + + locations[idsKey]!.add(entry.value); + locations[linesKey]!.add(location.line); + locations[columnsKey]!.add(location.column); + locations[namesKey]!.add(location.name); + } + return fileLocationsMap; +} + /// A delegate that configures how a hierarchy of [DiagnosticsNode]s are /// serialized by the Flutter Inspector. @visibleForTesting diff --git a/packages/flutter/pubspec.yaml b/packages/flutter/pubspec.yaml index 680bb4ea21bf6..d523c6a2be6df 100644 --- a/packages/flutter/pubspec.yaml +++ b/packages/flutter/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: characters: 1.3.0 collection: 1.18.0 material_color_utilities: 0.11.1 - meta: 1.14.0 + meta: 1.15.0 vector_math: 2.1.4 sky_engine: sdk: flutter @@ -48,4 +48,4 @@ dev_dependencies: typed_data: 1.3.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 14.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 8948 +# PUBSPEC CHECKSUM: 3e49 diff --git a/packages/flutter/test/cupertino/context_menu_test.dart b/packages/flutter/test/cupertino/context_menu_test.dart index bf8e951574a56..5090c7a265f40 100644 --- a/packages/flutter/test/cupertino/context_menu_test.dart +++ b/packages/flutter/test/cupertino/context_menu_test.dart @@ -8,7 +8,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; void main() { final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized(); @@ -143,10 +142,7 @@ void main() { expect(tester.getRect(find.byWidget(child)), childRect); }); - testWidgets('Can open CupertinoContextMenu by tap and hold', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('Can open CupertinoContextMenu by tap and hold', (WidgetTester tester) async { final Widget child = getChild(); await tester.pumpWidget(getContextMenu(child: child)); expect(find.byWidget(child), findsOneWidget); @@ -593,10 +589,7 @@ void main() { expect(findStatic(), findsNothing); }); - testWidgets('Can close CupertinoContextMenu by flinging down', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('Can close CupertinoContextMenu by flinging down', (WidgetTester tester) async { final Widget child = getChild(); await tester.pumpWidget(getContextMenu(child: child)); diff --git a/packages/flutter/test/cupertino/date_picker_test.dart b/packages/flutter/test/cupertino/date_picker_test.dart index 1d725f23acece..19ef615703f0d 100644 --- a/packages/flutter/test/cupertino/date_picker_test.dart +++ b/packages/flutter/test/cupertino/date_picker_test.dart @@ -2114,6 +2114,306 @@ void main() { expect(find.textContaining('15').last, findsOneWidget); expect(find.text('2018'), findsOneWidget); }); + + testWidgets('CupertinoDatePicker selectionOverlayBuilder with monthYear mode', + (WidgetTester tester) async { + + final Widget selectionOverlay = Container( + color: const Color(0x12345678), + ); + + // For mode = CupertinoDatePickerMode.monthYear + await tester.pumpWidget( + CupertinoApp( + home: Center( + child: CupertinoDatePicker( + mode: CupertinoDatePickerMode.monthYear, + onDateTimeChanged: (DateTime date) {}, + initialDateTime: DateTime(2018, 9, 15), + selectionOverlayBuilder: ( + BuildContext context, { + required int selectedIndex, + required int columnCount, + }) { + return selectionOverlay; + }, + ), + ), + ), + ); + + // Find the selection overlay. + expect(find.byWidget(selectionOverlay), findsExactly(2)); + }); + + testWidgets('CupertinoDatePicker selectionOverlayBuilder with date mode', + (WidgetTester tester) async { + + final Widget selectionOverlay = Container( + color: const Color(0x12345678), + ); + + // For mode = CupertinoDatePickerMode.date + await tester.pumpWidget( + CupertinoApp( + home: Center( + child: CupertinoDatePicker( + mode: CupertinoDatePickerMode.date, + onDateTimeChanged: (DateTime date) {}, + initialDateTime: DateTime(2018, 9, 15), + selectionOverlayBuilder: ( + BuildContext context, { + required int selectedIndex, + required int columnCount, + }) { + return selectionOverlay; + }, + ), + ), + ), + ); + + // Find the selection overlay. + expect(find.byWidget(selectionOverlay), findsExactly(3)); + }); + + + testWidgets('CupertinoDatePicker selectionOverlayBuilder with time mode', + (WidgetTester tester) async { + + final Widget selectionOverlay = Container( + color: const Color(0x12345678), + ); + + // For mode = CupertinoDatePickerMode.time + await tester.pumpWidget( + CupertinoApp( + home: Center( + child: CupertinoDatePicker( + mode: CupertinoDatePickerMode.time, + onDateTimeChanged: (DateTime date) {}, + initialDateTime: DateTime(2018, 9, 15), + selectionOverlayBuilder: ( + BuildContext context, { + required int selectedIndex, + required int columnCount, + }) { + return selectionOverlay; + }, + ), + ), + ), + ); + + // Find the selection overlay. + expect(find.byWidget(selectionOverlay), findsExactly(3)); + }); + + testWidgets('CupertinoDatePicker selectionOverlayBuilder with dateAndTime mode', + (WidgetTester tester) async { + + final Widget selectionOverlay = Container( + color: const Color(0x12345678), + ); + + // For mode = CupertinoDatePickerMode.dateAndTime + await tester.pumpWidget( + CupertinoApp( + home: Center( + child: CupertinoDatePicker( + onDateTimeChanged: (DateTime date) {}, + initialDateTime: DateTime(2018, 9, 15), + selectionOverlayBuilder: ( + BuildContext context, { + required int selectedIndex, + required int columnCount, + }) { + return selectionOverlay; + }, + ), + ), + ), + ); + + // Find the selection overlay. + expect(find.byWidget(selectionOverlay), findsExactly(4)); + }); + + testWidgets('CupertinoTimerPicker selectionOverlayBuilder with hms mode', + (WidgetTester tester) async { + + final Widget selectionOverlay = Container( + color: const Color(0x12345678), + ); + + // For mode = CupertinoTimerPickerMode.hms + await tester.pumpWidget( + CupertinoApp( + home: Center( + child: CupertinoTimerPicker( + onTimerDurationChanged: (Duration duration) {}, + initialTimerDuration: const Duration(hours: 1, minutes: 1, seconds: 1), + selectionOverlayBuilder: ( + BuildContext context, { + required int selectedIndex, + required int columnCount, + }) { + return selectionOverlay; + }, + ), + ), + ), + ); + + // Find the selection overlay. + expect(find.byWidget(selectionOverlay), findsExactly(3)); + }); + + testWidgets('CupertinoTimerPicker selectionOverlayBuilder with ms mode', + (WidgetTester tester) async { + + final Widget selectionOverlay = Container( + color: const Color(0x12345678), + ); + + // For mode = CupertinoTimerPickerMode.ms + await tester.pumpWidget( + CupertinoApp( + home: Center( + child: CupertinoTimerPicker( + onTimerDurationChanged: (Duration duration) {}, + mode: CupertinoTimerPickerMode.ms, + initialTimerDuration: const Duration(hours: 1, minutes: 1, seconds: 1), + selectionOverlayBuilder: ( + BuildContext context, { + required int selectedIndex, + required int columnCount, + }) { + return selectionOverlay; + }, + ), + ), + ), + ); + + // Find the selection overlay. + expect(find.byWidget(selectionOverlay), findsExactly(2)); + }); + + testWidgets('CupertinoTimerPicker selectionOverlayBuilder with hm mode', + (WidgetTester tester) async { + + final Widget selectionOverlay = Container( + color: const Color(0x12345678), + ); + + // For mode = CupertinoTimerPickerMode.hm + await tester.pumpWidget( + CupertinoApp( + home: Center( + child: CupertinoTimerPicker( + onTimerDurationChanged: (Duration duration) {}, + mode: CupertinoTimerPickerMode.hm, + initialTimerDuration: const Duration(hours: 1, minutes: 1, seconds: 1), + selectionOverlayBuilder: ( + BuildContext context, { + required int selectedIndex, + required int columnCount, + }) { + return selectionOverlay; + }, + ), + ), + ), + ); + + // Find the selection overlay. + expect(find.byWidget(selectionOverlay), findsExactly(2)); + }); + + testWidgets('CupertinoDatePicker selectionOverlayBuilder returns null', + (WidgetTester tester) async { + + await tester.pumpWidget( + CupertinoApp( + home: Center( + child: CupertinoDatePicker( + onDateTimeChanged: (DateTime date) {}, + initialDateTime: DateTime(2018, 9, 15), + selectionOverlayBuilder: ( + BuildContext context, { + required int selectedIndex, + required int columnCount, + }) { + return null; + }, + ), + ), + ), + ); + + expect(find.byType(CupertinoPicker), isNot(paints..rrect())); + }); + + testWidgets('CupertinoTimerPicker selectionOverlayBuilder returns null', + (WidgetTester tester) async { + + await tester.pumpWidget( + CupertinoApp( + home: Center( + child: CupertinoTimerPicker( + onTimerDurationChanged: (Duration duration) {}, + mode: CupertinoTimerPickerMode.hm, + initialTimerDuration: const Duration(hours: 1, minutes: 1, seconds: 1), + selectionOverlayBuilder: ( + BuildContext context, { + required int selectedIndex, + required int columnCount, + }) { + return null; + }, + ), + ), + ), + ); + + expect(find.byType(CupertinoPicker), isNot(paints..rrect())); + }); + + testWidgets('CupertinoTimerPicker selectionOverlayBuilder is explicitly passed null', + (WidgetTester tester) async { + + await tester.pumpWidget( + CupertinoApp( + home: Center( + child: CupertinoTimerPicker( + onTimerDurationChanged: (Duration duration) {}, + mode: CupertinoTimerPickerMode.hm, + initialTimerDuration: const Duration(hours: 1, minutes: 1, seconds: 1), + ), + ), + ), + ); + + expect(find.byType(CupertinoPickerDefaultSelectionOverlay), findsExactly(2)); + }); + + testWidgets('CupertinoDatePicker selectionOverlayBuilder is explicitly passed null', + (WidgetTester tester) async { + + await tester.pumpWidget( + CupertinoApp( + home: Center( + child: CupertinoDatePicker( + onDateTimeChanged: (DateTime date) {}, + initialDateTime: DateTime(2018, 9, 15), + ), + ), + ), + ); + + expect(find.byType(CupertinoPickerDefaultSelectionOverlay), findsExactly(4)); + }); } Widget _buildPicker({ diff --git a/packages/flutter/test/cupertino/dialog_test.dart b/packages/flutter/test/cupertino/dialog_test.dart index 3957a0c559e27..46c6bfe1c6769 100644 --- a/packages/flutter/test/cupertino/dialog_test.dart +++ b/packages/flutter/test/cupertino/dialog_test.dart @@ -15,7 +15,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; import '../widgets/semantics_tester.dart'; @@ -356,10 +355,7 @@ void main() { expect(tester.getSize(find.widgetWithText(CupertinoDialogAction, 'OK')), equals(const Size(310.0, 98.0))); }); - testWidgets('Dialog respects small constraints.', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('Dialog respects small constraints.', (WidgetTester tester) async { final ScrollController scrollController = ScrollController(); addTearDown(scrollController.dispose); await tester.pumpWidget( diff --git a/packages/flutter/test/cupertino/route_test.dart b/packages/flutter/test/cupertino/route_test.dart index 6c0810920d2b4..2ca816975ef59 100644 --- a/packages/flutter/test/cupertino/route_test.dart +++ b/packages/flutter/test/cupertino/route_test.dart @@ -12,7 +12,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; import '../widgets/semantics_tester.dart'; @@ -644,10 +643,7 @@ void main() { ); }); - testWidgets('Fullscreen route animates correct transform values over time', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('Fullscreen route animates correct transform values over time', (WidgetTester tester) async { await tester.pumpWidget( CupertinoApp( home: Builder( @@ -865,17 +861,11 @@ void main() { expect(tester.getTopLeft(find.byType(Placeholder)).dx, moreOrLessEquals(-0.0, epsilon: 1.0)); } - testWidgets('CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top', (WidgetTester tester) async { await testParallax(tester, fromFullscreenDialog: false); }); - testWidgets('FullscreenDialog CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('FullscreenDialog CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top', (WidgetTester tester) async { await testParallax(tester, fromFullscreenDialog: true); }); @@ -989,17 +979,11 @@ void main() { expect(tester.getTopLeft(find.byType(Placeholder)).dx, moreOrLessEquals(0.0, epsilon: 1.0)); } - testWidgets('CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top and gets popped before the end of the animation', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top and gets popped before the end of the animation', (WidgetTester tester) async { await testParallax(tester, fromFullscreenDialog: false); }); - testWidgets('FullscreenDialog CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top and gets popped before the end of the animation', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('FullscreenDialog CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top and gets popped before the end of the animation', (WidgetTester tester) async { await testParallax(tester, fromFullscreenDialog: true); }); }); @@ -1085,24 +1069,15 @@ void main() { expect(tester.getTopLeft(find.byType(Placeholder)).dx, 0.0); } - testWidgets('CupertinoPageRoute has no parallax when fullscreenDialog route is pushed on top', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('CupertinoPageRoute has no parallax when fullscreenDialog route is pushed on top', (WidgetTester tester) async { await testNoParallax(tester, fromFullscreenDialog: false); }); - testWidgets('FullscreenDialog CupertinoPageRoute has no parallax when fullscreenDialog route is pushed on top', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('FullscreenDialog CupertinoPageRoute has no parallax when fullscreenDialog route is pushed on top', (WidgetTester tester) async { await testNoParallax(tester, fromFullscreenDialog: true); }); - testWidgets('Animated push/pop is not linear', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('Animated push/pop is not linear', (WidgetTester tester) async { await tester.pumpWidget( const CupertinoApp( home: Text('1'), @@ -2620,10 +2595,7 @@ void main() { }); }); - testWidgets( - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: ['CurvedAnimation']), - 'Fullscreen route does not leak CurveAnimation', (WidgetTester tester) async { + testWidgets( 'Fullscreen route does not leak CurveAnimation', (WidgetTester tester) async { await tester.pumpWidget( MaterialApp( home: Builder( @@ -2667,10 +2639,7 @@ void main() { await tester.pump(const Duration(milliseconds: 400)); }); - testWidgets('CupertinoModalPopupRoute does not leak CurveAnimation', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('CupertinoModalPopupRoute does not leak CurveAnimation', (WidgetTester tester) async { await tester.pumpWidget(MaterialApp( home: Navigator( onGenerateRoute: (RouteSettings settings) { @@ -2696,6 +2665,33 @@ void main() { await tester.tap(find.text('tap')); await tester.pumpAndSettle(); }); + + testWidgets('CupertinoDialogRoute does not leak CurveAnimation', (WidgetTester tester) async { + await tester.pumpWidget(MaterialApp( + home: Navigator( + onGenerateRoute: (RouteSettings settings) { + return PageRouteBuilder( + pageBuilder: (BuildContext context, Animation _, Animation __) { + return GestureDetector( + onTap: () async { + await showCupertinoDialog( + context: context, + useRootNavigator: false, + builder: (BuildContext context) => const SizedBox(), + ); + }, + child: const Text('tap'), + ); + }, + ); + }, + ), + )); + + // Open the dialog. + await tester.tap(find.text('tap')); + await tester.pumpAndSettle(); + }); } class MockNavigatorObserver extends NavigatorObserver { diff --git a/packages/flutter/test/cupertino/switch_test.dart b/packages/flutter/test/cupertino/switch_test.dart index f44c774cccfbb..4ddfeffc12cde 100644 --- a/packages/flutter/test/cupertino/switch_test.dart +++ b/packages/flutter/test/cupertino/switch_test.dart @@ -14,13 +14,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; void main() { - testWidgets('Switch can toggle on tap', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('Switch can toggle on tap', (WidgetTester tester) async { final Key switchKey = UniqueKey(); bool value = false; await tester.pumpWidget( diff --git a/packages/flutter/test/cupertino/text_field_test.dart b/packages/flutter/test/cupertino/text_field_test.dart index a3a14c845d1c3..c46651ab159f8 100644 --- a/packages/flutter/test/cupertino/text_field_test.dart +++ b/packages/flutter/test/cupertino/text_field_test.dart @@ -909,6 +909,91 @@ void main() { }, ); + testWidgets( + 'The second CupertinoTextField is clicked, triggers the onTapOutside callback of the previous CupertinoTextField', + (WidgetTester tester) async { + final GlobalKey keyA = GlobalKey(); + final GlobalKey keyB = GlobalKey(); + final GlobalKey keyC = GlobalKey(); + bool outsideClickA = false; + bool outsideClickB = false; + bool outsideClickC = false; + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: Column( + children: [ + const Text('Outside'), + Material( + child: CupertinoTextField( + key: keyA, + groupId: 'Group A', + onTapOutside: (PointerDownEvent event) { + outsideClickA = true; + }, + ), + ), + Material( + child: CupertinoTextField( + key: keyB, + groupId: 'Group B', + onTapOutside: (PointerDownEvent event) { + outsideClickB = true; + }, + ), + ), + Material( + child: CupertinoTextField( + key: keyC, + groupId: 'Group C', + onTapOutside: (PointerDownEvent event) { + outsideClickC = true; + }, + ), + ), + ], + ), + ), + ), + ); + + await tester.pump(); + + Future click(Finder finder) async { + await tester.tap(finder); + await tester.enterText(finder, 'Hello'); + await tester.pump(); + } + + expect(outsideClickA, false); + expect(outsideClickB, false); + expect(outsideClickC, false); + + await click(find.byKey(keyA)); + await tester.showKeyboard(find.byKey(keyA)); + await tester.idle(); + expect(outsideClickA, false); + expect(outsideClickB, false); + expect(outsideClickC, false); + + await click(find.byKey(keyB)); + expect(outsideClickA, true); + expect(outsideClickB, false); + expect(outsideClickC, false); + + await click(find.byKey(keyC)); + expect(outsideClickA, true); + expect(outsideClickB, true); + expect(outsideClickC, false); + + await tester.tap(find.text('Outside')); + expect(outsideClickA, true); + expect(outsideClickB, true); + expect(outsideClickC, true); + }, + ); + testWidgets( 'decoration can be overridden', (WidgetTester tester) async { diff --git a/packages/flutter/test/flutter_test_config.dart b/packages/flutter/test/flutter_test_config.dart index 4263ee110c499..b11a72d4ea398 100644 --- a/packages/flutter/test/flutter_test_config.dart +++ b/packages/flutter/test/flutter_test_config.dart @@ -43,16 +43,9 @@ Future testExecutable(FutureOr Function() testMain) { if (_isLeakTrackingEnabled()) { LeakTesting.enable(); - LeakTracking.warnForUnsupportedPlatforms = false; - LeakTesting.settings = LeakTesting.settings.withIgnored( createdByTestHelpers: true, - allNotGCed: true, - classes: [ - // TODO(polina-c): CurvedAnimation is leaking, https://github.com/flutter/flutter/issues/145600 [leaks-to-clean] - 'CurvedAnimation', - ], ); } diff --git a/packages/flutter/test/foundation/service_extensions_test.dart b/packages/flutter/test/foundation/service_extensions_test.dart index b146f5595d1c2..56ff355ddaafb 100644 --- a/packages/flutter/test/foundation/service_extensions_test.dart +++ b/packages/flutter/test/foundation/service_extensions_test.dart @@ -170,7 +170,7 @@ void main() { if (WidgetInspectorService.instance.isWidgetCreationTracked()) { // Some inspector extensions are only exposed if widget creation locations // are tracked. - widgetInspectorExtensionCount += 2; + widgetInspectorExtensionCount += 3; } expect(binding.extensions.keys.where((String name) => name.startsWith('inspector.')), hasLength(widgetInspectorExtensionCount)); diff --git a/packages/flutter/test/material/banner_test.dart b/packages/flutter/test/material/banner_test.dart index 865f2c4f03986..ca68ffb84c2ef 100644 --- a/packages/flutter/test/material/banner_test.dart +++ b/packages/flutter/test/material/banner_test.dart @@ -6,7 +6,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; void main() { testWidgets('MaterialBanner properties are respected', (WidgetTester tester) async { @@ -508,10 +507,7 @@ void main() { expect(find.text('banner2'), findsNothing); }); - testWidgets('ScaffoldMessenger does not duplicate a MaterialBanner when presenting a SnackBar.', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('ScaffoldMessenger does not duplicate a MaterialBanner when presenting a SnackBar.', (WidgetTester tester) async { const Key materialBannerTapTarget = Key('materialbanner-tap-target'); const Key snackBarTapTarget = Key('snackbar-tap-target'); const String snackBarText = 'SnackBar'; diff --git a/packages/flutter/test/material/banner_theme_test.dart b/packages/flutter/test/material/banner_theme_test.dart index 05fbcf1215516..d5a99531c65a7 100644 --- a/packages/flutter/test/material/banner_theme_test.dart +++ b/packages/flutter/test/material/banner_theme_test.dart @@ -5,7 +5,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; void main() { test('MaterialBannerThemeData copyWith, ==, hashCode basics', () { @@ -325,10 +324,7 @@ void main() { expect(find.byType(Divider), findsNothing); }); - testWidgets('MaterialBanner widget properties take priority over theme when presented by ScaffoldMessenger', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('MaterialBanner widget properties take priority over theme when presented by ScaffoldMessenger', (WidgetTester tester) async { const Color backgroundColor = Colors.purple; const double elevation = 6.0; const TextStyle textStyle = TextStyle(color: Colors.green); diff --git a/packages/flutter/test/material/bottom_navigation_bar_test.dart b/packages/flutter/test/material/bottom_navigation_bar_test.dart index a5efa21e5d359..c74f893e6e71e 100644 --- a/packages/flutter/test/material/bottom_navigation_bar_test.dart +++ b/packages/flutter/test/material/bottom_navigation_bar_test.dart @@ -14,7 +14,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; import 'package:vector_math/vector_math_64.dart' show Vector3; import '../widgets/feedback_tester.dart'; @@ -2188,10 +2187,7 @@ void main() { ); }); - testWidgets('BottomNavigationBar handles items.length changes', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('BottomNavigationBar handles items.length changes', (WidgetTester tester) async { // Regression test for https://github.com/flutter/flutter/issues/10322 Widget buildFrame(int itemCount) { @@ -2326,10 +2322,7 @@ void main() { ); } for (int pump = 1; pump < 9; pump++) { - testWidgets('pump $pump', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']).withCreationStackTrace(), - (WidgetTester tester) async { + testWidgets('pump $pump', (WidgetTester tester) async { await tester.pumpWidget(runTest()); await tester.tap(find.text('Green')); diff --git a/packages/flutter/test/material/bottom_sheet_test.dart b/packages/flutter/test/material/bottom_sheet_test.dart index 20b65da0358d4..cab5910aad9b8 100644 --- a/packages/flutter/test/material/bottom_sheet_test.dart +++ b/packages/flutter/test/material/bottom_sheet_test.dart @@ -7,8 +7,6 @@ import 'dart:ui'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; - import '../widgets/semantics_tester.dart'; void main() { @@ -1283,10 +1281,7 @@ void main() { await checkDragHandleAndColors(); }); - testWidgets('showModalBottomSheet does not use root Navigator by default', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('showModalBottomSheet does not use root Navigator by default', (WidgetTester tester) async { await tester.pumpWidget(MaterialApp( home: Scaffold( body: Navigator(onGenerateRoute: (RouteSettings settings) => MaterialPageRoute(builder: (_) { @@ -1362,7 +1357,7 @@ void main() { context: scaffoldKey.currentContext!, routeSettings: routeSettings, builder: (BuildContext context) { - retrievedRouteSettings = ModalRoute.of(context)!.settings; + retrievedRouteSettings = ModalRoute.settingsOf(context)!; return const Text('BottomSheet'); }, ); diff --git a/packages/flutter/test/material/data_table_theme_test.dart b/packages/flutter/test/material/data_table_theme_test.dart index 2d9745e3ee00b..96c894d8323a6 100644 --- a/packages/flutter/test/material/data_table_theme_test.dart +++ b/packages/flutter/test/material/data_table_theme_test.dart @@ -6,7 +6,6 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; void main() { test('DataTableThemeData copyWith, ==, hashCode basics', () { @@ -553,10 +552,7 @@ void main() { }); // This is a regression test for https://github.com/flutter/flutter/issues/143340. - testWidgets('DataColumn label can be centered with DataTableTheme.headingRowAlignment', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('DataColumn label can be centered with DataTableTheme.headingRowAlignment', (WidgetTester tester) async { const double horizontalMargin = 24.0; Widget buildTable({ MainAxisAlignment? headingRowAlignment, bool sortEnabled = false }) { diff --git a/packages/flutter/test/material/expansion_tile_test.dart b/packages/flutter/test/material/expansion_tile_test.dart index 2f01474f4097c..70daebbb82fe1 100644 --- a/packages/flutter/test/material/expansion_tile_test.dart +++ b/packages/flutter/test/material/expansion_tile_test.dart @@ -11,7 +11,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; class TestIcon extends StatefulWidget { const TestIcon({super.key}); @@ -223,10 +222,7 @@ void main() { expect(iconColor(collapsedIconKey), foregroundColor); }, variant: const TargetPlatformVariant({ TargetPlatform.iOS, TargetPlatform.macOS })); - testWidgets('ExpansionTile subtitle', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('ExpansionTile subtitle', (WidgetTester tester) async { await tester.pumpWidget( const MaterialApp( home: Scaffold( diff --git a/packages/flutter/test/material/filter_chip_test.dart b/packages/flutter/test/material/filter_chip_test.dart index 3b4f4ac8dedbb..1d249a27377b8 100644 --- a/packages/flutter/test/material/filter_chip_test.dart +++ b/packages/flutter/test/material/filter_chip_test.dart @@ -11,7 +11,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; import '../widgets/feedback_tester.dart'; @@ -957,10 +956,7 @@ void main() { expect(getIconData(tester).color, theme.iconTheme.color?.withAlpha(0xde)); }); - testWidgets('Customize FilterChip delete button', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('Customize FilterChip delete button', (WidgetTester tester) async { Widget buildChip({ Widget? deleteIcon, Color? deleteIconColor, diff --git a/packages/flutter/test/material/inherited_theme_test.dart b/packages/flutter/test/material/inherited_theme_test.dart index 31ebd1e646828..a36a6fec1c557 100644 --- a/packages/flutter/test/material/inherited_theme_test.dart +++ b/packages/flutter/test/material/inherited_theme_test.dart @@ -4,7 +4,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; void main() { testWidgets('Theme.wrap()', (WidgetTester tester) async { @@ -146,10 +145,7 @@ void main() { await tester.pumpAndSettle(); // menu route animation }); - testWidgets('Material3 - PopupMenuTheme.wrap()', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('Material3 - PopupMenuTheme.wrap()', (WidgetTester tester) async { const TextStyle textStyle = TextStyle(fontSize: 24.0, color: Color(0xFF0000FF)); Widget buildFrame() { diff --git a/packages/flutter/test/material/input_chip_test.dart b/packages/flutter/test/material/input_chip_test.dart index 20a48fd5d8faf..7a2002ec1dc01 100644 --- a/packages/flutter/test/material/input_chip_test.dart +++ b/packages/flutter/test/material/input_chip_test.dart @@ -10,7 +10,6 @@ library; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; /// Adds the basic requirements for a Chip. Widget wrapForChip({ @@ -457,10 +456,7 @@ void main() { await expectLater(find.byType(RawChip), matchesGoldenFile('input_chip.disabled.delete_button.png')); }); - testWidgets('Delete button tooltip is not shown on disabled InputChip', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('Delete button tooltip is not shown on disabled InputChip', (WidgetTester tester) async { Widget buildChip({ bool enabled = true }) { return wrapForChip( child: InputChip( diff --git a/packages/flutter/test/material/input_decorator_test.dart b/packages/flutter/test/material/input_decorator_test.dart index 8e409752533f4..9c605408d92eb 100644 --- a/packages/flutter/test/material/input_decorator_test.dart +++ b/packages/flutter/test/material/input_decorator_test.dart @@ -8885,6 +8885,29 @@ void main() { expect(tester.getTopRight(find.text('text')).dx, lessThanOrEqualTo(tester.getTopLeft(find.byIcon(Icons.satellite)).dx)); }); + testWidgets('Material2 - InputDecorator suffixIcon color in error state', (WidgetTester tester) async { + await tester.pumpWidget( + MaterialApp( + theme: ThemeData(useMaterial3: false), + home: Material( + child: TextField( + decoration: InputDecoration( + suffixIcon: IconButton( + icon: const Icon(Icons.close), + onPressed: () {}, + ), + errorText: 'Error state', + filled: true, + ), + ), + ), + ), + ); + + final ThemeData theme = Theme.of(tester.element(find.byType(TextField))); + expect(getIconStyle(tester, Icons.close)?.color, theme.colorScheme.error); + }); + testWidgets('InputDecorator prefixIconConstraints/suffixIconConstraints', (WidgetTester tester) async { await tester.pumpWidget( buildInputDecoratorM2( diff --git a/packages/flutter/test/material/navigation_rail_theme_test.dart b/packages/flutter/test/material/navigation_rail_theme_test.dart index 56265abbe85b9..7a56586ca2643 100644 --- a/packages/flutter/test/material/navigation_rail_theme_test.dart +++ b/packages/flutter/test/material/navigation_rail_theme_test.dart @@ -5,7 +5,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; void main() { test('copyWith, ==, hashCode basics', () { @@ -146,10 +145,7 @@ void main() { expect(_indicatorDecoration(tester)?.shape, indicatorShape); }); - testWidgets('NavigationRail values take priority over NavigationRailThemeData values when both properties are specified', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('NavigationRail values take priority over NavigationRailThemeData values when both properties are specified', (WidgetTester tester) async { const Color backgroundColor = Color(0x00000001); const double elevation = 7.0; const double selectedIconSize = 25.0; diff --git a/packages/flutter/test/material/page_selector_test.dart b/packages/flutter/test/material/page_selector_test.dart index a7640c7c0dea3..91f8fa60329e8 100644 --- a/packages/flutter/test/material/page_selector_test.dart +++ b/packages/flutter/test/material/page_selector_test.dart @@ -4,7 +4,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; const Color kSelectedColor = Color(0xFF00FF00); const Color kUnselectedColor = Colors.transparent; @@ -87,10 +86,7 @@ void main() { expect(indicatorColors(tester), const [kUnselectedColor, kUnselectedColor, kSelectedColor]); }); - testWidgets('PageSelector responds correctly to TabController.animateTo()', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('PageSelector responds correctly to TabController.animateTo()', (WidgetTester tester) async { final TabController tabController = TabController( vsync: const TestVSync(), length: 3, @@ -282,10 +278,7 @@ void main() { } }); - testWidgets('PageSelector responds correctly to TabController.animateTo() from the default tab controller', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('PageSelector responds correctly to TabController.animateTo() from the default tab controller', (WidgetTester tester) async { await tester.pumpWidget( Localizations( locale: const Locale('en', 'US'), diff --git a/packages/flutter/test/material/page_transitions_theme_test.dart b/packages/flutter/test/material/page_transitions_theme_test.dart index fcf58aba2dbfe..275c310774209 100644 --- a/packages/flutter/test/material/page_transitions_theme_test.dart +++ b/packages/flutter/test/material/page_transitions_theme_test.dart @@ -8,7 +8,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; void main() { final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized(); @@ -98,10 +97,7 @@ void main() { expect(findZoomPageTransition(), findsOneWidget); }, variant: TargetPlatformVariant.only(TargetPlatform.android)); - testWidgets('PageTransitionsTheme override builds a _OpenUpwardsPageTransition', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('PageTransitionsTheme override builds a _OpenUpwardsPageTransition', (WidgetTester tester) async { final Map routes = { '/': (BuildContext context) => Material( child: TextButton( diff --git a/packages/flutter/test/material/paginated_data_table_test.dart b/packages/flutter/test/material/paginated_data_table_test.dart index 666843048ebad..d0f67a246beb9 100644 --- a/packages/flutter/test/material/paginated_data_table_test.dart +++ b/packages/flutter/test/material/paginated_data_table_test.dart @@ -6,7 +6,6 @@ import 'package:flutter/gestures.dart' show DragStartBehavior; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; import 'data_table_test_utils.dart'; @@ -71,10 +70,7 @@ void main() { setUp(() => source = TestDataSource()); tearDown(() => source.dispose()); - testWidgets('PaginatedDataTable paging', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('PaginatedDataTable paging', (WidgetTester tester) async { final List log = []; await tester.pumpWidget(MaterialApp( @@ -383,10 +379,7 @@ void main() { expect(find.byWidgetPredicate((Widget widget) => widget is SizedBox && widget.height == (rowsPerPage - (rowCount % rowsPerPage)) * 46.0), findsOneWidget); }); - testWidgets('PaginatedDataTable control test', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('PaginatedDataTable control test', (WidgetTester tester) async { TestDataSource source = TestDataSource() ..generation = 42; addTearDown(source.dispose); diff --git a/packages/flutter/test/material/popup_menu_test.dart b/packages/flutter/test/material/popup_menu_test.dart index 30b6d2b1ba17e..95cd7f0eba19c 100644 --- a/packages/flutter/test/material/popup_menu_test.dart +++ b/packages/flutter/test/material/popup_menu_test.dart @@ -9,7 +9,6 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; import '../widgets/feedback_tester.dart'; import '../widgets/semantics_tester.dart'; @@ -927,6 +926,51 @@ void main() { expect(tester.getTopLeft(popupFinder), buttonTopLeft); }); + testWidgets('PopupMenu positioning inside nested Navigator when useRootNavigator', + (WidgetTester tester) async { + final Key buttonKey = UniqueKey(); + await tester.pumpWidget( + MaterialApp( + home: Scaffold( + appBar: AppBar(title: const Text('Example')), + body: Padding( + padding: const EdgeInsets.all(8.0), + child: Navigator( + onGenerateRoute: (RouteSettings settings) { + return MaterialPageRoute( + builder: (BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: PopupMenuButton( + key: buttonKey, + useRootNavigator: true, + itemBuilder: (_) => >[ + const PopupMenuItem(value: 1, child: Text('Item 1')), + const PopupMenuItem(value: 2, child: Text('Item 2')), + ], + child: const Text('Show Menu'), + ), + ), + ); + }, + ); + }, + ), + ), + ), + ), + ); + + final Finder buttonFinder = find.byKey(buttonKey); + final Finder popupFinder = find.bySemanticsLabel('Popup menu'); + await tester.tap(buttonFinder); + await tester.pumpAndSettle(); + + final Offset buttonTopLeft = tester.getTopLeft(buttonFinder); + expect(tester.getTopLeft(popupFinder), buttonTopLeft); + }); + testWidgets('Popup menu with RouteSettings', (WidgetTester tester) async { final Key buttonKey = UniqueKey(); const RouteSettings popupRoute = RouteSettings(name: '/popup'); @@ -2097,10 +2141,7 @@ void main() { expect(find.text('PopupMenuButton icon'), findsOneWidget); }); - testWidgets('showMenu uses nested navigator by default', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('showMenu uses nested navigator by default', (WidgetTester tester) async { final MenuObserver rootObserver = MenuObserver(); final MenuObserver nestedObserver = MenuObserver(); diff --git a/packages/flutter/test/material/range_slider_test.dart b/packages/flutter/test/material/range_slider_test.dart index ced8c2ab82e71..56f51ad0df9d0 100644 --- a/packages/flutter/test/material/range_slider_test.dart +++ b/packages/flutter/test/material/range_slider_test.dart @@ -8,7 +8,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/src/physics/utils.dart' show nearEqual; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; import '../widgets/semantics_tester.dart'; @@ -120,10 +119,7 @@ void main() { expect(dragStarted, false); }); - testWidgets('Range Slider can move when tapped (continuous LTR)', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('Range Slider can move when tapped (continuous LTR)', (WidgetTester tester) async { RangeValues values = const RangeValues(0.3, 0.7); await tester.pumpWidget( diff --git a/packages/flutter/test/material/reorderable_list_test.dart b/packages/flutter/test/material/reorderable_list_test.dart index 1cf37df7f3140..5595fe6448fce 100644 --- a/packages/flutter/test/material/reorderable_list_test.dart +++ b/packages/flutter/test/material/reorderable_list_test.dart @@ -11,7 +11,6 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; void main() { group('$ReorderableListView', () { @@ -690,10 +689,7 @@ void main() { handle.dispose(); }); - testWidgets("Doesn't hide accessibility when a child declares its own semantics", - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets("Doesn't hide accessibility when a child declares its own semantics", (WidgetTester tester) async { final SemanticsHandle handle = tester.ensureSemantics(); final Widget reorderableListView = ReorderableListView( onReorder: (int oldIndex, int newIndex) { }, diff --git a/packages/flutter/test/material/search_anchor_test.dart b/packages/flutter/test/material/search_anchor_test.dart index d58674e143756..9f1c115b9059b 100644 --- a/packages/flutter/test/material/search_anchor_test.dart +++ b/packages/flutter/test/material/search_anchor_test.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:async'; import 'dart:ui'; import 'package:flutter/foundation.dart'; @@ -9,7 +10,6 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; import '../widgets/semantics_tester.dart'; @@ -899,10 +899,7 @@ void main() { expect(textField.textCapitalization, TextCapitalization.none); }); - testWidgets('SearchAnchor respects viewOnChanged and viewOnSubmitted properties', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('SearchAnchor respects viewOnChanged and viewOnSubmitted properties', (WidgetTester tester) async { final SearchController controller = SearchController(); addTearDown(controller.dispose); int onChangedCalled = 0; @@ -3233,6 +3230,50 @@ void main() { expect(suggestionsBuilderCalledCount, 2); }); + + testWidgets('Suggestions gets refreshed after long API call', (WidgetTester tester) async { + Timer? debounceTimer; + const Duration apiCallDuration = Duration(seconds: 1); + await tester.pumpWidget(MaterialApp( + home: Scaffold( + body: Center( + child: SearchAnchor( + builder: (BuildContext context, SearchController controller) { + return const Icon(Icons.search); + }, + suggestionsBuilder: (BuildContext context, SearchController controller) async { + final Completer> completer = Completer>(); + debounceTimer?.cancel(); + debounceTimer = Timer(apiCallDuration, () { + completer.complete(List.generate(10, (int index) => 'Item - $index')); + }); + final List options = await completer.future; + + final List suggestions = List.generate(options.length, (int index) { + final String item = options[index]; + return ListTile( + title: Text(item), + ); + }); + return suggestions; + }, + ), + ), + ), + )); + await tester.tap(find.byIcon(Icons.search)); // Open search view. + await tester.pumpAndSettle(); + + // Simulate the keyboard opening resizing the view. + tester.view.viewInsets = const FakeViewPadding(bottom: 500.0); + addTearDown(tester.view.reset); + + // Show the keyboard. + await tester.showKeyboard(find.byType(TextField)); + await tester.pumpAndSettle(apiCallDuration); + + expect(find.text('Item - 1'), findsOneWidget); + }); } Future checkSearchBarDefaults(WidgetTester tester, ColorScheme colorScheme, Material material) async { diff --git a/packages/flutter/test/material/slider_test.dart b/packages/flutter/test/material/slider_test.dart index 1d61c1639f7e1..359f92d3c9126 100644 --- a/packages/flutter/test/material/slider_test.dart +++ b/packages/flutter/test/material/slider_test.dart @@ -13,7 +13,6 @@ import 'package:flutter/scheduler.dart'; import 'package:flutter/services.dart'; import 'package:flutter/src/physics/utils.dart' show nearEqual; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; import '../widgets/semantics_tester.dart'; @@ -49,6 +48,36 @@ class LoggingThumbShape extends SliderComponentShape { } } +// A value indicator shape to log labelPainter text. +class LoggingValueIndicatorShape extends SliderComponentShape { + LoggingValueIndicatorShape(this.logLabel); + + final List logLabel; + + @override + Size getPreferredSize(bool isEnabled, bool isDiscrete) { + return const Size(10.0, 10.0); + } + + @override + void paint( + PaintingContext context, + Offset offset, { + required Animation activationAnimation, + required Animation enableAnimation, + required bool isDiscrete, + required TextPainter labelPainter, + required RenderBox parentBox, + required SliderThemeData sliderTheme, + required TextDirection textDirection, + required double value, + required double textScaleFactor, + required Size sizeWithOverflow, + }) { + logLabel.add(labelPainter.text!); + } +} + class TallSliderTickMarkShape extends SliderTickMarkShape { @override Size getPreferredSize({required SliderThemeData sliderTheme, required bool isEnabled}) { @@ -141,10 +170,7 @@ void main() { expect(log[0], const Offset(212.0, 300.0)); }); - testWidgets( - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: ['CurvedAnimation']), - 'Slider can move when tapped (LTR)', (WidgetTester tester) async { + testWidgets('Slider can move when tapped (LTR)', (WidgetTester tester) async { final Key sliderKey = UniqueKey(); double value = 0.0; double? startValue; @@ -975,6 +1001,79 @@ void main() { } }); + testWidgets('Slider value indicator respects bold text', (WidgetTester tester) async { + final Key sliderKey = UniqueKey(); + double value = 0.0; + final List log = []; + final LoggingValueIndicatorShape loggingValueIndicatorShape = LoggingValueIndicatorShape(log); + + Widget buildSlider({ bool boldText = false }) { + return MaterialApp( + home: Directionality( + textDirection: TextDirection.ltr, + child: StatefulBuilder( + builder: (BuildContext context, StateSetter setState) { + return MediaQuery( + data: MediaQueryData(boldText: boldText), + child: Material( + child: Theme( + data: Theme.of(context).copyWith( + sliderTheme: Theme.of(context).sliderTheme.copyWith( + showValueIndicator: ShowValueIndicator.always, + valueIndicatorShape: loggingValueIndicatorShape, + ), + ), + child: Center( + child: OverflowBox( + maxWidth: double.infinity, + maxHeight: double.infinity, + child: Slider( + key: sliderKey, + max: 100.0, + divisions: 4, + label: '${value.round()}', + value: value, + onChanged: (double newValue) { + setState(() { + value = newValue; + }); + }, + ), + ), + ), + ), + ), + ); + }, + ), + ), + ); + } + // Normal text + await tester.pumpWidget(buildSlider()); + Offset center = tester.getCenter(find.byType(Slider)); + TestGesture gesture = await tester.startGesture(center); + await tester.pumpAndSettle(); + + expect(log.last.toPlainText(), '50'); + expect(log.last.style!.fontWeight, FontWeight.w500); + + await gesture.up(); + await tester.pumpAndSettle(); + + // Bold text + await tester.pumpWidget(buildSlider(boldText: true)); + center = tester.getCenter(find.byType(Slider)); + gesture = await tester.startGesture(center); + await tester.pumpAndSettle(); + + expect(log.last.toPlainText(), '50'); + expect(log.last.style!.fontWeight, FontWeight.w700); + + await gesture.up(); + await tester.pumpAndSettle(); + }); + testWidgets('Tick marks are skipped when they are too dense', (WidgetTester tester) async { Widget buildSlider({ required int divisions, diff --git a/packages/flutter/test/material/snack_bar_test.dart b/packages/flutter/test/material/snack_bar_test.dart index 105d197d7c60d..e5bfb32ea72ff 100644 --- a/packages/flutter/test/material/snack_bar_test.dart +++ b/packages/flutter/test/material/snack_bar_test.dart @@ -4045,6 +4045,99 @@ testWidgets('SnackBarAction backgroundColor works as a Color', (WidgetTester tes expect(completer.isCompleted, false); }); + + testWidgets('Action text button uses correct overlay color', (WidgetTester tester) async { + final ThemeData theme = ThemeData(); + await tester.pumpWidget(MaterialApp( + theme: theme, + home: Scaffold( + body: Builder( + builder: (BuildContext context) { + return GestureDetector( + onTap: () { + ScaffoldMessenger.of(context).showSnackBar(SnackBar( + content: const Text('I am a snack bar.'), + action: SnackBarAction(label: 'ACTION', onPressed: () { }), + )); + }, + child: const Text('X'), + ); + }, + ), + ), + )); + + await tester.tap(find.text('X')); + await tester.pumpAndSettle(); + + final ButtonStyle? actionButtonStyle = tester.widget( + find.widgetWithText(TextButton, 'ACTION'), + ).style; + expect( + actionButtonStyle?.overlayColor?.resolve({MaterialState.hovered}), + theme.colorScheme.inversePrimary.withOpacity(0.08), + ); + }); + + testWidgets('Can interact with widgets behind SnackBar when insetPadding is set in SnackBarThemeData', (WidgetTester tester) async { + // Regression test for https://github.com/flutter/flutter/issues/148566. + tester.view.physicalSize = const Size.square(200); + tester.view.devicePixelRatio = 1; + addTearDown(tester.view.resetPhysicalSize); + addTearDown(tester.view.resetDevicePixelRatio); + + const String buttonText = 'Show snackbar'; + const String snackbarContent = 'Snackbar'; + const String buttonText2 = 'Try press me'; + + final Completer completer = Completer(); + + await tester.pumpWidget(MaterialApp( + theme: ThemeData( + snackBarTheme: const SnackBarThemeData( + insetPadding: EdgeInsets.only(left: 100), + ), + ), + home: Scaffold( + body: Builder( + builder: (BuildContext context) { + return Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + ElevatedButton( + onPressed: () { + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar( + behavior: SnackBarBehavior.floating, + content: Text(snackbarContent), + ), + ); + }, + child: const Text(buttonText), + ), + ElevatedButton( + onPressed: () { + completer.complete(); + }, + child: const Text(buttonText2), + ), + ], + ); + }, + ), + ), + )); + + await tester.tap(find.text(buttonText)); + await tester.pumpAndSettle(); + + expect(find.text(snackbarContent), findsOneWidget); + await tester.tapAt(tester.getTopLeft(find.text(buttonText2))); + expect(find.text(snackbarContent), findsOneWidget); + + expect(completer.isCompleted, true); + }); } /// Start test for "SnackBar dismiss test". diff --git a/packages/flutter/test/material/text_button_test.dart b/packages/flutter/test/material/text_button_test.dart index 3f8a5b5e4b749..f213635cb7839 100644 --- a/packages/flutter/test/material/text_button_test.dart +++ b/packages/flutter/test/material/text_button_test.dart @@ -2300,6 +2300,53 @@ void main() { // The icon is aligned to the left of the button. expect(buttonTopLeft.dx, iconTopLeft.dx - 16.0); // 16.0 - padding between icon and button edge. }); + + testWidgets('treats a hovering stylus like a mouse', (WidgetTester tester) async { + final FocusNode focusNode = FocusNode(); + addTearDown(focusNode.dispose); + final ThemeData theme = ThemeData(useMaterial3: true); + bool hasBeenHovered = false; + + await tester.pumpWidget( + MaterialApp( + theme: theme, + home: Scaffold( + body: Center( + child: Builder( + builder: (BuildContext context) { + return TextButton( + onPressed: () {}, + onHover: (bool entered) { + hasBeenHovered = true; + }, + focusNode: focusNode, + child: const Text('TextButton'), + ); + }, + ), + ), + ), + ), + ); + + RenderObject overlayColor() { + return tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures'); + } + + final Offset center = tester.getCenter(find.byType(TextButton)); + final TestGesture gesture = await tester.createGesture( + kind: PointerDeviceKind.stylus, + ); + await gesture.addPointer(); + await tester.pumpAndSettle(); + + expect(hasBeenHovered, isFalse); + + await gesture.moveTo(center); + await tester.pumpAndSettle(); + expect(overlayColor(), paints..rect(color: theme.colorScheme.primary.withOpacity(0.08))); + expect(hasBeenHovered, isTrue); + }); } TextStyle? _iconStyle(WidgetTester tester, IconData icon) { diff --git a/packages/flutter/test/material/text_field_test.dart b/packages/flutter/test/material/text_field_test.dart index ed661f5d72b72..516f4332e54e2 100644 --- a/packages/flutter/test/material/text_field_test.dart +++ b/packages/flutter/test/material/text_field_test.dart @@ -797,6 +797,92 @@ void main() { expect(editableTextWidget.onEditingComplete, onEditingComplete); }); + // Regression test for https://github.com/flutter/flutter/issues/127597. + testWidgets( + 'The second TextField is clicked, triggers the onTapOutside callback of the previous TextField', + (WidgetTester tester) async { + final GlobalKey keyA = GlobalKey(); + final GlobalKey keyB = GlobalKey(); + final GlobalKey keyC = GlobalKey(); + bool outsideClickA = false; + bool outsideClickB = false; + bool outsideClickC = false; + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: Column( + children: [ + const Text('Outside'), + Material( + child: TextField( + key: keyA, + groupId: 'Group A', + onTapOutside: (PointerDownEvent event) { + outsideClickA = true; + }, + ), + ), + Material( + child: TextField( + key: keyB, + groupId: 'Group B', + onTapOutside: (PointerDownEvent event) { + outsideClickB = true; + }, + ), + ), + Material( + child: TextField( + key: keyC, + groupId: 'Group C', + onTapOutside: (PointerDownEvent event) { + outsideClickC = true; + }, + ), + ), + ], + ), + ), + ), + ); + + await tester.pump(); + + Future click(Finder finder) async { + await tester.tap(finder); + await tester.enterText(finder, 'Hello'); + await tester.pump(); + } + + expect(outsideClickA, false); + expect(outsideClickB, false); + expect(outsideClickC, false); + + await click(find.byKey(keyA)); + await tester.showKeyboard(find.byKey(keyA)); + await tester.idle(); + expect(outsideClickA, false); + expect(outsideClickB, false); + expect(outsideClickC, false); + + await click(find.byKey(keyB)); + expect(outsideClickA, true); + expect(outsideClickB, false); + expect(outsideClickC, false); + + await click(find.byKey(keyC)); + expect(outsideClickA, true); + expect(outsideClickB, true); + expect(outsideClickC, false); + + await tester.tap(find.text('Outside')); + expect(outsideClickA, true); + expect(outsideClickB, true); + expect(outsideClickC, true); + }, + ); + testWidgets('TextField has consistent size', (WidgetTester tester) async { final Key textFieldKey = UniqueKey(); String? textFieldValue; diff --git a/packages/flutter/test/material/text_form_field_test.dart b/packages/flutter/test/material/text_form_field_test.dart index 99b739d56dd16..a0401cc3eb69d 100644 --- a/packages/flutter/test/material/text_form_field_test.dart +++ b/packages/flutter/test/material/text_form_field_test.dart @@ -824,6 +824,92 @@ void main() { expect(tapOutsideCount, 0); }); + // Regression test for https://github.com/flutter/flutter/issues/127597. + testWidgets( + 'The second TextFormField is clicked, triggers the onTapOutside callback of the previous TextFormField', + (WidgetTester tester) async { + final GlobalKey keyA = GlobalKey(); + final GlobalKey keyB = GlobalKey(); + final GlobalKey keyC = GlobalKey(); + bool outsideClickA = false; + bool outsideClickB = false; + bool outsideClickC = false; + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: Column( + children: [ + const Text('Outside'), + Material( + child: TextFormField( + key: keyA, + groupId: 'Group A', + onTapOutside: (PointerDownEvent event) { + outsideClickA = true; + }, + ), + ), + Material( + child: TextFormField( + key: keyB, + groupId: 'Group B', + onTapOutside: (PointerDownEvent event) { + outsideClickB = true; + }, + ), + ), + Material( + child: TextFormField( + key: keyC, + groupId: 'Group C', + onTapOutside: (PointerDownEvent event) { + outsideClickC = true; + }, + ), + ), + ], + ), + ), + ), + ); + + await tester.pump(); + + Future click(Finder finder) async { + await tester.tap(finder); + await tester.enterText(finder, 'Hello'); + await tester.pump(); + } + + expect(outsideClickA, false); + expect(outsideClickB, false); + expect(outsideClickC, false); + + await click(find.byKey(keyA)); + await tester.showKeyboard(find.byKey(keyA)); + await tester.idle(); + expect(outsideClickA, false); + expect(outsideClickB, false); + expect(outsideClickC, false); + + await click(find.byKey(keyB)); + expect(outsideClickA, true); + expect(outsideClickB, false); + expect(outsideClickC, false); + + await click(find.byKey(keyC)); + expect(outsideClickA, true); + expect(outsideClickB, true); + expect(outsideClickC, false); + + await tester.tap(find.text('Outside')); + expect(outsideClickA, true); + expect(outsideClickB, true); + expect(outsideClickC, true); + }, + ); + // Regression test for https://github.com/flutter/flutter/issues/54472. testWidgets('reset resets the text fields value to the initialValue', (WidgetTester tester) async { await tester.pumpWidget( diff --git a/packages/flutter/test/material/user_accounts_drawer_header_test.dart b/packages/flutter/test/material/user_accounts_drawer_header_test.dart index 45d511af2ec42..a106eaabf8fba 100644 --- a/packages/flutter/test/material/user_accounts_drawer_header_test.dart +++ b/packages/flutter/test/material/user_accounts_drawer_header_test.dart @@ -5,7 +5,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; import '../widgets/semantics_tester.dart'; const Key avatarA = Key('A'); @@ -262,10 +261,7 @@ void main() { expect(transformWidget.transform.getRotation()[4], 1.0); }); - testWidgets('UserAccountsDrawerHeader icon color changes', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('UserAccountsDrawerHeader icon color changes', (WidgetTester tester) async { await tester.pumpWidget(MaterialApp( home: Material( child: UserAccountsDrawerHeader( diff --git a/packages/flutter/test/painting/system_fonts_test.dart b/packages/flutter/test/painting/system_fonts_test.dart index 2b7a2ae736e26..2054d67f0359e 100644 --- a/packages/flutter/test/painting/system_fonts_test.dart +++ b/packages/flutter/test/painting/system_fonts_test.dart @@ -10,7 +10,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; Future verifyMarkedNeedsLayoutDuringTransientCallbacksPhase(WidgetTester tester, RenderObject renderObject) async { assert(!renderObject.debugNeedsLayout); @@ -213,10 +212,7 @@ void main() { await verifyMarkedNeedsLayoutDuringTransientCallbacksPhase(tester, renderObject); }); - testWidgets('Slider relayout upon system fonts changes', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('Slider relayout upon system fonts changes', (WidgetTester tester) async { await tester.pumpWidget( MaterialApp( home: Material( diff --git a/packages/flutter/test/painting/text_painter_test.dart b/packages/flutter/test/painting/text_painter_test.dart index 73be30b406f7f..8534f5297b21f 100644 --- a/packages/flutter/test/painting/text_painter_test.dart +++ b/packages/flutter/test/painting/text_painter_test.dart @@ -1696,6 +1696,17 @@ void main() { ); }); + test('kTextHeightNone unsets the text height multiplier', () { + final TextPainter painter = TextPainter( + textDirection: TextDirection.ltr, + text: const TextSpan( + style: TextStyle(fontSize: 10, height: 1000), + children: [TextSpan(text: 'A', style: TextStyle(height: kTextHeightNone))], + ), + )..layout(); + expect(painter.height, 10); + }); + test('TextPainter dispatches memory events', () async { await expectLater( await memoryEvents(() => TextPainter().dispose(), TextPainter), diff --git a/packages/flutter/test/painting/text_style_test.dart b/packages/flutter/test/painting/text_style_test.dart index 7ab22410888f0..f44250d5ae7fb 100644 --- a/packages/flutter/test/painting/text_style_test.dart +++ b/packages/flutter/test/painting/text_style_test.dart @@ -570,6 +570,11 @@ void main() { style.apply(leadingDistribution: TextLeadingDistribution.proportional).leadingDistribution, TextLeadingDistribution.proportional, ); + + expect( + const TextStyle(height: kTextHeightNone).apply(heightFactor: 1000, heightDelta: 1000).height, + kTextHeightNone, + ); }); test('TextStyle fontFamily and package', () { diff --git a/packages/flutter/test/rendering/flex_test.dart b/packages/flutter/test/rendering/flex_test.dart index 9dd722d073bfc..702761d318268 100644 --- a/packages/flutter/test/rendering/flex_test.dart +++ b/packages/flutter/test/rendering/flex_test.dart @@ -648,6 +648,53 @@ void main() { expect(box2.localToGlobal(Offset.zero).dy, 0.0); }); + test('Vertical Flex Baseline', () { + const BoxConstraints square = BoxConstraints.tightFor(width: 100.0, height: 100.0); + final RenderConstrainedBox box1 = RenderConstrainedBox( + additionalConstraints: square, + child: RenderFlowBaselineTestBox() + ..gridCount = 1 + ..baselinePlacer = (double height) => 10, + ); + final RenderConstrainedBox box2 = RenderConstrainedBox( + additionalConstraints: square, + child: RenderFlowBaselineTestBox() + ..gridCount = 1 + ..baselinePlacer = (double height) => 10, + ); + RenderConstrainedBox filler() => RenderConstrainedBox(additionalConstraints: square); + final RenderFlex flex = RenderFlex( + textDirection: TextDirection.ltr, + children: [ + filler(), + box1, + filler(), + box2, + filler(), + ], + direction: Axis.vertical, + ); + layout(flex, phase: EnginePhase.paint); + final double flexHeight = flex.size.height; + + // We can't call the getDistanceToBaseline method directly. Check the dry + // baseline instead, and in debug mode there are asserts that verify + // the two methods return the same results. + expect(flex.getDryBaseline(flex.constraints, TextBaseline.alphabetic), 100 + 10); + + flex.mainAxisAlignment = MainAxisAlignment.end; + pumpFrame(phase: EnginePhase.paint); + expect(flex.getDryBaseline(flex.constraints, TextBaseline.alphabetic), flexHeight - 400 + 10); + + flex.verticalDirection = VerticalDirection.up; + pumpFrame(phase: EnginePhase.paint); + expect(flex.getDryBaseline(flex.constraints, TextBaseline.alphabetic), 300 + 10); + + flex.mainAxisAlignment = MainAxisAlignment.start; + pumpFrame(phase: EnginePhase.paint); + expect(flex.getDryBaseline(flex.constraints, TextBaseline.alphabetic), flexHeight - 200 + 10); + }); + group('Intrinsics', () { test('main axis intrinsics with RenderAspectRatio 1', () { const BoxConstraints square = BoxConstraints.tightFor(width: 100.0, height: 100.0); diff --git a/packages/flutter/test/rendering/mouse_tracker_test.dart b/packages/flutter/test/rendering/mouse_tracker_test.dart index d624410c21b2a..4d0fa0537492e 100644 --- a/packages/flutter/test/rendering/mouse_tracker_test.dart +++ b/packages/flutter/test/rendering/mouse_tracker_test.dart @@ -72,63 +72,81 @@ void main() { final Matrix4 translate10by20 = Matrix4.translationValues(10, 20, 0); - test('should detect enter, hover, and exit from Added, Hover, and Removed events', () { - final List events = []; - setUpWithOneAnnotation(logEvents: events); + for (final ui.PointerDeviceKind pointerDeviceKind in [ui.PointerDeviceKind.mouse, ui.PointerDeviceKind.stylus]) { + test('should detect enter, hover, and exit from Added, Hover, and Removed events for stylus', () { + final List events = []; + setUpWithOneAnnotation(logEvents: events); + + final List listenerLogs = []; + _mouseTracker.addListener(() { + listenerLogs.add(_mouseTracker.mouseIsConnected); + }); - final List listenerLogs = []; - _mouseTracker.addListener(() { - listenerLogs.add(_mouseTracker.mouseIsConnected); + expect(_mouseTracker.mouseIsConnected, isFalse); + + // Pointer enters the annotation. + RendererBinding.instance.platformDispatcher.onPointerDataPacket!(ui.PointerDataPacket(data: [ + _pointerData( + PointerChange.add, + Offset.zero, + kind: pointerDeviceKind, + ), + ])); + addTearDown(() => dispatchRemoveDevice()); + + expect(events, _equalToEventsOnCriticalFields([ + EventMatcher(const PointerEnterEvent()), + ])); + expect(listenerLogs, [true]); + events.clear(); + listenerLogs.clear(); + + // Pointer hovers the annotation. + RendererBinding.instance.platformDispatcher.onPointerDataPacket!(ui.PointerDataPacket(data: [ + _pointerData( + PointerChange.hover, + const Offset(1.0, 101.0), + kind: pointerDeviceKind, + ), + ])); + expect(events, _equalToEventsOnCriticalFields([ + EventMatcher(const PointerHoverEvent(position: Offset(1.0, 101.0))), + ])); + expect(_mouseTracker.mouseIsConnected, isTrue); + expect(listenerLogs, isEmpty); + events.clear(); + + // Pointer is removed while on the annotation. + RendererBinding.instance.platformDispatcher.onPointerDataPacket!(ui.PointerDataPacket(data: [ + _pointerData( + PointerChange.remove, + const Offset(1.0, 101.0), + kind: pointerDeviceKind, + ), + ])); + expect(events, _equalToEventsOnCriticalFields([ + EventMatcher(const PointerExitEvent(position: Offset(1.0, 101.0))), + ])); + expect(listenerLogs, [false]); + events.clear(); + listenerLogs.clear(); + + // Pointer is added on the annotation. + RendererBinding.instance.platformDispatcher.onPointerDataPacket!(ui.PointerDataPacket(data: [ + _pointerData( + PointerChange.add, + const Offset(0.0, 301.0), + kind: pointerDeviceKind, + ), + ])); + expect(events, _equalToEventsOnCriticalFields([ + EventMatcher(const PointerEnterEvent(position: Offset(0.0, 301.0))), + ])); + expect(listenerLogs, [true]); + events.clear(); + listenerLogs.clear(); }); - - expect(_mouseTracker.mouseIsConnected, isFalse); - - // Pointer enters the annotation. - RendererBinding.instance.platformDispatcher.onPointerDataPacket!(ui.PointerDataPacket(data: [ - _pointerData(PointerChange.add, Offset.zero), - ])); - addTearDown(() => dispatchRemoveDevice()); - - expect(events, _equalToEventsOnCriticalFields([ - EventMatcher(const PointerEnterEvent()), - ])); - expect(listenerLogs, [true]); - events.clear(); - listenerLogs.clear(); - - // Pointer hovers the annotation. - RendererBinding.instance.platformDispatcher.onPointerDataPacket!(ui.PointerDataPacket(data: [ - _pointerData(PointerChange.hover, const Offset(1.0, 101.0)), - ])); - expect(events, _equalToEventsOnCriticalFields([ - EventMatcher(const PointerHoverEvent(position: Offset(1.0, 101.0))), - ])); - expect(_mouseTracker.mouseIsConnected, isTrue); - expect(listenerLogs, isEmpty); - events.clear(); - - // Pointer is removed while on the annotation. - RendererBinding.instance.platformDispatcher.onPointerDataPacket!(ui.PointerDataPacket(data: [ - _pointerData(PointerChange.remove, const Offset(1.0, 101.0)), - ])); - expect(events, _equalToEventsOnCriticalFields([ - EventMatcher(const PointerExitEvent(position: Offset(1.0, 101.0))), - ])); - expect(listenerLogs, [false]); - events.clear(); - listenerLogs.clear(); - - // Pointer is added on the annotation. - RendererBinding.instance.platformDispatcher.onPointerDataPacket!(ui.PointerDataPacket(data: [ - _pointerData(PointerChange.add, const Offset(0.0, 301.0)), - ])); - expect(events, _equalToEventsOnCriticalFields([ - EventMatcher(const PointerEnterEvent(position: Offset(0.0, 301.0))), - ])); - expect(listenerLogs, [true]); - events.clear(); - listenerLogs.clear(); - }); + } // Regression test for https://github.com/flutter/flutter/issues/90838 test('should not crash if the first event is a Removed event', () { @@ -623,7 +641,10 @@ class BaseEventMatcher extends Matcher { bool matches(dynamic untypedItem, Map matchState) { final PointerEvent actual = untypedItem as PointerEvent; if (!( - _matchesField(matchState, 'kind', actual.kind, PointerDeviceKind.mouse) && + ( + _matchesField(matchState, 'kind', actual.kind, PointerDeviceKind.mouse) || + _matchesField(matchState, 'kind', actual.kind, PointerDeviceKind.stylus) + ) && _matchesField(matchState, 'position', actual.position, expected.position) && _matchesField(matchState, 'device', actual.device, expected.device) && _matchesField(matchState, 'localPosition', actual.localPosition, expected.localPosition) diff --git a/packages/flutter/test/rendering/object_test.dart b/packages/flutter/test/rendering/object_test.dart index 9db0ed162f4f5..e685b90757132 100644 --- a/packages/flutter/test/rendering/object_test.dart +++ b/packages/flutter/test/rendering/object_test.dart @@ -156,7 +156,7 @@ void main() { expect(() => data3.detach(), throwsAssertionError); }); - test('RenderObject.getTransformTo asserts is argument is not descendant', () { + test('RenderObject.getTransformTo asserts if target not in the same render tree', () { final PipelineOwner owner = PipelineOwner(); final TestRenderObject renderObject1 = TestRenderObject(); renderObject1.attach(owner); @@ -165,6 +165,64 @@ void main() { expect(() => renderObject1.getTransformTo(renderObject2), throwsAssertionError); }); + test('RenderObject.getTransformTo works for siblings and descendants', () { + final PipelineOwner owner = PipelineOwner(); + final TestRenderObject renderObject1 = TestRenderObject()..attach(owner); + final TestRenderObject renderObject11 = TestRenderObject(); + final TestRenderObject renderObject12 = TestRenderObject(); + + renderObject1 + ..add(renderObject11) + ..add(renderObject12); + expect(renderObject11.getTransformTo(renderObject12), equals(Matrix4.identity())); + expect(renderObject1.getTransformTo(renderObject11), equals(Matrix4.identity())); + expect(renderObject1.getTransformTo(renderObject12), equals(Matrix4.identity())); + expect(renderObject11.getTransformTo(renderObject1), equals(Matrix4.identity())); + expect(renderObject12.getTransformTo(renderObject1), equals(Matrix4.identity())); + + expect(renderObject1.getTransformTo(renderObject1), equals(Matrix4.identity())); + expect(renderObject11.getTransformTo(renderObject11), equals(Matrix4.identity())); + expect(renderObject12.getTransformTo(renderObject12), equals(Matrix4.identity())); + }); + + test('RenderObject.getTransformTo gets the correct paint transform', () { + final PipelineOwner owner = PipelineOwner(); + final TestRenderObject renderObject0 = TestRenderObject() + ..attach(owner); + final TestRenderObject renderObject1 = TestRenderObject(); + final TestRenderObject renderObject2 = TestRenderObject(); + renderObject0 + ..add(renderObject1) + ..add(renderObject2) + ..paintTransform = Matrix4.diagonal3Values(9, 4, 1); + + final TestRenderObject renderObject11 = TestRenderObject(); + final TestRenderObject renderObject21 = TestRenderObject(); + renderObject1 + ..add(renderObject11) + ..paintTransform = Matrix4.translationValues(8, 16, 32); + renderObject2 + ..add(renderObject21) + ..paintTransform = Matrix4.translationValues(32, 64, 128); + + expect( + renderObject11.getTransformTo(renderObject21), + equals(Matrix4.translationValues((8 - 32) * 9, (16 - 64) * 4, 32 - 128)), + ); + // Turn one of the paint transforms into a singular matrix and getTransformTo + // should return Matrix4.zero(). + renderObject0.paintTransform = Matrix4( + 1, 1, 1 ,1, + 2, 2, 2, 2, + 3, 3, 3, 3, + 4, 4, 4, 4, + ); // Not a full rank matrix, so it has to be singular. + expect( + renderObject11.getTransformTo(renderObject21), + equals(Matrix4.zero()), + ); + }); + test('PaintingContext.pushClipRect reuses the layer', () { _testPaintingContextLayerReuse((PaintingContextCallback painter, PaintingContext context, Offset offset, Layer? oldLayer) { return context.pushClipRect(true, offset, Rect.zero, painter, oldLayer: oldLayer as ClipRectLayer?); @@ -376,7 +434,8 @@ class _TestCustomLayerBox extends RenderBox { class TestParentData extends ParentData with ContainerParentDataMixin { } -class TestRenderObject extends RenderObject { +class TestRenderObjectParentData extends ParentData with ContainerParentDataMixin { } +class TestRenderObject extends RenderObject with ContainerRenderObjectMixin { TestRenderObject({this.allowPaintBounds = false}); final bool allowPaintBounds; @@ -393,6 +452,20 @@ class TestRenderObject extends RenderObject { return Rect.zero; } + Matrix4 paintTransform = Matrix4.identity(); + @override + void applyPaintTransform(covariant RenderObject child, Matrix4 transform) { + super.applyPaintTransform(child, transform); + transform.multiply(paintTransform); + } + + @override + void setupParentData(RenderObject child) { + if (child.parentData is! TestRenderObjectParentData) { + child.parentData = TestRenderObjectParentData(); + } + } + @override void performLayout() { } diff --git a/packages/flutter/test/rendering/viewport_test.dart b/packages/flutter/test/rendering/viewport_test.dart index 83a3862568835..18c830bb6e6a3 100644 --- a/packages/flutter/test/rendering/viewport_test.dart +++ b/packages/flutter/test/rendering/viewport_test.dart @@ -14,7 +14,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; class _TestSliverPersistentHeaderDelegate extends SliverPersistentHeaderDelegate { _TestSliverPersistentHeaderDelegate({ @@ -2055,10 +2054,7 @@ void main() { expect(tester.getTopLeft(find.text('Item 9')).dy, 226.0); }); - testWidgets('allows overscrolling on default platforms - vertical', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('allows overscrolling on default platforms - vertical', (WidgetTester tester) async { // Regression test for https://github.com/flutter/flutter/issues/10949 // Scrollables should overscroll by default on iOS and macOS final ScrollController controller = ScrollController(); diff --git a/packages/flutter/test/widgets/color_filter_test.dart b/packages/flutter/test/widgets/color_filter_test.dart index 7d1fac5a6e9c7..6ddb5892f9596 100644 --- a/packages/flutter/test/widgets/color_filter_test.dart +++ b/packages/flutter/test/widgets/color_filter_test.dart @@ -11,7 +11,6 @@ library; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; import '../impeller_test_helpers.dart'; @@ -31,10 +30,7 @@ void main() { ); }); - testWidgets('Color filter - sepia', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('Color filter - sepia', (WidgetTester tester) async { const ColorFilter sepia = ColorFilter.matrix([ 0.39, 0.769, 0.189, 0, 0, // diff --git a/packages/flutter/test/widgets/custom_painter_test.dart b/packages/flutter/test/widgets/custom_painter_test.dart index e9320e21df167..ea6534f992e99 100644 --- a/packages/flutter/test/widgets/custom_painter_test.dart +++ b/packages/flutter/test/widgets/custom_painter_test.dart @@ -408,7 +408,7 @@ void _defineTests() { } semantics.dispose(); - }); + }, skip: true); // TODO(yjbanov): temporary skip until https://github.com/flutter/engine/pull/53094 rolls in (see https://github.com/flutter/flutter/issues/83809) testWidgets('Supports all flags', (WidgetTester tester) async { final SemanticsTester semantics = SemanticsTester(tester); diff --git a/packages/flutter/test/widgets/default_text_editing_shortcuts_test.dart b/packages/flutter/test/widgets/default_text_editing_shortcuts_test.dart index 96b4c9c535376..3c5b2b971eb9b 100644 --- a/packages/flutter/test/widgets/default_text_editing_shortcuts_test.dart +++ b/packages/flutter/test/widgets/default_text_editing_shortcuts_test.dart @@ -487,8 +487,8 @@ void main() { }, variant: macOSOnly); }, skip: kIsWeb); // [intended] specific tests target non-web. - group('Linux does accept numpad shortcuts', () { - testWidgets('when numlock is locked', (WidgetTester tester) async { + group('Linux numpad shortcuts', () { + testWidgets('are triggered when numlock is locked', (WidgetTester tester) async { final FocusNode editable = FocusNode(); addTearDown(editable.dispose); final FocusNode spy = FocusNode(); @@ -577,7 +577,7 @@ void main() { expect((state.lastIntent! as DeleteToNextWordBoundaryIntent).forward, true); }, variant: TargetPlatformVariant.only(TargetPlatform.linux)); - testWidgets('when numlock is unlocked', (WidgetTester tester) async { + testWidgets('are triggered when numlock is unlocked', (WidgetTester tester) async { final FocusNode editable = FocusNode(); addTearDown(editable.dispose); final FocusNode spy = FocusNode(); @@ -664,7 +664,79 @@ void main() { expect(state.lastIntent, isA()); expect((state.lastIntent! as DeleteToNextWordBoundaryIntent).forward, true); }, variant: TargetPlatformVariant.only(TargetPlatform.linux)); - }, skip: kIsWeb); // [intended] specific tests target non-web. + + testWidgets('update the editable text content when triggered on non-web', (WidgetTester tester) async { + final FocusNode focusNode = FocusNode(); + addTearDown(focusNode.dispose); + final TextEditingController controller = TextEditingController(text: 'Flutter'); + addTearDown(controller.dispose); + + await tester.pumpWidget(MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: EditableText( + controller: controller, + autofocus: true, + focusNode: focusNode, + style: const TextStyle(fontSize: 10.0), + cursorColor: Colors.blue, + backgroundCursorColor: Colors.grey, + ), + ), + )); + + // Verify that NumLock is unlocked. + expect(HardwareKeyboard.instance.lockModesEnabled.contains(KeyboardLockMode.numLock), isFalse); + + await tester.enterText(find.byType(EditableText), 'Flutter'); + expect(controller.selection.end, 7); + + await sendKeyCombination(tester, const SingleActivator(LogicalKeyboardKey.numpad4)); + // Verify the cursor moved to the left (numpad4). + expect(controller.selection.end, 6); + }, + variant: TargetPlatformVariant.only(TargetPlatform.linux), + skip: kIsWeb, // [intended] Non-web test. + ); + + testWidgets('do not update the editable text content when triggered on web', (WidgetTester tester) async { + final FocusNode focusNode = FocusNode(); + addTearDown(focusNode.dispose); + final TextEditingController controller = TextEditingController(text: 'Flutter'); + addTearDown(controller.dispose); + + await tester.pumpWidget(MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: EditableText( + controller: controller, + autofocus: true, + focusNode: focusNode, + style: const TextStyle(fontSize: 10.0), + cursorColor: Colors.blue, + backgroundCursorColor: Colors.grey, + ), + ), + )); + + // Verify that NumLock is unlocked. + expect(HardwareKeyboard.instance.lockModesEnabled.contains(KeyboardLockMode.numLock), isFalse); + + await tester.enterText(find.byType(EditableText), 'Flutter'); + expect(controller.selection.end, 7); + + await sendKeyCombination(tester, const SingleActivator(LogicalKeyboardKey.numpad4)); + // On web, the editable text would have been updated by the browser. + // In the flutter test environment, the browser logic is not called + // so the editable content is not updated when a shortcut is triggered. + // This is the intended result, this test is checking that numpad shortcuts + // have no effect on the web (their intent is set to DoNothingAndStopPropagationTextIntent). + expect(controller.selection.end, 7); + }, + variant: TargetPlatformVariant.only(TargetPlatform.linux), + skip: !kIsWeb, // [intended] Web only. + ); + }); } class ActionSpy extends StatefulWidget { diff --git a/packages/flutter/test/widgets/editable_text_test.dart b/packages/flutter/test/widgets/editable_text_test.dart index 8c031c4a17ff1..83616e89d8632 100644 --- a/packages/flutter/test/widgets/editable_text_test.dart +++ b/packages/flutter/test/widgets/editable_text_test.dart @@ -193,6 +193,81 @@ void main() { skip: kIsWeb, // [intended] ); + group('Check the passed groupId value', () { + testWidgets( + 'The value of the passed-in groupId should match the groupId of the EditableText', + (WidgetTester tester) async { + final List groupIds = ['Group A', 'Group B', 'Group C']; + final List keys = + List.generate(3, (_) => GlobalKey()); + final List inputFields = [ + TextFormField(key: keys[0], groupId: groupIds[0]), + CupertinoTextField(key: keys[1], groupId: groupIds[1]), + TextField(key: keys[2], groupId: groupIds[2]), + ]; + + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: Column( + children: inputFields.map((Widget child) { + return Material(child: child); + }).toList(), + ), + ), + ), + ); + + await tester.pump(); + + for (int i = 0; i < 3; i++) { + final EditableText editableText = tester.widget(find.descendant( + of: find.byKey(keys[i]), + matching: find.byType(EditableText), + )); + expect(editableText.groupId, groupIds[i]); + } + }, + ); + + testWidgets( + 'When the value of groupId is not passed in, the default type should be EditableText', + (WidgetTester tester) async { + final List keys = + List.generate(3, (_) => GlobalKey()); + final List inputFields = [ + TextFormField(key: keys[0]), + CupertinoTextField(key: keys[1]), + TextField(key: keys[2]), + ]; + + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: Column( + children: inputFields.map((Widget child) { + return Material(child: child); + }).toList(), + ), + ), + ), + ); + + await tester.pump(); + + for (int i = 0; i < 3; i++) { + final EditableText editableText = tester.widget(find.descendant( + of: find.byKey(keys[i]), + matching: find.byType(EditableText), + )); + expect(editableText.groupId == EditableText, true); + } + }, + ); + }); + // Regression test for https://github.com/flutter/flutter/issues/126312. testWidgets('when open input connection in didUpdateWidget, should not throw', (WidgetTester tester) async { final Key key = GlobalKey(); @@ -17548,6 +17623,60 @@ void main() { const TextSelection.collapsed(offset: 17, affinity: TextAffinity.upstream), ); }); + + testWidgets('Composing region can truncate grapheme', (WidgetTester tester) async { + await tester.pumpWidget( + MediaQuery( + data: const MediaQueryData(), + child: Directionality( + textDirection: TextDirection.ltr, + child: EditableText( + autofocus: true, + backgroundCursorColor: Colors.grey, + controller: controller, + focusNode: focusNode, + style: textStyle, + cursorColor: cursorColor, + ), + ), + ), + ); + + await tester.pumpAndSettle(); + assert(focusNode.hasFocus); + + controller.value = const TextEditingValue( + text: 'Á', + selection: TextSelection(baseOffset: 1, extentOffset: 2), + composing: TextSelection(baseOffset: 1, extentOffset: 2), + ); + await tester.pumpAndSettle(); + + expect(tester.takeException(), isNull); + }); + + testWidgets('Can implement TextEditingController', (WidgetTester tester) async { + final _TextEditingControllerImpl controller = _TextEditingControllerImpl(); + addTearDown(controller.dispose); + await tester.pumpWidget( + MediaQuery( + data: const MediaQueryData(), + child: Directionality( + textDirection: TextDirection.ltr, + child: EditableText( + autofocus: true, + backgroundCursorColor: Colors.grey, + controller: controller, + focusNode: focusNode, + style: textStyle, + cursorColor: cursorColor, + ), + ), + ), + ); + + expect(tester.takeException(), isNull); + }); } class UnsettableController extends TextEditingController { @@ -17910,6 +18039,36 @@ class _AccentColorTextEditingController extends TextEditingController { } } +class _TextEditingControllerImpl extends ChangeNotifier implements TextEditingController { + final TextEditingController _innerController = TextEditingController(); + + @override + void clear() => _innerController.clear(); + + @override + void clearComposing() => _innerController.clearComposing(); + + @override + TextSelection get selection => _innerController.selection; + @override + set selection(TextSelection newSelection) => _innerController.selection = newSelection; + + @override + String get text => _innerController.text; + @override + set text(String newText) => _innerController.text = newText; + + @override + TextSpan buildTextSpan({required BuildContext context, TextStyle? style, required bool withComposing}) { + return _innerController.buildTextSpan(context: context, style: style, withComposing: withComposing); + } + + @override + TextEditingValue get value => _innerController.value; + @override + set value(TextEditingValue newValue) => _innerController.value = newValue; +} + class _TestScrollController extends ScrollController { bool get attached => hasListeners; } diff --git a/packages/flutter/test/widgets/focus_manager_test.dart b/packages/flutter/test/widgets/focus_manager_test.dart index 09cf18008417b..76c4a8025030e 100644 --- a/packages/flutter/test/widgets/focus_manager_test.dart +++ b/packages/flutter/test/widgets/focus_manager_test.dart @@ -354,44 +354,39 @@ void main() { logs.clear(); }, variant: KeySimulatorTransitModeVariant.all()); - testWidgets('FocusManager ignores app lifecycle changes on Android.', (WidgetTester tester) async { - final bool shouldRespond = kIsWeb || defaultTargetPlatform != TargetPlatform.android; - if (shouldRespond) { - return; - } - - Future setAppLifecycleState(AppLifecycleState state) async { - final ByteData? message = const StringCodec().encodeMessage(state.toString()); - await TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .handlePlatformMessage('flutter/lifecycle', message, (_) {}); - } + testWidgets( + 'FocusManager ignores app lifecycle changes on Android and iOS.', + (WidgetTester tester) async { + Future setAppLifecycleState(AppLifecycleState state) async { + final ByteData? message = const StringCodec().encodeMessage(state.toString()); + await TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .handlePlatformMessage('flutter/lifecycle', message, (_) {}); + } - final BuildContext context = await setupWidget(tester); - final FocusScopeNode scope = FocusScopeNode(debugLabel: 'Scope'); - addTearDown(scope.dispose); - final FocusAttachment scopeAttachment = scope.attach(context); - final FocusNode focusNode = FocusNode(debugLabel: 'Focus Node'); - addTearDown(focusNode.dispose); - final FocusAttachment focusNodeAttachment = focusNode.attach(context); - scopeAttachment.reparent(parent: tester.binding.focusManager.rootScope); - focusNodeAttachment.reparent(parent: scope); - focusNode.requestFocus(); - await tester.pump(); - expect(focusNode.hasPrimaryFocus, isTrue); + final BuildContext context = await setupWidget(tester); + final FocusScopeNode scope = FocusScopeNode(debugLabel: 'Scope'); + addTearDown(scope.dispose); + final FocusAttachment scopeAttachment = scope.attach(context); + final FocusNode focusNode = FocusNode(debugLabel: 'Focus Node'); + addTearDown(focusNode.dispose); + final FocusAttachment focusNodeAttachment = focusNode.attach(context); + scopeAttachment.reparent(parent: tester.binding.focusManager.rootScope); + focusNodeAttachment.reparent(parent: scope); + focusNode.requestFocus(); + await tester.pump(); + expect(focusNode.hasPrimaryFocus, isTrue); - await setAppLifecycleState(AppLifecycleState.paused); - expect(focusNode.hasPrimaryFocus, isTrue); + await setAppLifecycleState(AppLifecycleState.paused); + expect(focusNode.hasPrimaryFocus, isTrue); - await setAppLifecycleState(AppLifecycleState.resumed); - expect(focusNode.hasPrimaryFocus, isTrue); - }); + await setAppLifecycleState(AppLifecycleState.resumed); + expect(focusNode.hasPrimaryFocus, isTrue); + }, + skip: kIsWeb, // [intended] + variant: const TargetPlatformVariant({TargetPlatform.android, TargetPlatform.iOS}), + ); testWidgets('FocusManager responds to app lifecycle changes.', (WidgetTester tester) async { - final bool shouldRespond = kIsWeb || defaultTargetPlatform != TargetPlatform.android; - if (!shouldRespond) { - return; - } - Future setAppLifecycleState(AppLifecycleState state) async { final ByteData? message = const StringCodec().encodeMessage(state.toString()); await TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger diff --git a/packages/flutter/test/widgets/focus_traversal_test.dart b/packages/flutter/test/widgets/focus_traversal_test.dart index 02fc4090262dc..9d9f2157305a2 100644 --- a/packages/flutter/test/widgets/focus_traversal_test.dart +++ b/packages/flutter/test/widgets/focus_traversal_test.dart @@ -8,7 +8,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; import 'semantics_tester.dart'; @@ -2821,10 +2820,7 @@ void main() { expect(events.length, 2); }, variant: KeySimulatorTransitModeVariant.all()); - testWidgets('Focus traversal does not throw when no focusable is available in a group', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('Focus traversal does not throw when no focusable is available in a group', (WidgetTester tester) async { await tester.pumpWidget(const MaterialApp(home: Scaffold(body: ListTile(title: Text('title'))))); final FocusNode? initialFocus = primaryFocus; await tester.sendKeyEvent(LogicalKeyboardKey.tab); diff --git a/packages/flutter/test/widgets/heroes_test.dart b/packages/flutter/test/widgets/heroes_test.dart index 9076c843b015e..d9bd88e1fc01d 100644 --- a/packages/flutter/test/widgets/heroes_test.dart +++ b/packages/flutter/test/widgets/heroes_test.dart @@ -301,10 +301,7 @@ Future main() async { expect(find.byKey(thirdKey), isInCard); }); - testWidgets('Heroes still animate after hero controller is swapped.', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('Heroes still animate after hero controller is swapped.', (WidgetTester tester) async { final GlobalKey key = GlobalKey(); final UniqueKey heroKey = UniqueKey(); final HeroController controller1 = HeroController(); diff --git a/packages/flutter/test/widgets/mouse_region_test.dart b/packages/flutter/test/widgets/mouse_region_test.dart index e4549e23e82f7..a84da27402d02 100644 --- a/packages/flutter/test/widgets/mouse_region_test.dart +++ b/packages/flutter/test/widgets/mouse_region_test.dart @@ -1868,6 +1868,47 @@ void main() { await gesture.cancel(); expect(tester.takeException(), isNull); }); + + testWidgets('stylus input works', (WidgetTester tester) async { + bool onEnter = false; + bool onExit = false; + bool onHover = false; + await tester.pumpWidget(MaterialApp( + home: Scaffold( + body: MouseRegion( + onEnter: (_) => onEnter = true, + onExit: (_) => onExit = true, + onHover: (_) => onHover = true, + child: const SizedBox( + width: 10.0, + height: 10.0, + ), + ), + ), + )); + + final TestGesture gesture = await tester.createGesture(kind: PointerDeviceKind.stylus); + await gesture.addPointer(location: const Offset(20.0, 20.0)); + await tester.pump(); + + expect(onEnter, false); + expect(onHover, false); + expect(onExit, false); + + await gesture.moveTo(const Offset(5.0, 5.0)); + await tester.pump(); + + expect(onEnter, true); + expect(onHover, true); + expect(onExit, false); + + await gesture.moveTo(const Offset(20.0, 20.0)); + await tester.pump(); + + expect(onEnter, true); + expect(onHover, true); + expect(onExit, true); + }); } // Render widget `topLeft` at the top-left corner, stacking on top of the widget diff --git a/packages/flutter/test/widgets/navigator_test.dart b/packages/flutter/test/widgets/navigator_test.dart index b58ff8495556f..5948469a5a2af 100644 --- a/packages/flutter/test/widgets/navigator_test.dart +++ b/packages/flutter/test/widgets/navigator_test.dart @@ -1431,7 +1431,7 @@ void main() { settings: const RouteSettings(name: 'C'), builder: (BuildContext context) { log.add('building C'); - log.add('found ${ModalRoute.of(context)!.settings.name}'); + log.add('found ${ModalRoute.settingsOf(context)!.name}'); return TextButton( child: const Text('C'), onPressed: () { @@ -1476,7 +1476,7 @@ void main() { final List log = []; Route? nextRoute = PageRouteBuilder( pageBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation) { - log.add('building page 1 - ${ModalRoute.of(context)!.canPop}'); + log.add('building page 1 - ${ModalRoute.canPopOf(context)}'); return const Placeholder(); }, ); @@ -1493,32 +1493,83 @@ void main() { expect(log, expected); key.currentState!.pushReplacement(PageRouteBuilder( pageBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation) { - log.add('building page 2 - ${ModalRoute.of(context)!.canPop}'); + log.add('building page 2 - ${ModalRoute.canPopOf(context)}'); return const Placeholder(); }, )); expect(log, expected); await tester.pump(); expected.add('building page 2 - false'); - expected.add('building page 1 - false'); // page 1 is rebuilt again because isCurrent changed. expect(log, expected); await tester.pump(const Duration(milliseconds: 150)); expect(log, expected); key.currentState!.pushReplacement(PageRouteBuilder( pageBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation) { - log.add('building page 3 - ${ModalRoute.of(context)!.canPop}'); + log.add('building page 3 - ${ModalRoute.canPopOf(context)}'); return const Placeholder(); }, )); expect(log, expected); await tester.pump(); expected.add('building page 3 - false'); - expected.add('building page 2 - false'); // page 2 is rebuilt again because isCurrent changed. expect(log, expected); await tester.pump(const Duration(milliseconds: 200)); expect(log, expected); }); + testWidgets('ModelRoute can be partially depended-on', (WidgetTester tester) async { + final GlobalKey key = GlobalKey(); + final List log = []; + Route? nextRoute = PageRouteBuilder( + settings: const RouteSettings(name: 'page 1'), + pageBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation) { + log.add('building ${ModalRoute.settingsOf(context)!.name} - canPop: ${ModalRoute.canPopOf(context)!}'); + return const Placeholder(); + }, + ); + await tester.pumpWidget(MaterialApp( + navigatorKey: key, + onGenerateRoute: (RouteSettings settings) { + assert(nextRoute != null); + final Route result = nextRoute!; + nextRoute = null; + return result; + }, + )); + final List expected = ['building page 1 - canPop: false']; + expect(log, expected); + key.currentState!.push(PageRouteBuilder( + settings: const RouteSettings(name: 'page 2'), + pageBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation) { + log.add('building ${ModalRoute.settingsOf(context)!.name} - isCurrent: ${ModalRoute.isCurrentOf(context)!}'); + return const Placeholder(); + }, + )); + expect(log, expected); + await tester.pump(); + expected.add('building page 2 - isCurrent: true'); + expect(log, expected); + key.currentState!.push(PageRouteBuilder( + settings: const RouteSettings(name: 'page 3'), + pageBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation) { + log.add('building ${ModalRoute.settingsOf(context)!.name} - canPop: ${ModalRoute.canPopOf(context)!}'); + return const Placeholder(); + }, + )); + expect(log, expected); + await tester.pump(); + expected.add('building page 3 - canPop: true'); + expected.add('building page 2 - isCurrent: false'); + expect(log, expected); + key.currentState!.pop(); + await tester.pump(); + expected.add('building page 2 - isCurrent: true'); + expect(log, expected); + key.currentState!.pop(); + await tester.pump(); + expect(log, expected); + }); + testWidgets('route semantics', (WidgetTester tester) async { final SemanticsTester semantics = SemanticsTester(tester); final Map routes = { diff --git a/packages/flutter/test/widgets/routes_test.dart b/packages/flutter/test/widgets/routes_test.dart index a5801f15003ac..3c8cd459b1d9d 100644 --- a/packages/flutter/test/widgets/routes_test.dart +++ b/packages/flutter/test/widgets/routes_test.dart @@ -8,7 +8,6 @@ import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; import 'semantics_tester.dart'; @@ -975,10 +974,7 @@ void main() { expect(secondaryAnimationOfRouteOne.value, primaryAnimationOfRouteTwo.value); }); - testWidgets('showGeneralDialog handles transparent barrier color', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('showGeneralDialog handles transparent barrier color', (WidgetTester tester) async { await tester.pumpWidget(MaterialApp( home: Builder( builder: (BuildContext context) { diff --git a/packages/flutter/test/widgets/semantics_test.dart b/packages/flutter/test/widgets/semantics_test.dart index 3e3459ac19cff..95180c83929c7 100644 --- a/packages/flutter/test/widgets/semantics_test.dart +++ b/packages/flutter/test/widgets/semantics_test.dart @@ -578,7 +578,7 @@ void main() { } semantics.dispose(); - }); + }, skip: true); // TODO(yjbanov): temporary skip until https://github.com/flutter/engine/pull/53094 rolls in (see https://github.com/flutter/flutter/issues/83809) testWidgets('Semantics widget supports all flags', (WidgetTester tester) async { final SemanticsTester semantics = SemanticsTester(tester); diff --git a/packages/flutter/test/widgets/sliver_prototype_item_extent_test.dart b/packages/flutter/test/widgets/sliver_prototype_item_extent_test.dart index cf94b4fad9dd1..48b000f5eb477 100644 --- a/packages/flutter/test/widgets/sliver_prototype_item_extent_test.dart +++ b/packages/flutter/test/widgets/sliver_prototype_item_extent_test.dart @@ -4,7 +4,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; class TestItem extends StatelessWidget { const TestItem({ super.key, required this.item, this.width, this.height }); @@ -41,10 +40,7 @@ Widget buildFrame({ int? count, double? width, double? height, Axis? scrollDirec } void main() { - testWidgets('SliverPrototypeExtentList.builder test', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('SliverPrototypeExtentList.builder test', (WidgetTester tester) async { await tester.pumpWidget( MaterialApp( home: Scaffold( diff --git a/packages/flutter/test/widgets/text_golden_test.dart b/packages/flutter/test/widgets/text_golden_test.dart index eed9c61fa248e..1fa64fb82fe94 100644 --- a/packages/flutter/test/widgets/text_golden_test.dart +++ b/packages/flutter/test/widgets/text_golden_test.dart @@ -10,7 +10,6 @@ library; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; void main() { testWidgets('Centered text', (WidgetTester tester) async { @@ -189,11 +188,7 @@ void main() { ); }); - testWidgets( - 'Text Fade', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('Text Fade', (WidgetTester tester) async { await tester.pumpWidget( MaterialApp( theme: ThemeData(useMaterial3: false), diff --git a/packages/flutter/test/widgets/transitions_test.dart b/packages/flutter/test/widgets/transitions_test.dart index 14f6109b6a886..08e0544ecc490 100644 --- a/packages/flutter/test/widgets/transitions_test.dart +++ b/packages/flutter/test/widgets/transitions_test.dart @@ -5,7 +5,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; void main() { testWidgets('toString control test', (WidgetTester tester) async { @@ -96,10 +95,7 @@ void main() { expect(actualDecoration.boxShadow, null); }); - testWidgets('animations work with curves test', - // TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in] - experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const ['CurvedAnimation']), - (WidgetTester tester) async { + testWidgets('animations work with curves test', (WidgetTester tester) async { final CurvedAnimation curvedAnimation = CurvedAnimation( parent: controller, curve: Curves.easeOut, diff --git a/packages/flutter/test/widgets/two_dimensional_utils.dart b/packages/flutter/test/widgets/two_dimensional_utils.dart index a56f4f8994dda..b6beae9b139ad 100644 --- a/packages/flutter/test/widgets/two_dimensional_utils.dart +++ b/packages/flutter/test/widgets/two_dimensional_utils.dart @@ -511,3 +511,39 @@ class TestParentDataWidget extends ParentDataWidget { @override Type get debugTypicalAncestorWidgetClass => SimpleBuilderTableViewport; } + +class KeepAliveOnlyWhenHovered extends StatefulWidget { + const KeepAliveOnlyWhenHovered({ required this.child, super.key }); + + final Widget child; + + @override + KeepAliveOnlyWhenHoveredState createState() => KeepAliveOnlyWhenHoveredState(); +} + +class KeepAliveOnlyWhenHoveredState extends State with AutomaticKeepAliveClientMixin { + bool _hovered = false; + + @override + bool get wantKeepAlive => _hovered; + + @override + Widget build(BuildContext context) { + super.build(context); + return MouseRegion( + onEnter: (_) { + setState(() { + _hovered = true; + updateKeepAlive(); + }); + }, + onExit: (_) { + setState(() { + _hovered = false; + updateKeepAlive(); + }); + }, + child: widget.child, + ); + } +} diff --git a/packages/flutter/test/widgets/two_dimensional_viewport_test.dart b/packages/flutter/test/widgets/two_dimensional_viewport_test.dart index 70c4a6f9b7ba3..4c02adb5dafc1 100644 --- a/packages/flutter/test/widgets/two_dimensional_viewport_test.dart +++ b/packages/flutter/test/widgets/two_dimensional_viewport_test.dart @@ -731,6 +731,66 @@ void main() { ); }); + testWidgets('Ensure KeepAlive widget is not held onto when it no longer should be kept alive offscreen', (WidgetTester tester) async { + // Regression test for https://github.com/flutter/flutter/issues/138977 + final UniqueKey checkBoxKey = UniqueKey(); + final Widget originCell = KeepAliveOnlyWhenHovered( + key: checkBoxKey, + child: const SizedBox.square(dimension: 200), + ); + const Widget otherCell = SizedBox.square(dimension: 200, child: Placeholder()); + final ScrollController verticalController = ScrollController(); + addTearDown(verticalController.dispose); + final TwoDimensionalChildListDelegate listDelegate = TwoDimensionalChildListDelegate( + children: >[ + [originCell, otherCell, otherCell, otherCell, otherCell], + [otherCell, otherCell, otherCell, otherCell, otherCell], + [otherCell, otherCell, otherCell, otherCell, otherCell], + [otherCell, otherCell, otherCell, otherCell, otherCell], + [otherCell, otherCell, otherCell, otherCell, otherCell], + ], + ); + addTearDown(listDelegate.dispose); + + await tester.pumpWidget(simpleListTest( + delegate: listDelegate, + verticalDetails: ScrollableDetails.vertical(controller: verticalController), + )); + await tester.pumpAndSettle(); + expect(find.byKey(checkBoxKey), findsOneWidget); + + // Scroll away, should not be kept alive (disposed). + verticalController.jumpTo(verticalController.position.maxScrollExtent); + await tester.pump(); + expect(find.byKey(checkBoxKey), findsNothing); + + // Bring back into view + verticalController.jumpTo(0.0); + await tester.pump(); + expect(find.byKey(checkBoxKey), findsOneWidget); + + // Hover over widget to make it keep alive. + final TestGesture gesture = await tester.createGesture( + kind: PointerDeviceKind.mouse, + ); + await gesture.addPointer(location: Offset.zero); + addTearDown(gesture.removePointer); + await tester.pump(); + await gesture.moveTo(tester.getCenter(find.byKey(checkBoxKey))); + await tester.pump(); + + // Scroll away, should be kept alive still. + verticalController.jumpTo(verticalController.position.maxScrollExtent); + await tester.pump(); + expect(find.byKey(checkBoxKey), findsOneWidget); + + // Move the pointer outside the widget bounds to trigger exit event + // and remove it from keep alive bucket. + await gesture.moveTo(const Offset(300, 300)); + await tester.pump(); + expect(find.byKey(checkBoxKey), findsNothing); + }); + testWidgets('list delegate will not add automatic keep alives', (WidgetTester tester) async { final UniqueKey checkBoxKey = UniqueKey(); final Widget originCell = SizedBox.square( diff --git a/packages/flutter/test/widgets/widget_inspector_test.dart b/packages/flutter/test/widgets/widget_inspector_test.dart index b40f8ed905e5a..32808e30343a1 100644 --- a/packages/flutter/test/widgets/widget_inspector_test.dart +++ b/packages/flutter/test/widgets/widget_inspector_test.dart @@ -3765,6 +3765,49 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { skip: !WidgetInspectorService.instance.isWidgetCreationTracked(), // [intended] Test requires --track-widget-creation flag. ); + testWidgets('ext.flutter.inspector.widgetLocationIdMap', + (WidgetTester tester) async { + service.rebuildCount = 0; + + await tester.pumpWidget(const ClockDemo()); + + final Element clockDemoElement = find.byType(ClockDemo).evaluate().first; + + service.setSelection(clockDemoElement, 'my-group'); + final Map jsonObject = (await service.testExtension( + WidgetInspectorServiceExtensions.getSelectedWidget.name, + {'objectGroup': 'my-group'}, + ))! as Map; + final Map creationLocation = + jsonObject['creationLocation']! as Map; + final String file = creationLocation['file']! as String; + expect(file, endsWith('widget_inspector_test.dart')); + + final Map locationMapJson = (await service.testExtension( + WidgetInspectorServiceExtensions.widgetLocationIdMap.name, + {}, + ))! as Map; + + final Map widgetTestLocations = + locationMapJson[file]! as Map; + expect(widgetTestLocations, isNotNull); + + final List ids = widgetTestLocations['ids']! as List; + expect(ids.length, greaterThan(0)); + final List lines = + widgetTestLocations['lines']! as List; + expect(lines.length, equals(ids.length)); + final List columns = + widgetTestLocations['columns']! as List; + expect(columns.length, equals(ids.length)); + final List names = + widgetTestLocations['names']! as List; + expect(names.length, equals(ids.length)); + expect(names, contains('ClockDemo')); + expect(names, contains('Directionality')); + expect(names, contains('ClockText')); + }, skip: !WidgetInspectorService.instance.isWidgetCreationTracked()); // [intended] Test requires --track-widget-creation flag. + testWidgets('ext.flutter.inspector.trackRebuildDirtyWidgets', (WidgetTester tester) async { service.rebuildCount = 0; @@ -3951,6 +3994,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { expect(rebuildEvents.length, equals(1)); event = removeLastEvent(rebuildEvents); expect(event['startTime'], isA()); + expect(event['frameNumber'], isA()); data = event['events']! as List; newLocations = event['newLocations']! as Map>; fileLocationsMap = event['locations']! as Map>>; @@ -4080,6 +4124,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { expect(repaintEvents.length, equals(1)); event = removeLastEvent(repaintEvents); expect(event['startTime'], isA()); + expect(event['frameNumber'], isA()); data = event['events']! as List; // No new locations were rebuilt. expect(event, isNot(contains('newLocations'))); diff --git a/packages/flutter/test_private/pubspec.yaml b/packages/flutter/test_private/pubspec.yaml index 6ae2d230a7821..95c0445b835eb 100644 --- a/packages/flutter/test_private/pubspec.yaml +++ b/packages/flutter/test_private/pubspec.yaml @@ -9,7 +9,7 @@ dependencies: # # For detailed instructions, refer to: # https://github.com/flutter/flutter/wiki/Updating-dependencies-in-Flutter - meta: 1.14.0 + meta: 1.15.0 path: 1.9.0 process: 5.0.2 process_runner: 4.2.0 @@ -20,4 +20,4 @@ dependencies: file: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" platform: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: d6b3 +# PUBSPEC CHECKSUM: 56b4 diff --git a/packages/flutter/test_private/test/pubspec.yaml b/packages/flutter/test_private/test/pubspec.yaml index c06a50da60214..e1f2c821aee9d 100644 --- a/packages/flutter/test_private/test/pubspec.yaml +++ b/packages/flutter/test_private/test/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: sdk: flutter characters: 1.3.0 collection: 1.18.0 - meta: 1.14.0 + meta: 1.15.0 vector_math: 2.1.4 async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -47,4 +47,4 @@ dev_dependencies: process: 5.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" typed_data: 1.3.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 70bb +# PUBSPEC CHECKSUM: 11bc diff --git a/packages/flutter_driver/pubspec.yaml b/packages/flutter_driver/pubspec.yaml index 711039203fb46..67f004d9e5b00 100644 --- a/packages/flutter_driver/pubspec.yaml +++ b/packages/flutter_driver/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: fuchsia_remote_debug_protocol: sdk: flutter path: 1.9.0 - meta: 1.14.0 + meta: 1.15.0 vm_service: 14.2.2 webdriver: 3.0.3 @@ -43,8 +43,8 @@ dev_dependencies: fake_async: 1.3.1 test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -75,4 +75,4 @@ dev_dependencies: webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: dd62 +# PUBSPEC CHECKSUM: 1365 diff --git a/packages/flutter_goldens/README.md b/packages/flutter_goldens/README.md index c99c8d717a731..2187c8e28f6c8 100644 --- a/packages/flutter_goldens/README.md +++ b/packages/flutter_goldens/README.md @@ -6,4 +6,6 @@ See also:  * https://skia.org/docs/dev/testing/skiagold/ * https://flutter-gold.skia.org/ - * https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package:flutter + * [Writing a golden file test for package flutter] + +[Writing a golden file test for package flutter]: /docs/contributing/testing/Writing-a-golden-file-test-for-package-flutter.md diff --git a/packages/flutter_goldens/lib/flutter_goldens.dart b/packages/flutter_goldens/lib/flutter_goldens.dart index 1675144d6314e..4a3d6638e1b99 100644 --- a/packages/flutter_goldens/lib/flutter_goldens.dart +++ b/packages/flutter_goldens/lib/flutter_goldens.dart @@ -3,7 +3,7 @@ // found in the LICENSE file. import 'dart:async' show FutureOr; -import 'dart:io' as io show OSError, SocketException; +import 'dart:io' as io show HttpClient, OSError, SocketException; import 'package:file/file.dart'; import 'package:file/local.dart'; @@ -58,6 +58,7 @@ Future testExecutable(FutureOr Function() testMain, {String? namePre const Platform platform = LocalPlatform(); const FileSystem fs = LocalFileSystem(); const ProcessManager process = LocalProcessManager(); + final io.HttpClient httpClient = io.HttpClient(); if (FlutterPostSubmitFileComparator.isForEnvironment(platform)) { goldenFileComparator = await FlutterPostSubmitFileComparator.fromLocalFileComparator( localFileComparator: goldenFileComparator as LocalFileComparator, @@ -66,6 +67,7 @@ Future testExecutable(FutureOr Function() testMain, {String? namePre log: print, fs: fs, process: process, + httpClient: httpClient, ); } else if (FlutterPreSubmitFileComparator.isForEnvironment(platform)) { goldenFileComparator = await FlutterPreSubmitFileComparator.fromLocalFileComparator( @@ -75,6 +77,7 @@ Future testExecutable(FutureOr Function() testMain, {String? namePre log: print, fs: fs, process: process, + httpClient: httpClient, ); } else if (FlutterSkippingFileComparator.isForEnvironment(platform)) { goldenFileComparator = FlutterSkippingFileComparator.fromLocalFileComparator( @@ -87,6 +90,7 @@ Future testExecutable(FutureOr Function() testMain, {String? namePre log: print, fs: fs, process: process, + httpClient: httpClient, ); } else { goldenFileComparator = await FlutterLocalFileComparator.fromLocalFileComparator( @@ -95,6 +99,7 @@ Future testExecutable(FutureOr Function() testMain, {String? namePre log: print, fs: fs, process: process, + httpClient: httpClient, ); } await testMain(); @@ -287,6 +292,7 @@ class FlutterPostSubmitFileComparator extends FlutterGoldenFileComparator { required LogCallback log, required FileSystem fs, required ProcessManager process, + required io.HttpClient httpClient, }) async { final Directory baseDirectory = FlutterGoldenFileComparator.getBaseDirectory( localFileComparator, @@ -302,6 +308,7 @@ class FlutterPostSubmitFileComparator extends FlutterGoldenFileComparator { platform: platform, fs: fs, process: process, + httpClient: httpClient, ); await goldens.auth(); return FlutterPostSubmitFileComparator( @@ -378,6 +385,7 @@ class FlutterPreSubmitFileComparator extends FlutterGoldenFileComparator { required LogCallback log, required FileSystem fs, required ProcessManager process, + required io.HttpClient httpClient, }) async { final Directory baseDirectory = testBasedir ?? FlutterGoldenFileComparator.getBaseDirectory( localFileComparator, @@ -396,6 +404,7 @@ class FlutterPreSubmitFileComparator extends FlutterGoldenFileComparator { log: log, fs: fs, process: process, + httpClient: httpClient, ); await goldens.auth(); @@ -477,6 +486,7 @@ class FlutterSkippingFileComparator extends FlutterGoldenFileComparator { required LogCallback log, required FileSystem fs, required ProcessManager process, + required io.HttpClient httpClient, }) { final Uri basedir = localFileComparator.basedir; final SkiaGoldClient skiaClient = SkiaGoldClient( @@ -485,6 +495,7 @@ class FlutterSkippingFileComparator extends FlutterGoldenFileComparator { log: log, fs: fs, process: process, + httpClient: httpClient, ); return FlutterSkippingFileComparator( basedir, @@ -572,6 +583,7 @@ class FlutterLocalFileComparator extends FlutterGoldenFileComparator with LocalC required LogCallback log, required FileSystem fs, required ProcessManager process, + required io.HttpClient httpClient, }) async { baseDirectory ??= FlutterGoldenFileComparator.getBaseDirectory( localFileComparator, @@ -589,6 +601,7 @@ class FlutterLocalFileComparator extends FlutterGoldenFileComparator with LocalC log: log, fs: fs, process: process, + httpClient: httpClient, ); try { // Check if we can reach Gold. diff --git a/packages/flutter_goldens/lib/skia_client.dart b/packages/flutter_goldens/lib/skia_client.dart index d5296a068e397..bb8e9ee949b07 100644 --- a/packages/flutter_goldens/lib/skia_client.dart +++ b/packages/flutter_goldens/lib/skia_client.dart @@ -53,10 +53,9 @@ class SkiaGoldClient { required this.process, required this.platform, Abi? abi, - io.HttpClient? httpClient, + required this.httpClient, required this.log, - }) : httpClient = httpClient ?? io.HttpClient(), - abi = abi ?? Abi.current(); + }) : abi = abi ?? Abi.current(); /// The file system to use for storing the local clone of the repository. /// diff --git a/packages/flutter_goldens/pubspec.yaml b/packages/flutter_goldens/pubspec.yaml index 768f65390dc72..bc95570ddc46e 100644 --- a/packages/flutter_goldens/pubspec.yaml +++ b/packages/flutter_goldens/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: sdk: flutter crypto: 3.0.3 file: 7.0.0 - meta: 1.14.0 + meta: 1.15.0 platform: 3.1.4 process: 5.0.2 @@ -40,4 +40,4 @@ dependencies: vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 14.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 70bb +# PUBSPEC CHECKSUM: 11bc diff --git a/packages/flutter_goldens/test/flutter_goldens_test.dart b/packages/flutter_goldens/test/flutter_goldens_test.dart index 3daca56ba4b41..1ba230df553c0 100644 --- a/packages/flutter_goldens/test/flutter_goldens_test.dart +++ b/packages/flutter_goldens/test/flutter_goldens_test.dart @@ -859,6 +859,7 @@ void main() { log: (String message) => fail('skia gold client printed unexpected output: "$message"'), fs: fs, process: FakeProcessManager(), + httpClient: FakeHttpClient(), ); expect(fakeSkiaClient.initCalls, 0); }); @@ -946,6 +947,7 @@ void main() { log: (String message) => fail('skia gold client printed unexpected output: "$message"'), fs: fs, process: FakeProcessManager(), + httpClient: FakeHttpClient(), ); expect(fakeSkiaClient.tryInitCalls, 0); }); @@ -1050,6 +1052,7 @@ void main() { log: (String message) => fail('skia gold client printed unexpected output: "$message"'), fs: fs, process: FakeProcessManager(), + httpClient: FakeHttpClient(), ); expect(comparator1.runtimeType, FlutterSkippingFileComparator); @@ -1062,6 +1065,7 @@ void main() { log: (String message) => fail('skia gold client printed unexpected output: "$message"'), fs: fs, process: FakeProcessManager(), + httpClient: FakeHttpClient(), ); expect(comparator2.runtimeType, FlutterSkippingFileComparator); @@ -1074,6 +1078,7 @@ void main() { log: (String message) => fail('skia gold client printed unexpected output: "$message"'), fs: fs, process: FakeProcessManager(), + httpClient: FakeHttpClient(), ); expect(comparator3.runtimeType, FlutterSkippingFileComparator); diff --git a/packages/flutter_localizations/pubspec.yaml b/packages/flutter_localizations/pubspec.yaml index 8ad7c674fdb01..1ba2c184b9f1b 100644 --- a/packages/flutter_localizations/pubspec.yaml +++ b/packages/flutter_localizations/pubspec.yaml @@ -17,7 +17,7 @@ dependencies: clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -40,4 +40,4 @@ dev_dependencies: test_api: 0.7.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 14.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: c09c +# PUBSPEC CHECKSUM: 059d diff --git a/packages/flutter_test/pubspec.yaml b/packages/flutter_test/pubspec.yaml index 19086c4694c9d..05d0f352d8a19 100644 --- a/packages/flutter_test/pubspec.yaml +++ b/packages/flutter_test/pubspec.yaml @@ -43,7 +43,7 @@ dependencies: leak_tracker: 10.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" leak_tracker_testing: 3.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stream_channel: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" string_scanner: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -53,4 +53,4 @@ dependencies: dev_dependencies: file: 7.0.0 -# PUBSPEC CHECKSUM: 5452 +# PUBSPEC CHECKSUM: 9853 diff --git a/packages/flutter_tools/lib/src/artifacts.dart b/packages/flutter_tools/lib/src/artifacts.dart index efb6e9b4d2639..40e03324a97e4 100644 --- a/packages/flutter_tools/lib/src/artifacts.dart +++ b/packages/flutter_tools/lib/src/artifacts.dart @@ -841,7 +841,7 @@ class CachedArtifacts implements Artifacts { if (mode == BuildMode.debug || mode == null) { return _fileSystem.path.join(engineDir, platformName); } - final String suffix = mode != BuildMode.debug ? '-${snakeCase(mode.cliName, '-')}' : ''; + final String suffix = mode != BuildMode.debug ? '-${kebabCase(mode.cliName)}' : ''; return _fileSystem.path.join(engineDir, platformName + suffix); case TargetPlatform.fuchsia_arm64: case TargetPlatform.fuchsia_x64: @@ -855,7 +855,7 @@ class CachedArtifacts implements Artifacts { case TargetPlatform.android_x64: case TargetPlatform.android_x86: assert(mode != null, 'Need to specify a build mode for platform $platform.'); - final String suffix = mode != BuildMode.debug ? '-${snakeCase(mode!.cliName, '-')}' : ''; + final String suffix = mode != BuildMode.debug ? '-${kebabCase(mode!.cliName)}' : ''; return _fileSystem.path.join(engineDir, platformName + suffix); case TargetPlatform.android: assert(false, 'cannot use TargetPlatform.android to look up artifacts'); diff --git a/packages/flutter_tools/lib/src/base/utils.dart b/packages/flutter_tools/lib/src/base/utils.dart index 5e69bb9a16e0c..c2c07f214a06a 100644 --- a/packages/flutter_tools/lib/src/base/utils.dart +++ b/packages/flutter_tools/lib/src/base/utils.dart @@ -30,13 +30,18 @@ String camelCase(String str) { /// Convert `fooBar` to `foo-bar`. String kebabCase(String str) { - return snakeCase(str, '-'); + return _reCase(str, '-'); } final RegExp _upperRegex = RegExp(r'[A-Z]'); /// Convert `fooBar` to `foo_bar`. -String snakeCase(String str, [ String sep = '_' ]) { +String snakeCase(String str) { + return _reCase(str, '_'); +} + +/// Convert `fooBar` to `foo[sep]bar`. +String _reCase(String str, String sep) { return str.replaceAllMapped(_upperRegex, (Match m) => '${m.start == 0 ? '' : sep}${m[0]!.toLowerCase()}'); } diff --git a/packages/flutter_tools/lib/src/build_system/targets/web.dart b/packages/flutter_tools/lib/src/build_system/targets/web.dart index 5211ddf79633a..82e90bc555018 100644 --- a/packages/flutter_tools/lib/src/build_system/targets/web.dart +++ b/packages/flutter_tools/lib/src/build_system/targets/web.dart @@ -285,7 +285,6 @@ class Dart2WasmTarget extends Dart2WebTarget { final File outputWasmFile = environment.buildDir.childFile('main.dart.wasm'); final File depFile = environment.buildDir.childFile('dart2wasm.d'); - final String dartSdkPath = artifacts.getArtifactPath(Artifact.engineDartSdkPath, platform: TargetPlatform.web_javascript); final String platformBinariesPath = artifacts.getHostArtifact(HostArtifact.webPlatformKernelFolder).path; final String platformFilePath = environment.fileSystem.path.join(platformBinariesPath, 'dart2wasm_platform.dill'); final List dartDefines = compilerConfig.renderer.updateDartDefines( @@ -298,7 +297,6 @@ class Dart2WasmTarget extends Dart2WebTarget { 'compile', 'wasm', '--packages=.dart_tool/package_config.json', - '--extra-compiler-option=--dart-sdk=$dartSdkPath', '--extra-compiler-option=--platform=$platformFilePath', '--extra-compiler-option=--delete-tostring-package-uri=dart:ui', '--extra-compiler-option=--delete-tostring-package-uri=package:flutter', diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart index 6eed33fb657c4..4f2b1b2cb6a51 100644 --- a/packages/flutter_tools/lib/src/commands/create.dart +++ b/packages/flutter_tools/lib/src/commands/create.dart @@ -363,8 +363,11 @@ class CreateCommand extends CreateBase { final PubContext pubContext; switch (template) { case FlutterProjectType.app: + final bool skipWidgetTestsGeneration = + sampleCode != null || emptyArgument; + generatedFileCount += await generateApp( - ['app', 'app_test_widget'], + ['app', if (!skipWidgetTestsGeneration) 'app_test_widget'], relativeDir, templateContext, overwrite: overwrite, @@ -454,9 +457,6 @@ class CreateCommand extends CreateBase { if (sampleCode != null) { _applySample(relativeDir, sampleCode); } - if (sampleCode != null || emptyArgument) { - generatedFileCount += _removeTestDir(relativeDir); - } globals.printStatus('Wrote $generatedFileCount files.'); globals.printStatus('\nAll done!'); final String application = @@ -779,20 +779,6 @@ Your $application code is in $relativeAppMain. mainDartFile.writeAsStringSync(sampleCode); } - int _removeTestDir(Directory directory) { - final Directory testDir = directory.childDirectory('test'); - if (!testDir.existsSync()) { - return 0; - } - final List files = testDir.listSync(recursive: true); - try { - testDir.deleteSync(recursive: true); - } on FileSystemException catch (exception) { - throwToolExit('Failed to delete test directory: $exception'); - } - return -files.length; - } - List _getSupportedPlatformsFromTemplateContext(Map templateContext) { return [ for (final String platform in kAllCreatePlatforms) diff --git a/packages/flutter_tools/lib/src/drive/web_driver_service.dart b/packages/flutter_tools/lib/src/drive/web_driver_service.dart index fd1e99c54418f..a43709fa99929 100644 --- a/packages/flutter_tools/lib/src/drive/web_driver_service.dart +++ b/packages/flutter_tools/lib/src/drive/web_driver_service.dart @@ -268,7 +268,7 @@ enum Browser implements CliEnum { }; @override - String get cliName => snakeCase(name, '-'); + String get cliName => kebabCase(name); static Browser fromCliName(String? value) => Browser.values.singleWhere( (Browser element) => element.cliName == value, diff --git a/packages/flutter_tools/lib/src/isolated/native_assets/android/native_assets.dart b/packages/flutter_tools/lib/src/isolated/native_assets/android/native_assets.dart index 012cab9ddeb4a..421e352b30efa 100644 --- a/packages/flutter_tools/lib/src/isolated/native_assets/android/native_assets.dart +++ b/packages/flutter_tools/lib/src/isolated/native_assets/android/native_assets.dart @@ -50,14 +50,25 @@ Future> dryRunNativeAssetsAndroidInternal( const OSImpl targetOS = OSImpl.android; globals.logger.printTrace('Dry running native assets for $targetOS.'); - final DryRunResult dryRunResult = await buildRunner.dryRun( + final BuildDryRunResult buildDryRunResult = await buildRunner.buildDryRun( linkModePreference: LinkModePreferenceImpl.dynamic, targetOS: targetOS, workingDirectory: projectUri, includeParentEnvironment: true, ); - ensureNativeAssetsBuildSucceed(dryRunResult); - final List nativeAssets = dryRunResult.assets; + ensureNativeAssetsBuildDryRunSucceed(buildDryRunResult); + final LinkDryRunResult linkDryRunResult = await buildRunner.linkDryRun( + linkModePreference: LinkModePreferenceImpl.dynamic, + targetOS: targetOS, + workingDirectory: projectUri, + includeParentEnvironment: true, + buildDryRunResult: buildDryRunResult, + ); + ensureNativeAssetsLinkDryRunSucceed(linkDryRunResult); + final List nativeAssets = [ + ...buildDryRunResult.assets, + ...linkDryRunResult.assets, + ]; ensureNoLinkModeStatic(nativeAssets); globals.logger.printTrace('Dry running native assets for $targetOS done.'); final Map assetTargetLocations = @@ -97,7 +108,19 @@ Future<(Uri? nativeAssetsYaml, List dependencies)> final List nativeAssets = []; final Set dependencies = {}; for (final Target target in targets) { - final BuildResult result = await buildRunner.build( + final BuildResult buildResult = await buildRunner.build( + linkModePreference: LinkModePreferenceImpl.dynamic, + target: target, + buildMode: buildModeCli, + workingDirectory: projectUri, + includeParentEnvironment: true, + cCompilerConfig: await buildRunner.ndkCCompilerConfigImpl, + targetAndroidNdkApi: targetAndroidNdkApi, + ); + ensureNativeAssetsBuildSucceed(buildResult); + nativeAssets.addAll(buildResult.assets); + dependencies.addAll(buildResult.dependencies); + final LinkResult linkResult = await buildRunner.link( linkModePreference: LinkModePreferenceImpl.dynamic, target: target, buildMode: buildModeCli, @@ -105,10 +128,11 @@ Future<(Uri? nativeAssetsYaml, List dependencies)> includeParentEnvironment: true, cCompilerConfig: await buildRunner.ndkCCompilerConfigImpl, targetAndroidNdkApi: targetAndroidNdkApi, + buildResult: buildResult, ); - ensureNativeAssetsBuildSucceed(result); - nativeAssets.addAll(result.assets); - dependencies.addAll(result.dependencies); + ensureNativeAssetsLinkSucceed(linkResult); + nativeAssets.addAll(linkResult.assets); + dependencies.addAll(linkResult.dependencies); } ensureNoLinkModeStatic(nativeAssets); globals.logger.printTrace('Building native assets for $targets done.'); diff --git a/packages/flutter_tools/lib/src/isolated/native_assets/ios/native_assets.dart b/packages/flutter_tools/lib/src/isolated/native_assets/ios/native_assets.dart index 578908565b1e9..09a1df007efa7 100644 --- a/packages/flutter_tools/lib/src/isolated/native_assets/ios/native_assets.dart +++ b/packages/flutter_tools/lib/src/isolated/native_assets/ios/native_assets.dart @@ -48,14 +48,25 @@ Future> dryRunNativeAssetsIOSInternal( ) async { const OSImpl targetOS = OSImpl.iOS; globals.logger.printTrace('Dry running native assets for $targetOS.'); - final DryRunResult dryRunResult = await buildRunner.dryRun( + final BuildDryRunResult buildDryRunResult = await buildRunner.buildDryRun( linkModePreference: LinkModePreferenceImpl.dynamic, targetOS: targetOS, workingDirectory: projectUri, includeParentEnvironment: true, ); - ensureNativeAssetsBuildSucceed(dryRunResult); - final List nativeAssets = dryRunResult.assets; + ensureNativeAssetsBuildDryRunSucceed(buildDryRunResult); + final LinkDryRunResult linkDryRunResult = await buildRunner.linkDryRun( + linkModePreference: LinkModePreferenceImpl.dynamic, + targetOS: targetOS, + workingDirectory: projectUri, + includeParentEnvironment: true, + buildDryRunResult: buildDryRunResult, + ); + ensureNativeAssetsLinkDryRunSucceed(linkDryRunResult); + final List nativeAssets = [ + ...buildDryRunResult.assets, + ...linkDryRunResult.assets, + ]; ensureNoLinkModeStatic(nativeAssets); globals.logger.printTrace('Dry running native assets for $targetOS done.'); return _assetTargetLocations(nativeAssets).values; @@ -88,7 +99,7 @@ Future> buildNativeAssetsIOS({ final List nativeAssets = []; final Set dependencies = {}; for (final Target target in targets) { - final BuildResult result = await buildRunner.build( + final BuildResult buildResult = await buildRunner.build( linkModePreference: LinkModePreferenceImpl.dynamic, target: target, targetIOSSdkImpl: iosSdk, @@ -97,9 +108,22 @@ Future> buildNativeAssetsIOS({ includeParentEnvironment: true, cCompilerConfig: await buildRunner.cCompilerConfig, ); - ensureNativeAssetsBuildSucceed(result); - nativeAssets.addAll(result.assets); - dependencies.addAll(result.dependencies); + ensureNativeAssetsBuildSucceed(buildResult); + nativeAssets.addAll(buildResult.assets); + dependencies.addAll(buildResult.dependencies); + final LinkResult linkResult = await buildRunner.link( + linkModePreference: LinkModePreferenceImpl.dynamic, + target: target, + targetIOSSdkImpl: iosSdk, + buildMode: buildModeCli, + workingDirectory: projectUri, + includeParentEnvironment: true, + cCompilerConfig: await buildRunner.cCompilerConfig, + buildResult: buildResult, + ); + ensureNativeAssetsLinkSucceed(linkResult); + nativeAssets.addAll(linkResult.assets); + dependencies.addAll(linkResult.dependencies); } ensureNoLinkModeStatic(nativeAssets); globals.logger.printTrace('Building native assets for $targets done.'); @@ -162,14 +186,23 @@ Map> _fatAssetTargetLocations( Map _assetTargetLocations( List nativeAssets) { final Set alreadyTakenNames = {}; - return { - for (final AssetImpl asset in nativeAssets) - asset: _targetLocationIOS(asset, alreadyTakenNames), - }; + final Map idToPath = {}; + final Map result = {}; + for (final AssetImpl asset in nativeAssets) { + final KernelAssetPath path = idToPath[asset.id] ?? + _targetLocationIOS(asset, alreadyTakenNames).path; + idToPath[asset.id] = path; + result[asset] = KernelAsset( + id: (asset as NativeCodeAssetImpl).id, + target: Target.fromArchitectureAndOS(asset.architecture!, asset.os), + path: path, + ); + } + return result; } KernelAsset _targetLocationIOS(AssetImpl asset, Set alreadyTakenNames) { - final LinkModeImpl linkMode = (asset as NativeCodeAssetImpl).linkMode; +final LinkModeImpl linkMode = (asset as NativeCodeAssetImpl).linkMode; final KernelAssetPath kernelAssetPath; switch (linkMode) { case DynamicLoadingSystemImpl _: diff --git a/packages/flutter_tools/lib/src/isolated/native_assets/macos/native_assets.dart b/packages/flutter_tools/lib/src/isolated/native_assets/macos/native_assets.dart index 54677a6388712..c506c7f80a1ac 100644 --- a/packages/flutter_tools/lib/src/isolated/native_assets/macos/native_assets.dart +++ b/packages/flutter_tools/lib/src/isolated/native_assets/macos/native_assets.dart @@ -52,14 +52,25 @@ Future> dryRunNativeAssetsMacOSInternal( final Uri buildUri = nativeAssetsBuildUri(projectUri, targetOS); globals.logger.printTrace('Dry running native assets for $targetOS.'); - final DryRunResult dryRunResult = await buildRunner.dryRun( + final BuildDryRunResult buildDryRunResult = await buildRunner.buildDryRun( linkModePreference: LinkModePreferenceImpl.dynamic, targetOS: targetOS, workingDirectory: projectUri, includeParentEnvironment: true, ); - ensureNativeAssetsBuildSucceed(dryRunResult); - final List nativeAssets = dryRunResult.assets; + ensureNativeAssetsBuildDryRunSucceed(buildDryRunResult); + final LinkDryRunResult linkDryRunResult = await buildRunner.linkDryRun( + linkModePreference: LinkModePreferenceImpl.dynamic, + targetOS: targetOS, + workingDirectory: projectUri, + includeParentEnvironment: true, + buildDryRunResult: buildDryRunResult, + ); + ensureNativeAssetsLinkDryRunSucceed(linkDryRunResult); + final List nativeAssets = [ + ...buildDryRunResult.assets, + ...linkDryRunResult.assets, + ]; ensureNoLinkModeStatic(nativeAssets); globals.logger.printTrace('Dry running native assets for $targetOS done.'); final Uri? absolutePath = flutterTester ? buildUri : null; @@ -110,17 +121,29 @@ Future<(Uri? nativeAssetsYaml, List dependencies)> buildNativeAssetsMacOS({ final List nativeAssets = []; final Set dependencies = {}; for (final Target target in targets) { - final BuildResult result = await buildRunner.build( + final BuildResult buildResult = await buildRunner.build( + linkModePreference: LinkModePreferenceImpl.dynamic, + target: target, + buildMode: buildModeCli, + workingDirectory: projectUri, + includeParentEnvironment: true, + cCompilerConfig: await buildRunner.cCompilerConfig, + ); + ensureNativeAssetsBuildSucceed(buildResult); + nativeAssets.addAll(buildResult.assets); + dependencies.addAll(buildResult.dependencies); + final LinkResult linkResult = await buildRunner.link( linkModePreference: LinkModePreferenceImpl.dynamic, target: target, buildMode: buildModeCli, workingDirectory: projectUri, includeParentEnvironment: true, cCompilerConfig: await buildRunner.cCompilerConfig, + buildResult: buildResult, ); - ensureNativeAssetsBuildSucceed(result); - nativeAssets.addAll(result.assets); - dependencies.addAll(result.dependencies); + ensureNativeAssetsLinkSucceed(linkResult); + nativeAssets.addAll(linkResult.assets); + dependencies.addAll(linkResult.dependencies); } ensureNoLinkModeStatic(nativeAssets); globals.logger.printTrace('Building native assets for $targets done.'); diff --git a/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart b/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart index f644246fda581..843c7b3ca77db 100644 --- a/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart +++ b/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart @@ -38,14 +38,14 @@ abstract class NativeAssetsBuildRunner { /// Whether the project has a `.dart_tools/package_config.json`. /// /// If there is no package config, [packagesWithNativeAssets], [build], and - /// [dryRun] must not be invoked. + /// [buildDryRun] must not be invoked. Future hasPackageConfig(); /// All packages in the transitive dependencies that have a `build.dart`. Future> packagesWithNativeAssets(); /// Runs all [packagesWithNativeAssets] `build.dart` in dry run. - Future dryRun({ + Future buildDryRun({ required bool includeParentEnvironment, required LinkModePreferenceImpl linkModePreference, required OSImpl targetOS, @@ -64,6 +64,28 @@ abstract class NativeAssetsBuildRunner { IOSSdkImpl? targetIOSSdkImpl, }); + /// Runs all [packagesWithNativeAssets] `link.dart` in dry run. + Future linkDryRun({ + required bool includeParentEnvironment, + required LinkModePreferenceImpl linkModePreference, + required OSImpl targetOS, + required Uri workingDirectory, + required BuildDryRunResult buildDryRunResult, + }); + + /// Runs all [packagesWithNativeAssets] `link.dart`. + Future link({ + required bool includeParentEnvironment, + required BuildModeImpl buildMode, + required LinkModePreferenceImpl linkModePreference, + required Target target, + required Uri workingDirectory, + required BuildResult buildResult, + CCompilerConfigImpl? cCompilerConfig, + int? targetAndroidNdkApi, + IOSSdkImpl? targetIOSSdkImpl, + }); + /// The C compiler config to use for compilation. Future get cCompilerConfig; @@ -120,11 +142,14 @@ class NativeAssetsBuildRunnerImpl implements NativeAssetsBuildRunner { packageConfig, projectUri.resolve('.dart_tool/package_config.json'), ); - return packageLayout.packagesWithNativeAssets; + // It suffices to only check for build hooks. If no packages have a build + // hook. Then no build hook will output any assets for any link hook, and + // thus the link hooks will never be run. + return packageLayout.packagesWithAssets(Hook.build); } @override - Future dryRun({ + Future buildDryRun({ required bool includeParentEnvironment, required LinkModePreferenceImpl linkModePreference, required OSImpl targetOS, @@ -134,7 +159,7 @@ class NativeAssetsBuildRunnerImpl implements NativeAssetsBuildRunner { packageConfig, projectUri.resolve('.dart_tool/package_config.json'), ); - return _buildRunner.dryRun( + return _buildRunner.buildDryRun( includeParentEnvironment: includeParentEnvironment, linkModePreference: linkModePreference, targetOS: targetOS, @@ -171,6 +196,59 @@ class NativeAssetsBuildRunnerImpl implements NativeAssetsBuildRunner { ); } + + @override + Future linkDryRun({ + required bool includeParentEnvironment, + required LinkModePreferenceImpl linkModePreference, + required OSImpl targetOS, + required Uri workingDirectory, + required BuildDryRunResult buildDryRunResult, + }) { + final PackageLayout packageLayout = PackageLayout.fromPackageConfig( + packageConfig, + projectUri.resolve('.dart_tool/package_config.json'), + ); + return _buildRunner.linkDryRun( + includeParentEnvironment: includeParentEnvironment, + linkModePreference: linkModePreference, + targetOS: targetOS, + workingDirectory: workingDirectory, + packageLayout: packageLayout, + buildDryRunResult: buildDryRunResult, + ); + } + + @override + Future link({ + required bool includeParentEnvironment, + required BuildModeImpl buildMode, + required LinkModePreferenceImpl linkModePreference, + required Target target, + required Uri workingDirectory, + required BuildResult buildResult, + CCompilerConfigImpl? cCompilerConfig, + int? targetAndroidNdkApi, + IOSSdkImpl? targetIOSSdkImpl, + }) { + final PackageLayout packageLayout = PackageLayout.fromPackageConfig( + packageConfig, + projectUri.resolve('.dart_tool/package_config.json'), + ); + return _buildRunner.link( + buildMode: buildMode, + cCompilerConfig: cCompilerConfig, + includeParentEnvironment: includeParentEnvironment, + linkModePreference: linkModePreference, + target: target, + targetAndroidNdkApi: targetAndroidNdkApi, + targetIOSSdk: targetIOSSdkImpl, + workingDirectory: workingDirectory, + packageLayout: packageLayout, + buildResult: buildResult, + ); + } + @override late final Future cCompilerConfig = () { if (globals.platform.isMacOS || globals.platform.isIOS) { @@ -560,14 +638,25 @@ Future> dryRunNativeAssetsSingleArchitectureInternal( globals.logger.printTrace('Dry running native assets for $targetOS.'); - final DryRunResult dryRunResult = await buildRunner.dryRun( + final BuildDryRunResult buildDryRunResult = await buildRunner.buildDryRun( linkModePreference: LinkModePreferenceImpl.dynamic, targetOS: targetOS, workingDirectory: projectUri, includeParentEnvironment: true, ); - ensureNativeAssetsBuildSucceed(dryRunResult); - final List nativeAssets = dryRunResult.assets; + ensureNativeAssetsBuildDryRunSucceed(buildDryRunResult); + final LinkDryRunResult linkDryRunResult = await buildRunner.linkDryRun( + linkModePreference: LinkModePreferenceImpl.dynamic, + targetOS: targetOS, + workingDirectory: projectUri, + includeParentEnvironment: true, + buildDryRunResult: buildDryRunResult, + ); + ensureNativeAssetsLinkDryRunSucceed(linkDryRunResult); + final List nativeAssets = [ + ...buildDryRunResult.assets, + ...linkDryRunResult.assets, + ]; ensureNoLinkModeStatic(nativeAssets); globals.logger.printTrace('Dry running native assets for $targetOS done.'); final Uri? absolutePath = flutterTester ? buildUri : null; @@ -615,7 +704,7 @@ Future<(Uri? nativeAssetsYaml, List dependencies)> buildNativeAssetsSingleA final BuildModeImpl buildModeCli = nativeAssetsBuildMode(buildMode); globals.logger.printTrace('Building native assets for $target $buildModeCli.'); - final BuildResult result = await buildRunner.build( + final BuildResult buildResult = await buildRunner.build( linkModePreference: LinkModePreferenceImpl.dynamic, target: target, buildMode: buildModeCli, @@ -623,9 +712,25 @@ Future<(Uri? nativeAssetsYaml, List dependencies)> buildNativeAssetsSingleA includeParentEnvironment: true, cCompilerConfig: await buildRunner.cCompilerConfig, ); - ensureNativeAssetsBuildSucceed(result); - final List nativeAssets = result.assets; - final Set dependencies = result.dependencies.toSet(); + ensureNativeAssetsBuildSucceed(buildResult); + final LinkResult linkResult = await buildRunner.link( + linkModePreference: LinkModePreferenceImpl.dynamic, + target: target, + buildMode: buildModeCli, + workingDirectory: projectUri, + includeParentEnvironment: true, + cCompilerConfig: await buildRunner.ndkCCompilerConfigImpl, + buildResult: buildResult, + ); + ensureNativeAssetsLinkSucceed(linkResult); + final List nativeAssets = [ + ...buildResult.assets, + ...linkResult.assets, + ]; + final Set dependencies = { + ...buildResult.dependencies, + ...linkResult.dependencies, + }; ensureNoLinkModeStatic(nativeAssets); globals.logger.printTrace('Building native assets for $target done.'); final Uri? absolutePath = flutterTester ? buildUri : null; @@ -751,10 +856,34 @@ Future _copyNativeAssetsSingleArchitecture( } } -void ensureNativeAssetsBuildSucceed(DryRunResult result) { +void ensureNativeAssetsBuildDryRunSucceed(BuildDryRunResult result) { + if (!result.success) { + throwToolExit( + 'Building (dry run) native assets failed. See the logs for more details.', + ); + } +} + +void ensureNativeAssetsBuildSucceed(BuildResult result) { if (!result.success) { throwToolExit( 'Building native assets failed. See the logs for more details.', ); } } + +void ensureNativeAssetsLinkDryRunSucceed(LinkDryRunResult result) { + if (!result.success) { + throwToolExit( + 'Linking (dry run) native assets failed. See the logs for more details.', + ); + } +} + +void ensureNativeAssetsLinkSucceed(LinkResult result) { + if (!result.success) { + throwToolExit( + 'Linking native assets failed. See the logs for more details.', + ); + } +} diff --git a/packages/flutter_tools/lib/src/test/web_test_compiler.dart b/packages/flutter_tools/lib/src/test/web_test_compiler.dart index 1d2a3bcbccc3d..04ec506cbab74 100644 --- a/packages/flutter_tools/lib/src/test/web_test_compiler.dart +++ b/packages/flutter_tools/lib/src/test/web_test_compiler.dart @@ -222,7 +222,6 @@ class WebTestCompiler { languageVersion: currentLanguageVersion(_fileSystem, Cache.flutterRoot!), ); - final String dartSdkPath = _artifacts.getArtifactPath(Artifact.engineDartSdkPath, platform: TargetPlatform.web_javascript); final String platformBinariesPath = _artifacts.getHostArtifact(HostArtifact.webPlatformKernelFolder).path; final String platformFilePath = _fileSystem.path.join(platformBinariesPath, 'dart2wasm_platform.dill'); final List dartDefines = webRenderer.updateDartDefines(buildInfo.dartDefines); @@ -233,7 +232,6 @@ class WebTestCompiler { 'compile', 'wasm', '--packages=.dart_tool/package_config.json', - '--extra-compiler-option=--dart-sdk=$dartSdkPath', '--extra-compiler-option=--platform=$platformFilePath', '--extra-compiler-option=--multi-root-scheme=org-dartlang-app', '--extra-compiler-option=--multi-root=${projectDirectory.childDirectory('test').path}', diff --git a/packages/flutter_tools/lib/src/web/compile.dart b/packages/flutter_tools/lib/src/web/compile.dart index 66a99ad85bb96..3164f483076be 100644 --- a/packages/flutter_tools/lib/src/web/compile.dart +++ b/packages/flutter_tools/lib/src/web/compile.dart @@ -196,7 +196,7 @@ enum WebRendererMode implements CliEnum { } @override - String get cliName => snakeCase(name, '-'); + String get cliName => kebabCase(name); @override String get helpText => switch (this) { diff --git a/packages/flutter_tools/lib/src/web/file_generators/flutter_service_worker_js.dart b/packages/flutter_tools/lib/src/web/file_generators/flutter_service_worker_js.dart index e70677a4df6c3..02f578180e231 100644 --- a/packages/flutter_tools/lib/src/web/file_generators/flutter_service_worker_js.dart +++ b/packages/flutter_tools/lib/src/web/file_generators/flutter_service_worker_js.dart @@ -15,7 +15,7 @@ enum ServiceWorkerStrategy implements CliEnum { none; @override - String get cliName => snakeCase(name, '-'); + String get cliName => kebabCase(name); static ServiceWorkerStrategy fromCliName(String? value) => value == null ? ServiceWorkerStrategy.offlineFirst diff --git a/packages/flutter_tools/pubspec.yaml b/packages/flutter_tools/pubspec.yaml index 16e17863af019..20add0fcb9860 100644 --- a/packages/flutter_tools/pubspec.yaml +++ b/packages/flutter_tools/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: html: 0.15.4 http: 0.13.6 intl: 0.19.0 - meta: 1.14.0 + meta: 1.15.0 multicast_dns: 0.3.2+6 mustache_template: 2.0.0 package_config: 2.1.0 @@ -56,8 +56,8 @@ dependencies: cli_config: 0.2.0 graphs: 2.3.1 - native_assets_builder: 0.6.1 - native_assets_cli: 0.5.4 + native_assets_builder: 0.7.0 + native_assets_cli: 0.6.0 # We depend on very specific internal implementation details of the # 'test' package, which change between versions, so when upgrading @@ -69,8 +69,8 @@ dependencies: standard_message_codec: 0.0.1+4 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" built_collection: 5.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" built_value: 8.9.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -120,4 +120,4 @@ dartdoc: # Exclude this package from the hosted API docs. nodoc: true -# PUBSPEC CHECKSUM: d60f +# PUBSPEC CHECKSUM: e80f diff --git a/packages/flutter_tools/templates/package_ffi/pubspec.yaml.tmpl b/packages/flutter_tools/templates/package_ffi/pubspec.yaml.tmpl index 093b354f791e9..fa72154cdfc9f 100644 --- a/packages/flutter_tools/templates/package_ffi/pubspec.yaml.tmpl +++ b/packages/flutter_tools/templates/package_ffi/pubspec.yaml.tmpl @@ -9,11 +9,11 @@ environment: dependencies: cli_config: ^0.2.0 logging: ^1.2.0 - native_assets_cli: ^0.5.3 - native_toolchain_c: ^0.4.1 + native_assets_cli: ^0.6.0 + native_toolchain_c: ^0.4.2 dev_dependencies: - ffi: ^2.1.0 - ffigen: ^11.0.0 + ffi: ^2.1.2 + ffigen: ^12.0.0 flutter_lints: ^4.0.0 test: ^1.24.9 diff --git a/packages/flutter_tools/test/commands.shard/permeable/create_test.dart b/packages/flutter_tools/test/commands.shard/permeable/create_test.dart index 9782b28d9c6fd..5fc257ce710e3 100644 --- a/packages/flutter_tools/test/commands.shard/permeable/create_test.dart +++ b/packages/flutter_tools/test/commands.shard/permeable/create_test.dart @@ -2109,6 +2109,52 @@ void main() { )); }); + testUsingContext('does not remove an existing test/ directory when recreating an application project with the --empty flag', () async { + await _createProject( + projectDir, + ['--no-pub', '--empty'], + [], + ); + + projectDir.childDirectory('test').childFile('example_test.dart').createSync(recursive: true); + + await _createProject( + projectDir, + ['--no-pub', '--empty'], + ['test/example_test.dart'], + ); + + expect(projectDir.childDirectory('test').childFile('example_test.dart'), exists); + }); + + testUsingContext('does not create a test/ directory when creating a new application project with the --empty flag', () async { + await _createProject( + projectDir, + ['--no-pub', '--empty'], + [], + unexpectedPaths: ['test'], + ); + + expect(projectDir.childDirectory('test'), isNot(exists)); + }); + + testUsingContext("does not create a test/ directory, if it doesn't already exist, when recreating an application project with the --empty flag", () async { + await _createProject( + projectDir, + ['--no-pub', '--empty'], + [], + ); + + await _createProject( + projectDir, + ['--no-pub', '--empty'], + [], + unexpectedPaths: ['test'], + ); + + expect(projectDir.childDirectory('test'), isNot(exists)); + }); + testUsingContext('can create a sample-based project', () async { await _createAndAnalyzeProject( projectDir, diff --git a/packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart b/packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart index 7ef04d46d8ef7..ff2cdb6e991a6 100644 --- a/packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart @@ -34,7 +34,6 @@ const List _kDart2WasmLinuxArgs = [ 'compile', 'wasm', '--packages=.dart_tool/package_config.json', - '--extra-compiler-option=--dart-sdk=Artifact.engineDartSdkPath.TargetPlatform.web_javascript', '--extra-compiler-option=--platform=HostArtifact.webPlatformKernelFolder/dart2wasm_platform.dill', '--extra-compiler-option=--delete-tostring-package-uri=dart:ui', '--extra-compiler-option=--delete-tostring-package-uri=package:flutter', diff --git a/packages/flutter_tools/test/general.shard/isolated/android/native_assets_test.dart b/packages/flutter_tools/test/general.shard/isolated/android/native_assets_test.dart index 17fb07bba9f76..60ca0609a55db 100644 --- a/packages/flutter_tools/test/general.shard/isolated/android/native_assets_test.dart +++ b/packages/flutter_tools/test/general.shard/isolated/android/native_assets_test.dart @@ -117,32 +117,33 @@ void main() { final File packageConfig = environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); + final FakeNativeAssetsBuildRunner buildRunner = FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildDryRunResult: FakeNativeAssetsBuilderResult( + assets: [ + NativeCodeAssetImpl( + id: 'package:bar/bar.dart', + linkMode: DynamicLoadingBundledImpl(), + os: OSImpl.macOS, + architecture: ArchitectureImpl.arm64, + file: Uri.file('libbar.so'), + ), + NativeCodeAssetImpl( + id: 'package:bar/bar.dart', + linkMode: DynamicLoadingBundledImpl(), + os: OSImpl.macOS, + architecture: ArchitectureImpl.x64, + file: Uri.file('libbar.so'), + ), + ], + ), + ); final Uri? nativeAssetsYaml = await dryRunNativeAssetsAndroid( projectUri: projectUri, fileSystem: fileSystem, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - dryRunResult: FakeNativeAssetsBuilderResult( - assets: [ - NativeCodeAssetImpl( - id: 'package:bar/bar.dart', - linkMode: DynamicLoadingBundledImpl(), - os: OSImpl.macOS, - architecture: ArchitectureImpl.arm64, - file: Uri.file('libbar.so'), - ), - NativeCodeAssetImpl( - id: 'package:bar/bar.dart', - linkMode: DynamicLoadingBundledImpl(), - os: OSImpl.macOS, - architecture: ArchitectureImpl.x64, - file: Uri.file('libbar.so'), - ), - ], - ), - ), + buildRunner: buildRunner, ); expect( (globals.logger as BufferLogger).traceText, @@ -159,6 +160,8 @@ void main() { await fileSystem.file(nativeAssetsYaml).readAsString(), contains('package:bar/bar.dart'), ); + expect(buildRunner.buildDryRunInvocations, 1); + expect(buildRunner.linkDryRunInvocations, 1); }); testUsingContext('build with assets but not enabled', () async { @@ -224,6 +227,22 @@ void main() { final File dylibAfterCompiling = fileSystem.file('libbar.so'); // The mock doesn't create the file, so create it here. await dylibAfterCompiling.create(); + final FakeNativeAssetsBuildRunner buildRunner = FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildResult: FakeNativeAssetsBuilderResult( + assets: [ + NativeCodeAssetImpl( + id: 'package:bar/bar.dart', + linkMode: DynamicLoadingBundledImpl(), + os: OSImpl.android, + architecture: ArchitectureImpl.arm64, + file: Uri.file('libbar.so'), + ), + ], + ), + ); await buildNativeAssetsAndroid( androidArchs: [AndroidArch.arm64_v8a], targetAndroidNdkApi: 21, @@ -231,22 +250,7 @@ void main() { buildMode: BuildMode.debug, fileSystem: fileSystem, yamlParentDirectory: environment.buildDir.uri, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - buildResult: FakeNativeAssetsBuilderResult( - assets: [ - NativeCodeAssetImpl( - id: 'package:bar/bar.dart', - linkMode: DynamicLoadingBundledImpl(), - os: OSImpl.android, - architecture: ArchitectureImpl.arm64, - file: Uri.file('libbar.so'), - ), - ], - ), - ), + buildRunner: buildRunner, ); expect( (globals.logger as BufferLogger).traceText, @@ -259,6 +263,8 @@ void main() { environment.buildDir.childFile('native_assets.yaml'), exists, ); + expect(buildRunner.buildInvocations, 1); + expect(buildRunner.linkInvocations, 1); }); // Ensure no exceptions for a non installed NDK are thrown if no native @@ -314,7 +320,6 @@ void main() { ); }); - testUsingContext('Native assets dry run error', overrides: { FeatureFlags: () => TestFeatureFlags(isNativeAssetsEnabled: true), ProcessManager: () => FakeProcessManager.empty(), @@ -323,24 +328,29 @@ void main() { environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); - expect( - () => dryRunNativeAssetsAndroid( - projectUri: projectUri, - fileSystem: fileSystem, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - dryRunResult: const FakeNativeAssetsBuilderResult( - success: false, + for (final String hook in ['Building', 'Linking']) { + expect( + () => dryRunNativeAssetsAndroid( + projectUri: projectUri, + fileSystem: fileSystem, + buildRunner: FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildDryRunResult: FakeNativeAssetsBuilderResult( + success: hook != 'Building', + ), + linkDryRunResult: FakeNativeAssetsBuilderResult( + success: hook != 'Linking', + ), ), ), - ), - throwsToolExit( - message: - 'Building native assets failed. See the logs for more details.', - ), - ); + throwsToolExit( + message: + '$hook (dry run) native assets failed. See the logs for more details.', + ), + ); + } }); testUsingContext('Native assets build error', overrides: { @@ -351,28 +361,33 @@ void main() { environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); - expect( - () => buildNativeAssetsAndroid( - androidArchs: [AndroidArch.arm64_v8a], - targetAndroidNdkApi: 21, - projectUri: projectUri, - buildMode: BuildMode.debug, - fileSystem: fileSystem, - yamlParentDirectory: environment.buildDir.uri, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - buildResult: const FakeNativeAssetsBuilderResult( - success: false, + for (final String hook in ['Building', 'Linking']) { + expect( + () => buildNativeAssetsAndroid( + androidArchs: [AndroidArch.arm64_v8a], + targetAndroidNdkApi: 21, + projectUri: projectUri, + buildMode: BuildMode.debug, + fileSystem: fileSystem, + yamlParentDirectory: environment.buildDir.uri, + buildRunner: FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildResult: FakeNativeAssetsBuilderResult( + success: hook != 'Building', + ), + linkResult: FakeNativeAssetsBuilderResult( + success: hook != 'Linking', + ), ), ), - ), - throwsToolExit( - message: - 'Building native assets failed. See the logs for more details.', - ), - ); + throwsToolExit( + message: + '$hook native assets failed. See the logs for more details.', + ), + ); + } }); } diff --git a/packages/flutter_tools/test/general.shard/isolated/fake_native_assets_build_runner.dart b/packages/flutter_tools/test/general.shard/isolated/fake_native_assets_build_runner.dart index c3dd78062d177..88f51d59e3dec 100644 --- a/packages/flutter_tools/test/general.shard/isolated/fake_native_assets_build_runner.dart +++ b/packages/flutter_tools/test/general.shard/isolated/fake_native_assets_build_runner.dart @@ -19,8 +19,10 @@ class FakeNativeAssetsBuildRunner implements NativeAssetsBuildRunner { this.hasPackageConfigResult = true, this.packagesWithNativeAssetsResult = const [], this.onBuild, - this.dryRunResult = const FakeNativeAssetsBuilderResult(), + this.buildDryRunResult = const FakeNativeAssetsBuilderResult(), this.buildResult = const FakeNativeAssetsBuilderResult(), + this.linkResult = const FakeNativeAssetsBuilderResult(), + this.linkDryRunResult = const FakeNativeAssetsBuilderResult(), CCompilerConfigImpl? cCompilerConfigResult, CCompilerConfigImpl? ndkCCompilerConfigImplResult, }) : cCompilerConfigResult = cCompilerConfigResult ?? CCompilerConfigImpl(), @@ -29,14 +31,18 @@ class FakeNativeAssetsBuildRunner implements NativeAssetsBuildRunner { final native_assets_builder.BuildResult Function(Target)? onBuild; final native_assets_builder.BuildResult buildResult; - final native_assets_builder.DryRunResult dryRunResult; + final native_assets_builder.LinkResult linkResult; + final native_assets_builder.BuildDryRunResult buildDryRunResult; + final native_assets_builder.LinkDryRunResult linkDryRunResult; final bool hasPackageConfigResult; final List packagesWithNativeAssetsResult; final CCompilerConfigImpl cCompilerConfigResult; final CCompilerConfigImpl ndkCCompilerConfigImplResult; int buildInvocations = 0; - int dryRunInvocations = 0; + int buildDryRunInvocations = 0; + int linkInvocations = 0; + int linkDryRunInvocations = 0; int hasPackageConfigInvocations = 0; int packagesWithNativeAssetsInvocations = 0; BuildModeImpl? lastBuildMode; @@ -58,14 +64,43 @@ class FakeNativeAssetsBuildRunner implements NativeAssetsBuildRunner { } @override - Future dryRun({ + Future link({ + required bool includeParentEnvironment, + required BuildModeImpl buildMode, + required LinkModePreferenceImpl linkModePreference, + required Target target, + required Uri workingDirectory, + required native_assets_builder.BuildResult buildResult, + CCompilerConfigImpl? cCompilerConfig, + int? targetAndroidNdkApi, + IOSSdkImpl? targetIOSSdkImpl, + }) async { + linkInvocations++; + lastBuildMode = buildMode; + return linkResult; + } + + @override + Future buildDryRun({ required bool includeParentEnvironment, required LinkModePreferenceImpl linkModePreference, required OSImpl targetOS, required Uri workingDirectory, }) async { - dryRunInvocations++; - return dryRunResult; + buildDryRunInvocations++; + return buildDryRunResult; + } + + @override + Future linkDryRun({ + required bool includeParentEnvironment, + required LinkModePreferenceImpl linkModePreference, + required OSImpl targetOS, + required Uri workingDirectory, + required native_assets_builder.BuildDryRunResult buildDryRunResult, + }) async { + linkDryRunInvocations++; + return linkDryRunResult; } @override @@ -90,9 +125,14 @@ class FakeNativeAssetsBuildRunner implements NativeAssetsBuildRunner { } final class FakeNativeAssetsBuilderResult - implements native_assets_builder.BuildResult { + implements + native_assets_builder.BuildResult, + native_assets_builder.BuildDryRunResult, + native_assets_builder.LinkResult, + native_assets_builder.LinkDryRunResult { const FakeNativeAssetsBuilderResult({ this.assets = const [], + this.assetsForLinking = const >{}, this.dependencies = const [], this.success = true, }); @@ -100,6 +140,9 @@ final class FakeNativeAssetsBuilderResult @override final List assets; + @override + final Map> assetsForLinking; + @override final List dependencies; diff --git a/packages/flutter_tools/test/general.shard/isolated/hot_test.dart b/packages/flutter_tools/test/general.shard/isolated/hot_test.dart index b4a99f532fad5..ff10468eec64f 100644 --- a/packages/flutter_tools/test/general.shard/isolated/hot_test.dart +++ b/packages/flutter_tools/test/general.shard/isolated/hot_test.dart @@ -62,7 +62,7 @@ void main() { packagesWithNativeAssetsResult: [ Package('bar', fileSystem.currentDirectory.uri), ], - dryRunResult: FakeNativeAssetsBuilderResult( + buildDryRunResult: FakeNativeAssetsBuilderResult( assets: [ NativeCodeAssetImpl( id: 'package:bar/bar.dart', @@ -95,7 +95,9 @@ void main() { // Hot restart does not require rerunning anything for native assets. // The previous native assets mapping should be used. expect(buildRunner.buildInvocations, 0); - expect(buildRunner.dryRunInvocations, 0); + expect(buildRunner.buildDryRunInvocations, 0); + expect(buildRunner.linkInvocations, 0); + expect(buildRunner.linkDryRunInvocations, 0); expect(buildRunner.hasPackageConfigInvocations, 0); expect(buildRunner.packagesWithNativeAssetsInvocations, 0); }, overrides: { @@ -129,7 +131,7 @@ void main() { packagesWithNativeAssetsResult: [ Package('bar', fileSystem.currentDirectory.uri), ], - dryRunResult: FakeNativeAssetsBuilderResult( + buildDryRunResult: FakeNativeAssetsBuilderResult( assets: [ NativeCodeAssetImpl( id: 'package:bar/bar.dart', diff --git a/packages/flutter_tools/test/general.shard/isolated/ios/native_assets_test.dart b/packages/flutter_tools/test/general.shard/isolated/ios/native_assets_test.dart index d1320657569d0..94b7cb7ed1283 100644 --- a/packages/flutter_tools/test/general.shard/isolated/ios/native_assets_test.dart +++ b/packages/flutter_tools/test/general.shard/isolated/ios/native_assets_test.dart @@ -119,32 +119,33 @@ void main() { final File packageConfig = environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); + final FakeNativeAssetsBuildRunner buildRunner = FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildDryRunResult: FakeNativeAssetsBuilderResult( + assets: [ + NativeCodeAssetImpl( + id: 'package:bar/bar.dart', + linkMode: DynamicLoadingBundledImpl(), + os: OSImpl.macOS, + architecture: ArchitectureImpl.arm64, + file: Uri.file('libbar.dylib'), + ), + NativeCodeAssetImpl( + id: 'package:bar/bar.dart', + linkMode: DynamicLoadingBundledImpl(), + os: OSImpl.macOS, + architecture: ArchitectureImpl.x64, + file: Uri.file('libbar.dylib'), + ), + ], + ), + ); final Uri? nativeAssetsYaml = await dryRunNativeAssetsIOS( projectUri: projectUri, fileSystem: fileSystem, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - dryRunResult: FakeNativeAssetsBuilderResult( - assets: [ - NativeCodeAssetImpl( - id: 'package:bar/bar.dart', - linkMode: DynamicLoadingBundledImpl(), - os: OSImpl.macOS, - architecture: ArchitectureImpl.arm64, - file: Uri.file('libbar.dylib'), - ), - NativeCodeAssetImpl( - id: 'package:bar/bar.dart', - linkMode: DynamicLoadingBundledImpl(), - os: OSImpl.macOS, - architecture: ArchitectureImpl.x64, - file: Uri.file('libbar.dylib'), - ), - ], - ), - ), + buildRunner: buildRunner, ); expect( (globals.logger as BufferLogger).traceText, @@ -161,6 +162,8 @@ void main() { await fileSystem.file(nativeAssetsYaml).readAsString(), contains('package:bar/bar.dart'), ); + expect(buildRunner.buildDryRunInvocations, 1); + expect(buildRunner.linkDryRunInvocations, 1); }); testUsingContext('build with assets but not enabled', () async { @@ -255,6 +258,23 @@ void main() { final File packageConfig = environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); + final FakeNativeAssetsBuildRunner buildRunner = FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + onBuild: (native_assets_cli.Target target) => + FakeNativeAssetsBuilderResult( + assets: [ + NativeCodeAssetImpl( + id: 'package:bar/bar.dart', + linkMode: DynamicLoadingBundledImpl(), + os: target.os, + architecture: target.architecture, + file: Uri.file('${target.architecture}/libbar.dylib'), + ), + ], + ), + ); await buildNativeAssetsIOS( darwinArchs: [DarwinArch.arm64, DarwinArch.x86_64], environmentType: EnvironmentType.simulator, @@ -262,22 +282,7 @@ void main() { buildMode: BuildMode.debug, fileSystem: fileSystem, yamlParentDirectory: environment.buildDir.uri, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - onBuild: (native_assets_cli.Target target) => FakeNativeAssetsBuilderResult( - assets: [ - NativeCodeAssetImpl( - id: 'package:bar/bar.dart', - linkMode: DynamicLoadingBundledImpl(), - os: target.os, - architecture: target.architecture, - file: Uri.file('${target.architecture}/libbar.dylib'), - ), - ], - ), - ), + buildRunner: buildRunner, ); expect( (globals.logger as BufferLogger).traceText, @@ -290,6 +295,9 @@ void main() { environment.buildDir.childFile('native_assets.yaml'), exists, ); + // Two archs. + expect(buildRunner.buildInvocations, 2); + expect(buildRunner.linkInvocations, 2); }); testUsingContext('Native assets dry run error', overrides: { @@ -300,24 +308,29 @@ void main() { environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); - expect( - () => dryRunNativeAssetsIOS( - projectUri: projectUri, - fileSystem: fileSystem, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - dryRunResult: const FakeNativeAssetsBuilderResult( - success: false, + for (final String hook in ['Building', 'Linking']) { + expect( + () => dryRunNativeAssetsIOS( + projectUri: projectUri, + fileSystem: fileSystem, + buildRunner: FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildDryRunResult: FakeNativeAssetsBuilderResult( + success: hook != 'Building', + ), + linkDryRunResult: FakeNativeAssetsBuilderResult( + success: hook != 'Linking', + ), ), ), - ), - throwsToolExit( - message: - 'Building native assets failed. See the logs for more details.', - ), - ); + throwsToolExit( + message: + '$hook (dry run) native assets failed. See the logs for more details.', + ), + ); + } }); testUsingContext('Native assets build error', overrides: { @@ -328,27 +341,32 @@ void main() { environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); - expect( - () => buildNativeAssetsIOS( - darwinArchs: [DarwinArch.arm64], - environmentType: EnvironmentType.simulator, - projectUri: projectUri, - buildMode: BuildMode.debug, - fileSystem: fileSystem, - yamlParentDirectory: environment.buildDir.uri, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - buildResult: const FakeNativeAssetsBuilderResult( - success: false, + for (final String hook in ['Building', 'Linking']) { + expect( + () => buildNativeAssetsIOS( + darwinArchs: [DarwinArch.arm64], + environmentType: EnvironmentType.simulator, + projectUri: projectUri, + buildMode: BuildMode.debug, + fileSystem: fileSystem, + yamlParentDirectory: environment.buildDir.uri, + buildRunner: FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildResult: FakeNativeAssetsBuilderResult( + success: hook != 'Building', + ), + linkResult: FakeNativeAssetsBuilderResult( + success: hook != 'Linking', + ), ), ), - ), - throwsToolExit( - message: - 'Building native assets failed. See the logs for more details.', - ), - ); + throwsToolExit( + message: + '$hook native assets failed. See the logs for more details.', + ), + ); + } }); } diff --git a/packages/flutter_tools/test/general.shard/isolated/linux/native_assets_test.dart b/packages/flutter_tools/test/general.shard/isolated/linux/native_assets_test.dart index 99579559e8ddd..35593d9044201 100644 --- a/packages/flutter_tools/test/general.shard/isolated/linux/native_assets_test.dart +++ b/packages/flutter_tools/test/general.shard/isolated/linux/native_assets_test.dart @@ -155,32 +155,33 @@ void main() { final File packageConfig = environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); + final FakeNativeAssetsBuildRunner buildRunner = FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildDryRunResult: FakeNativeAssetsBuilderResult( + assets: [ + NativeCodeAssetImpl( + id: 'package:bar/bar.dart', + linkMode: DynamicLoadingBundledImpl(), + os: OSImpl.linux, + architecture: ArchitectureImpl.x64, + file: Uri.file('libbar.so'), + ), + NativeCodeAssetImpl( + id: 'package:bar/bar.dart', + linkMode: DynamicLoadingBundledImpl(), + os: OSImpl.linux, + architecture: ArchitectureImpl.arm64, + file: Uri.file('libbar.so'), + ), + ], + ), + ); final Uri? nativeAssetsYaml = await dryRunNativeAssetsLinux( projectUri: projectUri, fileSystem: fileSystem, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - dryRunResult: FakeNativeAssetsBuilderResult( - assets: [ - NativeCodeAssetImpl( - id: 'package:bar/bar.dart', - linkMode: DynamicLoadingBundledImpl(), - os: OSImpl.linux, - architecture: ArchitectureImpl.x64, - file: Uri.file('libbar.so'), - ), - NativeCodeAssetImpl( - id: 'package:bar/bar.dart', - linkMode: DynamicLoadingBundledImpl(), - os: OSImpl.linux, - architecture: ArchitectureImpl.arm64, - file: Uri.file('libbar.so'), - ), - ], - ), - ), + buildRunner: buildRunner, ); expect( (globals.logger as BufferLogger).traceText, @@ -197,6 +198,8 @@ void main() { await fileSystem.file(nativeAssetsYaml).readAsString(), contains('package:bar/bar.dart'), ); + expect(buildRunner.buildDryRunInvocations, 1); + expect(buildRunner.linkDryRunInvocations, 1); }); testUsingContext('build with assets but not enabled', overrides: { @@ -273,28 +276,29 @@ void main() { final File dylibAfterCompiling = fileSystem.file('libbar.so'); // The mock doesn't create the file, so create it here. await dylibAfterCompiling.create(); + final FakeNativeAssetsBuildRunner buildRunner = FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildResult: FakeNativeAssetsBuilderResult( + assets: [ + NativeCodeAssetImpl( + id: 'package:bar/bar.dart', + linkMode: DynamicLoadingBundledImpl(), + os: OSImpl.linux, + architecture: ArchitectureImpl.x64, + file: dylibAfterCompiling.uri, + ), + ], + ), + ); final (Uri? nativeAssetsYaml, _) = await buildNativeAssetsLinux( targetPlatform: TargetPlatform.linux_x64, projectUri: projectUri, buildMode: BuildMode.debug, fileSystem: fileSystem, flutterTester: flutterTester, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - buildResult: FakeNativeAssetsBuilderResult( - assets: [ - NativeCodeAssetImpl( - id: 'package:bar/bar.dart', - linkMode: DynamicLoadingBundledImpl(), - os: OSImpl.linux, - architecture: ArchitectureImpl.x64, - file: dylibAfterCompiling.uri, - ), - ], - ), - ), + buildRunner: buildRunner, ); expect( (globals.logger as BufferLogger).traceText, @@ -319,6 +323,8 @@ void main() { '- libbar.so', ]), ); + expect(buildRunner.buildInvocations, 1); + expect(buildRunner.linkInvocations, 1); }); } @@ -337,7 +343,7 @@ void main() { packagesWithNativeAssetsResult: [ Package('bar', projectUri), ], - dryRunResult: FakeNativeAssetsBuilderResult( + buildDryRunResult: FakeNativeAssetsBuilderResult( assets: [ NativeCodeAssetImpl( id: 'package:bar/bar.dart', @@ -373,24 +379,29 @@ void main() { environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); - expect( - () => dryRunNativeAssetsLinux( - projectUri: projectUri, - fileSystem: fileSystem, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - dryRunResult: const FakeNativeAssetsBuilderResult( - success: false, + for (final String hook in ['Building', 'Linking']) { + expect( + () => dryRunNativeAssetsLinux( + projectUri: projectUri, + fileSystem: fileSystem, + buildRunner: FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildDryRunResult: FakeNativeAssetsBuilderResult( + success: hook != 'Building', + ), + linkDryRunResult: FakeNativeAssetsBuilderResult( + success: hook != 'Linking', + ), ), ), - ), - throwsToolExit( - message: - 'Building native assets failed. See the logs for more details.', - ), - ); + throwsToolExit( + message: + '$hook (dry run) native assets failed. See the logs for more details.', + ), + ); + } }); testUsingContext('Native assets build error', overrides: { @@ -401,27 +412,32 @@ void main() { environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); - expect( - () => buildNativeAssetsLinux( - targetPlatform: TargetPlatform.linux_x64, - projectUri: projectUri, - buildMode: BuildMode.debug, - fileSystem: fileSystem, - yamlParentDirectory: environment.buildDir.uri, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - buildResult: const FakeNativeAssetsBuilderResult( - success: false, + for (final String hook in ['Building', 'Linking']) { + expect( + () => buildNativeAssetsLinux( + targetPlatform: TargetPlatform.linux_x64, + projectUri: projectUri, + buildMode: BuildMode.debug, + fileSystem: fileSystem, + yamlParentDirectory: environment.buildDir.uri, + buildRunner: FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildResult: FakeNativeAssetsBuilderResult( + success: hook != 'Building', + ), + linkResult: FakeNativeAssetsBuilderResult( + success: hook != 'Linking', + ), ), ), - ), - throwsToolExit( - message: - 'Building native assets failed. See the logs for more details.', - ), - ); + throwsToolExit( + message: + '$hook native assets failed. See the logs for more details.', + ), + ); + } }); // This logic is mocked in the other tests to avoid having test order diff --git a/packages/flutter_tools/test/general.shard/isolated/macos/native_assets_test.dart b/packages/flutter_tools/test/general.shard/isolated/macos/native_assets_test.dart index f59fde6f867d3..69add748a0eab 100644 --- a/packages/flutter_tools/test/general.shard/isolated/macos/native_assets_test.dart +++ b/packages/flutter_tools/test/general.shard/isolated/macos/native_assets_test.dart @@ -138,32 +138,33 @@ void main() { final File packageConfig = environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); + final FakeNativeAssetsBuildRunner buildRunner = FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildDryRunResult: FakeNativeAssetsBuilderResult( + assets: [ + NativeCodeAssetImpl( + id: 'package:bar/bar.dart', + linkMode: DynamicLoadingBundledImpl(), + os: OSImpl.macOS, + architecture: ArchitectureImpl.arm64, + file: Uri.file('libbar.dylib'), + ), + NativeCodeAssetImpl( + id: 'package:bar/bar.dart', + linkMode: DynamicLoadingBundledImpl(), + os: OSImpl.macOS, + architecture: ArchitectureImpl.x64, + file: Uri.file('libbar.dylib'), + ), + ], + ), + ); final Uri? nativeAssetsYaml = await dryRunNativeAssetsMacOS( projectUri: projectUri, fileSystem: fileSystem, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - dryRunResult: FakeNativeAssetsBuilderResult( - assets: [ - NativeCodeAssetImpl( - id: 'package:bar/bar.dart', - linkMode: DynamicLoadingBundledImpl(), - os: OSImpl.macOS, - architecture: ArchitectureImpl.arm64, - file: Uri.file('libbar.dylib'), - ), - NativeCodeAssetImpl( - id: 'package:bar/bar.dart', - linkMode: DynamicLoadingBundledImpl(), - os: OSImpl.macOS, - architecture: ArchitectureImpl.x64, - file: Uri.file('libbar.dylib'), - ), - ], - ), - ), + buildRunner: buildRunner, ); expect( (globals.logger as BufferLogger).traceText, @@ -180,6 +181,8 @@ void main() { await fileSystem.file(nativeAssetsYaml).readAsString(), contains('package:bar/bar.dart'), ); + expect(buildRunner.buildDryRunInvocations, 1); + expect(buildRunner.linkDryRunInvocations, 1); }); testUsingContext('build with assets but not enabled', overrides: { @@ -293,28 +296,30 @@ void main() { final File packageConfig = environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); + final FakeNativeAssetsBuildRunner buildRunner = FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + onBuild: (native_assets_cli.Target target) => + FakeNativeAssetsBuilderResult( + assets: [ + NativeCodeAssetImpl( + id: 'package:bar/bar.dart', + linkMode: DynamicLoadingBundledImpl(), + os: target.os, + architecture: target.architecture, + file: Uri.file('${target.architecture}/libbar.dylib'), + ), + ], + ), + ); final (Uri? nativeAssetsYaml, _) = await buildNativeAssetsMacOS( darwinArchs: [DarwinArch.arm64, DarwinArch.x86_64], projectUri: projectUri, buildMode: BuildMode.debug, fileSystem: fileSystem, flutterTester: flutterTester, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - onBuild: (native_assets_cli.Target target) => FakeNativeAssetsBuilderResult( - assets: [ - NativeCodeAssetImpl( - id: 'package:bar/bar.dart', - linkMode: DynamicLoadingBundledImpl(), - os: target.os, - architecture: target.architecture, - file: Uri.file('${target.architecture}/libbar.dylib'), - ), - ], - ), - ), + buildRunner: buildRunner, ); expect( (globals.logger as BufferLogger).traceText, @@ -339,6 +344,9 @@ void main() { '- bar.framework/bar', ]), ); + // Multi arch. + expect(buildRunner.buildInvocations, 2); + expect(buildRunner.linkInvocations, 2); }); } @@ -357,7 +365,7 @@ void main() { packagesWithNativeAssetsResult: [ Package('bar', projectUri), ], - dryRunResult: FakeNativeAssetsBuilderResult( + buildDryRunResult: FakeNativeAssetsBuilderResult( assets: [ NativeCodeAssetImpl( id: 'package:bar/bar.dart', @@ -395,24 +403,29 @@ void main() { environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); - expect( - () => dryRunNativeAssetsMacOS( - projectUri: projectUri, - fileSystem: fileSystem, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - dryRunResult: const FakeNativeAssetsBuilderResult( - success: false, + for (final String hook in ['Building', 'Linking']) { + expect( + () => dryRunNativeAssetsMacOS( + projectUri: projectUri, + fileSystem: fileSystem, + buildRunner: FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildDryRunResult: FakeNativeAssetsBuilderResult( + success: hook != 'Building', + ), + linkDryRunResult: FakeNativeAssetsBuilderResult( + success: hook != 'Linking', + ), ), ), - ), - throwsToolExit( - message: - 'Building native assets failed. See the logs for more details.', - ), - ); + throwsToolExit( + message: + '$hook (dry run) native assets failed. See the logs for more details.', + ), + ); + } }); testUsingContext('Native assets build error', overrides: { @@ -423,27 +436,32 @@ void main() { environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); - expect( - () => buildNativeAssetsMacOS( - darwinArchs: [DarwinArch.arm64], - projectUri: projectUri, - buildMode: BuildMode.debug, - fileSystem: fileSystem, - yamlParentDirectory: environment.buildDir.uri, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - buildResult: const FakeNativeAssetsBuilderResult( - success: false, + for (final String hook in ['Building', 'Linking']) { + expect( + () => buildNativeAssetsMacOS( + darwinArchs: [DarwinArch.arm64], + projectUri: projectUri, + buildMode: BuildMode.debug, + fileSystem: fileSystem, + yamlParentDirectory: environment.buildDir.uri, + buildRunner: FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildResult: FakeNativeAssetsBuilderResult( + success: hook != 'Building', + ), + linkResult: FakeNativeAssetsBuilderResult( + success: hook != 'Linking', + ), ), ), - ), - throwsToolExit( - message: - 'Building native assets failed. See the logs for more details.', - ), - ); + throwsToolExit( + message: + '$hook native assets failed. See the logs for more details.', + ), + ); + } }); // This logic is mocked in the other tests to avoid having test order diff --git a/packages/flutter_tools/test/general.shard/isolated/resident_runner_test.dart b/packages/flutter_tools/test/general.shard/isolated/resident_runner_test.dart index b04729bd9d2b9..8c261280733bd 100644 --- a/packages/flutter_tools/test/general.shard/isolated/resident_runner_test.dart +++ b/packages/flutter_tools/test/general.shard/isolated/resident_runner_test.dart @@ -81,7 +81,9 @@ void main() { expect(result, 0); expect(buildRunner.buildInvocations, 0); - expect(buildRunner.dryRunInvocations, 0); + expect(buildRunner.buildDryRunInvocations, 0); + expect(buildRunner.linkInvocations, 0); + expect(buildRunner.linkDryRunInvocations, 0); expect(buildRunner.hasPackageConfigInvocations, 0); expect(buildRunner.packagesWithNativeAssetsInvocations, 0); diff --git a/packages/flutter_tools/test/general.shard/isolated/windows/native_assets_test.dart b/packages/flutter_tools/test/general.shard/isolated/windows/native_assets_test.dart index fd27541d9f5d2..46b4c17517851 100644 --- a/packages/flutter_tools/test/general.shard/isolated/windows/native_assets_test.dart +++ b/packages/flutter_tools/test/general.shard/isolated/windows/native_assets_test.dart @@ -135,25 +135,26 @@ void main() { final File packageConfig = environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); + final FakeNativeAssetsBuildRunner buildRunner = FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildDryRunResult: FakeNativeAssetsBuilderResult( + assets: [ + NativeCodeAssetImpl( + id: 'package:bar/bar.dart', + linkMode: DynamicLoadingBundledImpl(), + os: OSImpl.windows, + architecture: ArchitectureImpl.x64, + file: Uri.file('bar.dll'), + ), + ], + ), + ); final Uri? nativeAssetsYaml = await dryRunNativeAssetsWindows( projectUri: projectUri, fileSystem: fileSystem, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - dryRunResult: FakeNativeAssetsBuilderResult( - assets: [ - NativeCodeAssetImpl( - id: 'package:bar/bar.dart', - linkMode: DynamicLoadingBundledImpl(), - os: OSImpl.windows, - architecture: ArchitectureImpl.x64, - file: Uri.file('bar.dll'), - ), - ], - ), - ), + buildRunner: buildRunner, ); expect( (globals.logger as BufferLogger).traceText, @@ -170,6 +171,8 @@ void main() { await fileSystem.file(nativeAssetsYaml).readAsString(), contains('package:bar/bar.dart'), ); + expect(buildRunner.buildDryRunInvocations, 1); + expect(buildRunner.linkDryRunInvocations, 1); }); testUsingContext('build with assets but not enabled', overrides: { @@ -243,28 +246,29 @@ void main() { final File dylibAfterCompiling = fileSystem.file('bar.dll'); // The mock doesn't create the file, so create it here. await dylibAfterCompiling.create(); + final FakeNativeAssetsBuildRunner buildRunner = FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildResult: FakeNativeAssetsBuilderResult( + assets: [ + NativeCodeAssetImpl( + id: 'package:bar/bar.dart', + linkMode: DynamicLoadingBundledImpl(), + os: OSImpl.windows, + architecture: ArchitectureImpl.x64, + file: dylibAfterCompiling.uri, + ), + ], + ), + ); final (Uri? nativeAssetsYaml, _) = await buildNativeAssetsWindows( targetPlatform: TargetPlatform.windows_x64, projectUri: projectUri, buildMode: BuildMode.debug, fileSystem: fileSystem, flutterTester: flutterTester, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - buildResult: FakeNativeAssetsBuilderResult( - assets: [ - NativeCodeAssetImpl( - id: 'package:bar/bar.dart', - linkMode: DynamicLoadingBundledImpl(), - os: OSImpl.windows, - architecture: ArchitectureImpl.x64, - file: dylibAfterCompiling.uri, - ), - ], - ), - ), + buildRunner: buildRunner, ); expect( (globals.logger as BufferLogger).traceText, @@ -289,6 +293,8 @@ void main() { '- bar.dll', ]), ); + expect(buildRunner.buildInvocations, 1); + expect(buildRunner.linkInvocations, 1); }); } @@ -307,7 +313,7 @@ void main() { packagesWithNativeAssetsResult: [ Package('bar', projectUri), ], - dryRunResult: FakeNativeAssetsBuilderResult( + buildDryRunResult: FakeNativeAssetsBuilderResult( assets: [ NativeCodeAssetImpl( id: 'package:bar/bar.dart', @@ -338,24 +344,29 @@ void main() { environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); - expect( - () => dryRunNativeAssetsWindows( - projectUri: projectUri, - fileSystem: fileSystem, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - dryRunResult: const FakeNativeAssetsBuilderResult( - success: false, + for (final String hook in ['Building', 'Linking']) { + expect( + () => dryRunNativeAssetsWindows( + projectUri: projectUri, + fileSystem: fileSystem, + buildRunner: FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildDryRunResult: FakeNativeAssetsBuilderResult( + success: hook != 'Building', + ), + linkDryRunResult: FakeNativeAssetsBuilderResult( + success: hook != 'Linking', + ), ), ), - ), - throwsToolExit( - message: - 'Building native assets failed. See the logs for more details.', - ), - ); + throwsToolExit( + message: + '$hook (dry run) native assets failed. See the logs for more details.', + ), + ); + } }); testUsingContext('Native assets build error', overrides: { @@ -366,27 +377,32 @@ void main() { environment.projectDir.childFile('.dart_tool/package_config.json'); await packageConfig.parent.create(); await packageConfig.create(); - expect( - () => buildNativeAssetsWindows( - targetPlatform: TargetPlatform.windows_x64, - projectUri: projectUri, - buildMode: BuildMode.debug, - fileSystem: fileSystem, - yamlParentDirectory: environment.buildDir.uri, - buildRunner: FakeNativeAssetsBuildRunner( - packagesWithNativeAssetsResult: [ - Package('bar', projectUri), - ], - buildResult: const FakeNativeAssetsBuilderResult( - success: false, + for (final String hook in ['Building', 'Linking']) { + expect( + () => buildNativeAssetsWindows( + targetPlatform: TargetPlatform.windows_x64, + projectUri: projectUri, + buildMode: BuildMode.debug, + fileSystem: fileSystem, + yamlParentDirectory: environment.buildDir.uri, + buildRunner: FakeNativeAssetsBuildRunner( + packagesWithNativeAssetsResult: [ + Package('bar', projectUri), + ], + buildResult: FakeNativeAssetsBuilderResult( + success: hook != 'Building', + ), + linkResult: FakeNativeAssetsBuilderResult( + success: hook != 'Linking', + ), ), ), - ), - throwsToolExit( - message: - 'Building native assets failed. See the logs for more details.', - ), - ); + throwsToolExit( + message: + '$hook native assets failed. See the logs for more details.', + ), + ); + } }); // This logic is mocked in the other tests to avoid having test order diff --git a/packages/flutter_tools/test/integration.shard/android_plugin_new_output_dir_test.dart b/packages/flutter_tools/test/integration.shard/android_plugin_new_output_dir_test.dart index 872e9c0cbf68d..2452588765247 100644 --- a/packages/flutter_tools/test/integration.shard/android_plugin_new_output_dir_test.dart +++ b/packages/flutter_tools/test/integration.shard/android_plugin_new_output_dir_test.dart @@ -25,7 +25,7 @@ void main() { tryToDelete(tempDir); }); - test("error logged when plugin's build output dir was not private.", () async { + test('plugins use individualized build directories based on their name.', () async { final String flutterBin = fileSystem.path.join( getFlutterRoot(), 'bin', diff --git a/packages/flutter_tools/test/integration.shard/expression_evaluation_test.dart b/packages/flutter_tools/test/integration.shard/expression_evaluation_test.dart index 236719e5f016c..4676de1fac9fe 100644 --- a/packages/flutter_tools/test/integration.shard/expression_evaluation_test.dart +++ b/packages/flutter_tools/test/integration.shard/expression_evaluation_test.dart @@ -89,7 +89,7 @@ void batch1() { await breakInBuildMethod(flutter); await evaluateComplexReturningExpressions(flutter); await cleanProject(); - }, skip: true); // https://github.com/flutter/flutter/issues/148704 + }); } void batch2() { diff --git a/packages/flutter_tools/test/integration.shard/isolated/native_assets_test.dart b/packages/flutter_tools/test/integration.shard/isolated/native_assets_test.dart index 9168aead50c58..ae6456cb55bf5 100644 --- a/packages/flutter_tools/test/integration.shard/isolated/native_assets_test.dart +++ b/packages/flutter_tools/test/integration.shard/isolated/native_assets_test.dart @@ -550,6 +550,8 @@ Future createTestProject(String packageName, Directory tempDirectory) await pinDependencies( packageDirectory.childDirectory('example').childFile('pubspec.yaml')); + await addLinkHookDepedendency(packageDirectory); + final ProcessResult result2 = await processManager.run( [ flutterBin, @@ -563,6 +565,52 @@ Future createTestProject(String packageName, Directory tempDirectory) return packageDirectory; } +Future addLinkHookDepedendency(Directory packageDirectory) async { + final Directory flutterDirectory = fileSystem.currentDirectory.parent.parent; + final Directory linkHookDirectory = flutterDirectory + .childDirectory('dev') + .childDirectory('integration_tests') + .childDirectory('link_hook'); + expect(linkHookDirectory, exists); + + final File pubspecFile = packageDirectory.childFile('pubspec.yaml'); + final String pubspecOld = + (await pubspecFile.readAsString()).replaceAll('\r\n', '\n'); + final String pubspecNew = pubspecOld.replaceFirst(''' +dependencies: +''', ''' +dependencies: + link_hook: + path: ${linkHookDirectory.path} +'''); + expect(pubspecNew, isNot(pubspecOld)); + await pubspecFile.writeAsString(pubspecNew); + + final File dartFile = + packageDirectory.childDirectory('lib').childFile('$packageName.dart'); + final String dartFileOld = + (await dartFile.readAsString()).replaceAll('\r\n', '\n'); + // Replace with something that results in the same resulting int, so that the + // tests don't have to be updated. + final String dartFileNew = dartFileOld.replaceFirst( + ''' +import '${packageName}_bindings_generated.dart' as bindings; +''', + ''' +import 'package:link_hook/link_hook.dart' as l; + +import '${packageName}_bindings_generated.dart' as bindings; +''', + ); + expect(dartFileNew, isNot(dartFileOld)); + final String dartFileNew2 = dartFileNew.replaceFirst( + 'int sum(int a, int b) => bindings.sum(a, b);', + 'int sum(int a, int b) => bindings.sum(a, b) + l.difference(2, 1) - 1;', + ); + expect(dartFileNew2, isNot(dartFileNew)); + await dartFile.writeAsString(dartFileNew2); +} + Future pinDependencies(File pubspecFile) async { expect(pubspecFile, exists); final String oldPubspec = await pubspecFile.readAsString(); diff --git a/packages/flutter_web_plugins/pubspec.yaml b/packages/flutter_web_plugins/pubspec.yaml index 605eab09853b8..ff7589793855a 100644 --- a/packages/flutter_web_plugins/pubspec.yaml +++ b/packages/flutter_web_plugins/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -36,4 +36,4 @@ dev_dependencies: test_api: 0.7.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 14.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 8b62 +# PUBSPEC CHECKSUM: cf63 diff --git a/packages/fuchsia_remote_debug_protocol/pubspec.yaml b/packages/fuchsia_remote_debug_protocol/pubspec.yaml index 9a4d392122808..00acb5a46d197 100644 --- a/packages/fuchsia_remote_debug_protocol/pubspec.yaml +++ b/packages/fuchsia_remote_debug_protocol/pubspec.yaml @@ -11,15 +11,15 @@ dependencies: vm_service: 14.2.2 file: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" platform: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: test: 1.25.5 - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -64,4 +64,4 @@ dartdoc: # Exclude this package from the hosted API docs. nodoc: true -# PUBSPEC CHECKSUM: a66c +# PUBSPEC CHECKSUM: 2c6f diff --git a/packages/integration_test/android/build.gradle b/packages/integration_test/android/build.gradle index bcce637356713..f34a6d11e4777 100644 --- a/packages/integration_test/android/build.gradle +++ b/packages/integration_test/android/build.gradle @@ -51,8 +51,6 @@ android { dependencies { // TODO(egarciad): These dependencies should not be added to release builds. // https://github.com/flutter/flutter/issues/56591 - testImplementation 'androidx.test.ext:junit:1.1.4-alpha07' - testImplementation 'org.robolectric:robolectric:4.11' testImplementation 'junit:junit:4.13.2' testImplementation 'org.mockito:mockito-inline:5.1.0' diff --git a/packages/integration_test/android/src/test/java/dev/flutter/plugins/integration_test/FlutterDeviceScreenshotTest.java b/packages/integration_test/android/src/test/java/dev/flutter/plugins/integration_test/FlutterDeviceScreenshotTest.java index 7669bb65002fb..0cc28221a87a5 100644 --- a/packages/integration_test/android/src/test/java/dev/flutter/plugins/integration_test/FlutterDeviceScreenshotTest.java +++ b/packages/integration_test/android/src/test/java/dev/flutter/plugins/integration_test/FlutterDeviceScreenshotTest.java @@ -10,18 +10,20 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import org.junit.runner.RunWith; +import org.mockito.MockedStatic; +import org.mockito.Mockito; import android.app.Activity; -import androidx.test.ext.junit.runners.AndroidJUnit4; +import android.view.View; + +import androidx.test.runner.AndroidJUnitRunner; import io.flutter.embedding.android.FlutterActivity; import io.flutter.embedding.android.FlutterFragment; import io.flutter.embedding.android.FlutterFragmentActivity; import io.flutter.embedding.android.FlutterView; -@RunWith(AndroidJUnit4.class) -public class FlutterDeviceScreenshotTest { +public class FlutterDeviceScreenshotTest extends AndroidJUnitRunner { @Test public void getFlutterView_returnsNullForNonFlutterActivity() { Activity mockActivity = mock(Activity.class); @@ -30,25 +32,36 @@ public void getFlutterView_returnsNullForNonFlutterActivity() { @Test public void getFlutterView_returnsFlutterViewForFlutterActivity() { - FlutterView mockFlutterView = mock(FlutterView.class); - FlutterActivity mockFlutterActivity = mock(FlutterActivity.class); - when(mockFlutterActivity.findViewById(FlutterActivity.FLUTTER_VIEW_ID)) - .thenReturn(mockFlutterView); - assertEquals( - FlutterDeviceScreenshot.getFlutterView(mockFlutterActivity), - mockFlutterView - ); + // Mock the static call to View.generateViewId that FlutterActivity.FLUTTER_VIEW_ID needs. + // For why this test currently doesn't use Robolectric, + // see https://github.com/flutter/flutter/pull/148803. + try (MockedStatic mockedStatic = Mockito.mockStatic(View.class)) { + mockedStatic.when(View::generateViewId).thenReturn(123); + FlutterView mockFlutterView = mock(FlutterView.class); + FlutterActivity mockFlutterActivity = mock(FlutterActivity.class); + when(mockFlutterActivity.findViewById(FlutterActivity.FLUTTER_VIEW_ID)) + .thenReturn(mockFlutterView); + assertEquals( + FlutterDeviceScreenshot.getFlutterView(mockFlutterActivity), + mockFlutterView + ); + } } @Test public void getFlutterView_returnsFlutterViewForFlutterFragmentActivity() { - FlutterView mockFlutterView = mock(FlutterView.class); - FlutterFragmentActivity mockFlutterFragmentActivity = mock(FlutterFragmentActivity.class); - when(mockFlutterFragmentActivity.findViewById(FlutterFragment.FLUTTER_VIEW_ID)) - .thenReturn(mockFlutterView); - assertEquals( - FlutterDeviceScreenshot.getFlutterView(mockFlutterFragmentActivity), - mockFlutterView - ); + // Mock the static call to View.generateViewId that FlutterFragment.FLUTTER_VIEW_ID needs. + // For why this test currently doesn't use Robolectric, + // see https://github.com/flutter/flutter/pull/148803. + try (MockedStatic mockedStatic = Mockito.mockStatic(View.class)) { + FlutterView mockFlutterView = mock(FlutterView.class); + FlutterFragmentActivity mockFlutterFragmentActivity = mock(FlutterFragmentActivity.class); + when(mockFlutterFragmentActivity.findViewById(FlutterFragment.FLUTTER_VIEW_ID)) + .thenReturn(mockFlutterView); + assertEquals( + FlutterDeviceScreenshot.getFlutterView(mockFlutterFragmentActivity), + mockFlutterView + ); + } } } diff --git a/packages/integration_test/example/android/buildscript-gradle.lockfile b/packages/integration_test/example/android/buildscript-gradle.lockfile deleted file mode 100644 index c4ae49fa77293..0000000000000 --- a/packages/integration_test/example/android/buildscript-gradle.lockfile +++ /dev/null @@ -1,156 +0,0 @@ -# This is a Gradle generated file for dependency locking. -# Manual edits can break the build and are not advised. -# This file is expected to be part of source control. -androidx.databinding:databinding-common:8.1.0=classpath -androidx.databinding:databinding-compiler-common:8.1.0=classpath -com.android.application:com.android.application.gradle.plugin:8.1.0=classpath -com.android.databinding:baseLibrary:8.1.0=classpath -com.android.tools.analytics-library:crash:31.1.0=classpath -com.android.tools.analytics-library:protos:31.1.0=classpath -com.android.tools.analytics-library:shared:31.1.0=classpath -com.android.tools.analytics-library:tracker:31.1.0=classpath -com.android.tools.build.jetifier:jetifier-core:1.0.0-beta10=classpath -com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta10=classpath -com.android.tools.build:aapt2-proto:8.1.0-10154469=classpath -com.android.tools.build:aaptcompiler:8.1.0=classpath -com.android.tools.build:apksig:8.1.0=classpath -com.android.tools.build:apkzlib:8.1.0=classpath -com.android.tools.build:builder-model:8.1.0=classpath -com.android.tools.build:builder-test-api:8.1.0=classpath -com.android.tools.build:builder:8.1.0=classpath -com.android.tools.build:bundletool:1.14.0=classpath -com.android.tools.build:gradle-api:8.1.0=classpath -com.android.tools.build:gradle-settings-api:8.1.0=classpath -com.android.tools.build:gradle:8.1.0=classpath -com.android.tools.build:manifest-merger:31.1.0=classpath -com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api=classpath -com.android.tools.ddms:ddmlib:31.1.0=classpath -com.android.tools.layoutlib:layoutlib-api:31.1.0=classpath -com.android.tools.lint:lint-model:31.1.0=classpath -com.android.tools.lint:lint-typedef-remover:31.1.0=classpath -com.android.tools.utp:android-device-provider-ddmlib-proto:31.1.0=classpath -com.android.tools.utp:android-device-provider-gradle-proto:31.1.0=classpath -com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:31.1.0=classpath -com.android.tools.utp:android-test-plugin-host-apk-installer-proto:31.1.0=classpath -com.android.tools.utp:android-test-plugin-host-coverage-proto:31.1.0=classpath -com.android.tools.utp:android-test-plugin-host-emulator-control-proto:31.1.0=classpath -com.android.tools.utp:android-test-plugin-host-logcat-proto:31.1.0=classpath -com.android.tools.utp:android-test-plugin-host-retention-proto:31.1.0=classpath -com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:31.1.0=classpath -com.android.tools:annotations:31.1.0=classpath -com.android.tools:common:31.1.0=classpath -com.android.tools:dvlib:31.1.0=classpath -com.android.tools:repository:31.1.0=classpath -com.android.tools:sdk-common:31.1.0=classpath -com.android.tools:sdklib:31.1.0=classpath -com.android:signflinger:8.1.0=classpath -com.android:zipflinger:8.1.0=classpath -com.github.gundy:semver4j:0.16.4=classpath -com.google.android:annotations:4.1.1.4=classpath -com.google.api.grpc:proto-google-common-protos:2.0.1=classpath -com.google.auto.value:auto-value-annotations:1.6.2=classpath -com.google.code.findbugs:jsr305:3.0.2=classpath -com.google.code.gson:gson:2.8.9=classpath -com.google.crypto.tink:tink:1.7.0=classpath -com.google.dagger:dagger:2.28.3=classpath -com.google.errorprone:error_prone_annotations:2.11.0=classpath -com.google.flatbuffers:flatbuffers-java:1.12.0=classpath -com.google.guava:failureaccess:1.0.1=classpath -com.google.guava:guava:31.1-jre=classpath -com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=classpath -com.google.j2objc:j2objc-annotations:1.3=classpath -com.google.jimfs:jimfs:1.1=classpath -com.google.protobuf:protobuf-java-util:3.19.3=classpath -com.google.protobuf:protobuf-java:3.19.3=classpath -com.google.testing.platform:core-proto:0.0.8-alpha08=classpath -com.googlecode.juniversalchardet:juniversalchardet:1.0.3=classpath -com.squareup:javapoet:1.10.0=classpath -com.squareup:javawriter:2.5.0=classpath -com.sun.activation:javax.activation:1.2.0=classpath -com.sun.istack:istack-commons-runtime:3.0.8=classpath -com.sun.xml.fastinfoset:FastInfoset:1.2.16=classpath -commons-codec:commons-codec:1.11=classpath -commons-io:commons-io:2.4=classpath -commons-logging:commons-logging:1.2=classpath -de.undercouch:gradle-download-task:4.1.1=classpath -io.grpc:grpc-api:1.45.1=classpath -io.grpc:grpc-context:1.45.1=classpath -io.grpc:grpc-core:1.45.1=classpath -io.grpc:grpc-netty:1.45.1=classpath -io.grpc:grpc-protobuf-lite:1.45.1=classpath -io.grpc:grpc-protobuf:1.45.1=classpath -io.grpc:grpc-stub:1.45.1=classpath -io.netty:netty-buffer:4.1.72.Final=classpath -io.netty:netty-codec-http2:4.1.72.Final=classpath -io.netty:netty-codec-http:4.1.72.Final=classpath -io.netty:netty-codec-socks:4.1.72.Final=classpath -io.netty:netty-codec:4.1.72.Final=classpath -io.netty:netty-common:4.1.72.Final=classpath -io.netty:netty-handler-proxy:4.1.72.Final=classpath -io.netty:netty-handler:4.1.72.Final=classpath -io.netty:netty-resolver:4.1.72.Final=classpath -io.netty:netty-tcnative-classes:2.0.46.Final=classpath -io.netty:netty-transport:4.1.72.Final=classpath -io.perfmark:perfmark-api:0.23.0=classpath -jakarta.activation:jakarta.activation-api:1.2.1=classpath -jakarta.xml.bind:jakarta.xml.bind-api:2.3.2=classpath -javax.annotation:javax.annotation-api:1.3.2=classpath -javax.inject:javax.inject:1=classpath -net.java.dev.jna:jna-platform:5.6.0=classpath -net.java.dev.jna:jna:5.6.0=classpath -net.sf.jopt-simple:jopt-simple:4.9=classpath -net.sf.kxml:kxml2:2.3.0=classpath -org.apache.commons:commons-compress:1.21=classpath -org.apache.httpcomponents:httpclient:4.5.13=classpath -org.apache.httpcomponents:httpcore:4.4.15=classpath -org.apache.httpcomponents:httpmime:4.5.6=classpath -org.bitbucket.b_c:jose4j:0.7.0=classpath -org.bouncycastle:bcpkix-jdk15on:1.67=classpath -org.bouncycastle:bcprov-jdk15on:1.67=classpath -org.checkerframework:checker-qual:3.12.0=classpath -org.codehaus.mojo:animal-sniffer-annotations:1.19=classpath -org.glassfish.jaxb:jaxb-runtime:2.3.2=classpath -org.glassfish.jaxb:txw2:2.3.2=classpath -org.jdom:jdom2:2.0.6=classpath -org.jetbrains.intellij.deps:trove4j:1.0.20200330=classpath -org.jetbrains.kotlin.android:org.jetbrains.kotlin.android.gradle.plugin:1.7.10=classpath -org.jetbrains.kotlin:kotlin-android-extensions:1.7.10=classpath -org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.7.10=classpath -org.jetbrains.kotlin:kotlin-build-common:1.7.10=classpath -org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=classpath -org.jetbrains.kotlin:kotlin-compiler-runner:1.7.10=classpath -org.jetbrains.kotlin:kotlin-daemon-client:1.7.10=classpath -org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=classpath -org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.10=classpath -org.jetbrains.kotlin:kotlin-gradle-plugin-idea:1.7.10=classpath -org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.7.10=classpath -org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10=classpath -org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.7.10=classpath -org.jetbrains.kotlin:kotlin-native-utils:1.7.10=classpath -org.jetbrains.kotlin:kotlin-project-model:1.7.10=classpath -org.jetbrains.kotlin:kotlin-reflect:1.8.20-RC2=classpath -org.jetbrains.kotlin:kotlin-scripting-common:1.7.10=classpath -org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.10=classpath -org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.10=classpath -org.jetbrains.kotlin:kotlin-scripting-jvm:1.7.10=classpath -org.jetbrains.kotlin:kotlin-stdlib-common:1.8.20-RC2=classpath -org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.20-RC2=classpath -org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.20-RC2=classpath -org.jetbrains.kotlin:kotlin-stdlib:1.8.20-RC2=classpath -org.jetbrains.kotlin:kotlin-tooling-core:1.7.10=classpath -org.jetbrains.kotlin:kotlin-tooling-metadata:1.7.10=classpath -org.jetbrains.kotlin:kotlin-util-io:1.7.10=classpath -org.jetbrains.kotlin:kotlin-util-klib:1.7.10=classpath -org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0=classpath -org.jetbrains:annotations:13.0=classpath -org.jvnet.staxex:stax-ex:1.8.1=classpath -org.ow2.asm:asm-analysis:9.2=classpath -org.ow2.asm:asm-commons:9.2=classpath -org.ow2.asm:asm-tree:9.2=classpath -org.ow2.asm:asm-util:9.2=classpath -org.ow2.asm:asm:9.2=classpath -org.slf4j:slf4j-api:1.7.30=classpath -org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2=classpath -xerces:xercesImpl:2.12.0=classpath -xml-apis:xml-apis:1.4.01=classpath -empty= diff --git a/packages/integration_test/example/android/project-app.lockfile b/packages/integration_test/example/android/project-app.lockfile deleted file mode 100644 index 5de875d2d55c9..0000000000000 --- a/packages/integration_test/example/android/project-app.lockfile +++ /dev/null @@ -1,142 +0,0 @@ -# This is a Gradle generated file for dependency locking. -# Manual edits can break the build and are not advised. -# This file is expected to be part of source control. -androidx.activity:activity:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.annotation:annotation-experimental:1.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.annotation:annotation:1.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.arch.core:core-common:2.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.arch.core:core-runtime:2.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.collection:collection:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.concurrent:concurrent-futures:1.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath -androidx.core:core:1.6.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.customview:customview:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.fragment:fragment:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-common-java8:2.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-common:2.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-common:2.3.1=debugAndroidTestRuntimeClasspath -androidx.lifecycle:lifecycle-livedata-core:2.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-livedata:2.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-runtime:2.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-viewmodel:2.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.loader:loader:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.savedstate:savedstate:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.test.espresso:espresso-core:3.2.0=debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.test.espresso:espresso-core:3.5.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath -androidx.test.espresso:espresso-idling-resource:3.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.test.espresso:espresso-idling-resource:3.5.1=debugAndroidTestRuntimeClasspath -androidx.test.services:storage:1.4.2=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath -androidx.test:annotation:1.0.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath -androidx.test:core:1.5.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath -androidx.test:monitor:1.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.test:monitor:1.6.1=debugAndroidTestRuntimeClasspath -androidx.test:rules:1.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.test:runner:1.2.0=debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.test:runner:1.5.2=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath -androidx.tracing:tracing:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.versionedparcelable:versionedparcelable:1.1.1=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.viewpager:viewpager:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.window:window-java:1.0.0-beta04=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.window:window:1.0.0-beta04=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -com.android.tools.analytics-library:protos:27.1.3=lintClassPath -com.android.tools.analytics-library:shared:27.1.3=lintClassPath -com.android.tools.analytics-library:tracker:27.1.3=lintClassPath -com.android.tools.build:aapt2-proto:4.1.0-alpha01-6193524=lintClassPath -com.android.tools.build:aapt2:4.1.3-6503028=_internal_aapt2_binary -com.android.tools.build:apksig:4.1.3=lintClassPath -com.android.tools.build:apkzlib:4.1.3=lintClassPath -com.android.tools.build:builder-model:4.1.3=lintClassPath -com.android.tools.build:builder-test-api:4.1.3=lintClassPath -com.android.tools.build:builder:4.1.3=lintClassPath -com.android.tools.build:gradle-api:4.1.3=lintClassPath -com.android.tools.build:manifest-merger:27.1.3=lintClassPath -com.android.tools.ddms:ddmlib:27.1.3=lintClassPath -com.android.tools.external.com-intellij:intellij-core:27.1.3=lintClassPath -com.android.tools.external.com-intellij:kotlin-compiler:27.1.3=lintClassPath -com.android.tools.external.org-jetbrains:uast:27.1.3=lintClassPath -com.android.tools.layoutlib:layoutlib-api:27.1.3=lintClassPath -com.android.tools.lint:lint-api:27.1.3=lintClassPath -com.android.tools.lint:lint-checks:27.1.3=lintClassPath -com.android.tools.lint:lint-gradle-api:27.1.3=lintClassPath -com.android.tools.lint:lint-gradle:27.1.3=lintClassPath -com.android.tools.lint:lint-model:27.1.3=lintClassPath -com.android.tools.lint:lint:27.1.3=lintClassPath -com.android.tools:annotations:27.1.3=lintClassPath -com.android.tools:common:27.1.3=lintClassPath -com.android.tools:dvlib:27.1.3=lintClassPath -com.android.tools:repository:27.1.3=lintClassPath -com.android.tools:sdk-common:27.1.3=lintClassPath -com.android.tools:sdklib:27.1.3=lintClassPath -com.android:signflinger:4.1.3=lintClassPath -com.android:zipflinger:4.1.3=lintClassPath -com.google.code.findbugs:jsr305:3.0.2=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -com.google.code.gson:gson:2.8.5=lintClassPath -com.google.errorprone:error_prone_annotations:2.3.2=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath -com.google.guava:failureaccess:1.0.1=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath -com.google.guava:guava:28.1-android=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath -com.google.guava:guava:28.1-jre=lintClassPath -com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugRuntimeClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath -com.google.j2objc:j2objc-annotations:1.3=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath -com.google.jimfs:jimfs:1.1=lintClassPath -com.google.protobuf:protobuf-java:3.10.0=lintClassPath -com.googlecode.json-simple:json-simple:1.1=lintClassPath -com.squareup:javawriter:2.1.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -com.squareup:javawriter:2.5.0=lintClassPath -com.sun.activation:javax.activation:1.2.0=lintClassPath -com.sun.istack:istack-commons-runtime:3.0.7=lintClassPath -com.sun.xml.fastinfoset:FastInfoset:1.2.15=lintClassPath -commons-codec:commons-codec:1.10=lintClassPath -commons-logging:commons-logging:1.2=lintClassPath -it.unimi.dsi:fastutil:7.2.0=lintClassPath -javax.activation:javax.activation-api:1.2.0=lintClassPath -javax.inject:javax.inject:1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -javax.xml.bind:jaxb-api:2.3.1=lintClassPath -junit:junit:4.12=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath -junit:junit:4.13.2=debugAndroidTestRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -net.sf.jopt-simple:jopt-simple:4.9=lintClassPath -net.sf.kxml:kxml2:2.3.0=debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.apache.commons:commons-compress:1.12=lintClassPath -org.apache.httpcomponents:httpclient:4.5.6=lintClassPath -org.apache.httpcomponents:httpcore:4.4.10=lintClassPath -org.apache.httpcomponents:httpmime:4.5.6=lintClassPath -org.bouncycastle:bcpkix-jdk15on:1.56=lintClassPath -org.bouncycastle:bcprov-jdk15on:1.56=lintClassPath -org.checkerframework:checker-compat-qual:2.5.5=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath -org.checkerframework:checker-qual:2.8.1=lintClassPath -org.codehaus.groovy:groovy-all:2.4.15=lintClassPath -org.codehaus.mojo:animal-sniffer-annotations:1.18=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath -org.glassfish.jaxb:jaxb-runtime:2.3.1=lintClassPath -org.glassfish.jaxb:txw2:2.3.1=lintClassPath -org.hamcrest:hamcrest-core:1.3=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.hamcrest:hamcrest-integration:1.3=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.hamcrest:hamcrest-library:1.3=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jacoco:org.jacoco.agent:0.8.7=androidJacocoAnt -org.jacoco:org.jacoco.ant:0.8.7=androidJacocoAnt -org.jacoco:org.jacoco.core:0.8.7=androidJacocoAnt -org.jacoco:org.jacoco.report:0.8.7=androidJacocoAnt -org.jetbrains.kotlin:kotlin-reflect:1.3.72=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib-common:1.3.72=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=debugAndroidTestRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.30=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib:1.3.72=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib:1.5.31=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib:1.7.10=debugAndroidTestRuntimeClasspath -org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jetbrains.trove4j:trove4j:20160824=lintClassPath -org.jetbrains:annotations:13.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jvnet.staxex:stax-ex:1.8=lintClassPath -org.ow2.asm:asm-analysis:7.0=lintClassPath -org.ow2.asm:asm-analysis:9.1=androidJacocoAnt -org.ow2.asm:asm-commons:7.0=lintClassPath -org.ow2.asm:asm-commons:9.1=androidJacocoAnt -org.ow2.asm:asm-tree:7.0=lintClassPath -org.ow2.asm:asm-tree:9.1=androidJacocoAnt -org.ow2.asm:asm-util:7.0=lintClassPath -org.ow2.asm:asm:7.0=lintClassPath -org.ow2.asm:asm:9.1=androidJacocoAnt -empty=androidApis,androidJdkImage,androidTestUtil,compile,coreLibraryDesugaring,debugAndroidTestAnnotationProcessorClasspath,debugAnnotationProcessorClasspath,debugReverseMetadataValues,debugUnitTestAnnotationProcessorClasspath,debugWearBundling,lintChecks,lintPublish,profileAnnotationProcessorClasspath,profileReverseMetadataValues,profileUnitTestAnnotationProcessorClasspath,profileWearBundling,releaseAnnotationProcessorClasspath,releaseReverseMetadataValues,releaseUnitTestAnnotationProcessorClasspath,releaseWearBundling,testCompile diff --git a/packages/integration_test/example/android/project-integration_test.lockfile b/packages/integration_test/example/android/project-integration_test.lockfile deleted file mode 100644 index 1e6edf730b62e..0000000000000 --- a/packages/integration_test/example/android/project-integration_test.lockfile +++ /dev/null @@ -1,176 +0,0 @@ -# This is a Gradle generated file for dependency locking. -# Manual edits can break the build and are not advised. -# This file is expected to be part of source control. -androidx.activity:activity:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.annotation:annotation-experimental:1.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.annotation:annotation:1.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath -androidx.annotation:annotation:1.3.0=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.arch.core:core-common:2.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.arch.core:core-runtime:2.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.collection:collection:1.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.concurrent:concurrent-futures:1.1.0=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.core:core:1.6.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.customview:customview:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.fragment:fragment:1.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-common-java8:2.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-common:2.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath -androidx.lifecycle:lifecycle-common:2.3.1=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-livedata-core:2.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-livedata:2.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-runtime:2.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-viewmodel:2.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.loader:loader:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.savedstate:savedstate:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.test.espresso:espresso-core:3.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.test.espresso:espresso-idling-resource:3.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath -androidx.test.espresso:espresso-idling-resource:3.5.1=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.test.ext:junit:1.1.4-alpha07=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.test.services:storage:1.4.2-alpha04=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.test:annotation:1.0.1=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.test:core:1.4.1-alpha07=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.test:monitor:1.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath -androidx.test:monitor:1.6.1=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.test:rules:1.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.test:runner:1.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.tracing:tracing:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.versionedparcelable:versionedparcelable:1.1.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.viewpager:viewpager:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.window:window-java:1.0.0-beta04=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.window:window:1.0.0-beta04=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -com.almworks.sqlite4java:sqlite4java:1.0.392=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -com.android.tools.analytics-library:protos:27.1.3=lintClassPath -com.android.tools.analytics-library:shared:27.1.3=lintClassPath -com.android.tools.analytics-library:tracker:27.1.3=lintClassPath -com.android.tools.build:aapt2-proto:4.1.0-alpha01-6193524=lintClassPath -com.android.tools.build:aapt2:4.1.3-6503028=_internal_aapt2_binary -com.android.tools.build:apksig:4.1.3=lintClassPath -com.android.tools.build:apkzlib:4.1.3=lintClassPath -com.android.tools.build:builder-model:4.1.3=lintClassPath -com.android.tools.build:builder-test-api:4.1.3=lintClassPath -com.android.tools.build:builder:4.1.3=lintClassPath -com.android.tools.build:gradle-api:4.1.3=lintClassPath -com.android.tools.build:manifest-merger:27.1.3=lintClassPath -com.android.tools.ddms:ddmlib:27.1.3=lintClassPath -com.android.tools.external.com-intellij:intellij-core:27.1.3=lintClassPath -com.android.tools.external.com-intellij:kotlin-compiler:27.1.3=lintClassPath -com.android.tools.external.org-jetbrains:uast:27.1.3=lintClassPath -com.android.tools.layoutlib:layoutlib-api:27.1.3=lintClassPath -com.android.tools.lint:lint-api:27.1.3=lintClassPath -com.android.tools.lint:lint-checks:27.1.3=lintClassPath -com.android.tools.lint:lint-gradle-api:27.1.3=lintClassPath -com.android.tools.lint:lint-gradle:27.1.3=lintClassPath -com.android.tools.lint:lint-model:27.1.3=lintClassPath -com.android.tools.lint:lint:27.1.3=lintClassPath -com.android.tools:annotations:27.1.3=lintClassPath -com.android.tools:common:27.1.3=lintClassPath -com.android.tools:dvlib:27.1.3=lintClassPath -com.android.tools:repository:27.1.3=lintClassPath -com.android.tools:sdk-common:27.1.3=lintClassPath -com.android.tools:sdklib:27.1.3=lintClassPath -com.android:signflinger:4.1.3=lintClassPath -com.android:zipflinger:4.1.3=lintClassPath -com.google.auto.value:auto-value-annotations:1.10.4=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -com.google.code.findbugs:jsr305:3.0.2=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -com.google.code.gson:gson:2.8.5=lintClassPath -com.google.errorprone:error_prone_annotation:2.19.1=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath -com.google.errorprone:error_prone_annotations:2.11.0=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -com.google.errorprone:error_prone_annotations:2.3.2=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath -com.google.guava:failureaccess:1.0.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -com.google.guava:guava:28.1-android=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath -com.google.guava:guava:28.1-jre=lintClassPath -com.google.guava:guava:31.1-jre=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -com.google.j2objc:j2objc-annotations:1.3=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -com.google.jimfs:jimfs:1.1=lintClassPath -com.google.protobuf:protobuf-java:3.10.0=lintClassPath -com.googlecode.json-simple:json-simple:1.1=lintClassPath -com.ibm.icu:icu4j:73.2=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -com.squareup:javawriter:2.1.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -com.squareup:javawriter:2.5.0=lintClassPath -com.sun.activation:javax.activation:1.2.0=lintClassPath -com.sun.istack:istack-commons-runtime:3.0.7=lintClassPath -com.sun.xml.fastinfoset:FastInfoset:1.2.15=lintClassPath -commons-codec:commons-codec:1.10=lintClassPath -commons-logging:commons-logging:1.2=lintClassPath -it.unimi.dsi:fastutil:7.2.0=lintClassPath -javax.activation:javax.activation-api:1.2.0=lintClassPath -javax.annotation:javax.annotation-api:1.3.2=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -javax.inject:javax.inject:1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -javax.xml.bind:jaxb-api:2.3.1=lintClassPath -junit:junit:4.12=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath -junit:junit:4.13.2=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -net.bytebuddy:byte-buddy-agent:1.12.22=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -net.bytebuddy:byte-buddy:1.12.22=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -net.sf.jopt-simple:jopt-simple:4.9=lintClassPath -net.sf.kxml:kxml2:2.3.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.apache.commons:commons-compress:1.12=lintClassPath -org.apache.httpcomponents:httpclient:4.5.6=lintClassPath -org.apache.httpcomponents:httpcore:4.4.10=lintClassPath -org.apache.httpcomponents:httpmime:4.5.6=lintClassPath -org.bouncycastle:bcpkix-jdk15on:1.56=lintClassPath -org.bouncycastle:bcprov-jdk15on:1.56=lintClassPath -org.bouncycastle:bcprov-jdk18on:1.76=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.checkerframework:checker-compat-qual:2.5.5=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath -org.checkerframework:checker-qual:2.8.1=lintClassPath -org.checkerframework:checker-qual:3.12.0=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.codehaus.groovy:groovy-all:2.4.15=lintClassPath -org.codehaus.mojo:animal-sniffer-annotations:1.18=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath -org.conscrypt:conscrypt-openjdk-uber:2.5.2=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath -org.glassfish.jaxb:jaxb-runtime:2.3.1=lintClassPath -org.glassfish.jaxb:txw2:2.3.1=lintClassPath -org.hamcrest:hamcrest-core:1.3=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.hamcrest:hamcrest-integration:1.3=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.hamcrest:hamcrest-library:1.3=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jacoco:org.jacoco.agent:0.8.7=androidJacocoAnt -org.jacoco:org.jacoco.ant:0.8.7=androidJacocoAnt -org.jacoco:org.jacoco.core:0.8.7=androidJacocoAnt -org.jacoco:org.jacoco.report:0.8.7=androidJacocoAnt -org.jetbrains.kotlin:kotlin-reflect:1.3.72=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib-common:1.3.72=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.30=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib:1.3.72=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib:1.5.31=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib:1.6.21=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jetbrains.trove4j:trove4j:20160824=lintClassPath -org.jetbrains:annotations:13.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.jvnet.staxex:stax-ex:1.8=lintClassPath -org.mockito:mockito-core:5.1.0=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.mockito:mockito-inline:5.1.0=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.objenesis:objenesis:3.3=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath -org.ow2.asm:asm-analysis:7.0=lintClassPath -org.ow2.asm:asm-analysis:9.1=androidJacocoAnt -org.ow2.asm:asm-analysis:9.6=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.ow2.asm:asm-commons:7.0=lintClassPath -org.ow2.asm:asm-commons:9.1=androidJacocoAnt -org.ow2.asm:asm-commons:9.6=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.ow2.asm:asm-tree:7.0=lintClassPath -org.ow2.asm:asm-tree:9.1=androidJacocoAnt -org.ow2.asm:asm-tree:9.6=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.ow2.asm:asm-util:7.0=lintClassPath -org.ow2.asm:asm-util:9.6=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.ow2.asm:asm:7.0=lintClassPath -org.ow2.asm:asm:9.1=androidJacocoAnt -org.ow2.asm:asm:9.6=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.robolectric:annotations:4.11=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.robolectric:junit:4.11=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.robolectric:nativeruntime-dist-compat:1.0.2=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath -org.robolectric:nativeruntime:4.11=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.robolectric:pluginapi:4.11=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.robolectric:plugins-maven-dependency-resolver:4.11=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.robolectric:resources:4.11=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.robolectric:robolectric:4.11=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.robolectric:sandbox:4.11=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.robolectric:shadowapi:4.11=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.robolectric:shadows-framework:4.11=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.robolectric:shadows-versioning:4.11=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.robolectric:utils-reflector:4.11=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -org.robolectric:utils:4.11=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -empty=androidApis,androidJdkImage,androidTestUtil,compile,coreLibraryDesugaring,debugAndroidTestAnnotationProcessorClasspath,debugAnnotationProcessorClasspath,debugUnitTestAnnotationProcessorClasspath,lintChecks,lintPublish,profileAnnotationProcessorClasspath,profileUnitTestAnnotationProcessorClasspath,releaseAnnotationProcessorClasspath,releaseUnitTestAnnotationProcessorClasspath,testCompile diff --git a/packages/integration_test/example/android/project-webview_flutter.lockfile b/packages/integration_test/example/android/project-webview_flutter.lockfile deleted file mode 100644 index 3ce48b42b02e3..0000000000000 --- a/packages/integration_test/example/android/project-webview_flutter.lockfile +++ /dev/null @@ -1,100 +0,0 @@ -# This is a Gradle generated file for dependency locking. -# Manual edits can break the build and are not advised. -# This file is expected to be part of source control. -androidx.activity:activity:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.annotation:annotation:1.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.arch.core:core-common:2.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.arch.core:core-runtime:2.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.collection:collection:1.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.core:core:1.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.customview:customview:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.fragment:fragment:1.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-common-java8:2.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-common:2.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-livedata-core:2.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-livedata:2.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-runtime:2.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.lifecycle:lifecycle-viewmodel:2.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.loader:loader:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.savedstate:savedstate:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.versionedparcelable:versionedparcelable:1.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.viewpager:viewpager:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -androidx.webkit:webkit:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath -com.android.tools.analytics-library:protos:27.1.3=lintClassPath -com.android.tools.analytics-library:shared:27.1.3=lintClassPath -com.android.tools.analytics-library:tracker:27.1.3=lintClassPath -com.android.tools.build:aapt2-proto:4.1.0-alpha01-6193524=lintClassPath -com.android.tools.build:aapt2:4.1.3-6503028=_internal_aapt2_binary -com.android.tools.build:apksig:4.1.3=lintClassPath -com.android.tools.build:apkzlib:4.1.3=lintClassPath -com.android.tools.build:builder-model:4.1.3=lintClassPath -com.android.tools.build:builder-test-api:4.1.3=lintClassPath -com.android.tools.build:builder:4.1.3=lintClassPath -com.android.tools.build:gradle-api:4.1.3=lintClassPath -com.android.tools.build:manifest-merger:27.1.3=lintClassPath -com.android.tools.ddms:ddmlib:27.1.3=lintClassPath -com.android.tools.external.com-intellij:intellij-core:27.1.3=lintClassPath -com.android.tools.external.com-intellij:kotlin-compiler:27.1.3=lintClassPath -com.android.tools.external.org-jetbrains:uast:27.1.3=lintClassPath -com.android.tools.layoutlib:layoutlib-api:27.1.3=lintClassPath -com.android.tools.lint:lint-api:27.1.3=lintClassPath -com.android.tools.lint:lint-checks:27.1.3=lintClassPath -com.android.tools.lint:lint-gradle-api:27.1.3=lintClassPath -com.android.tools.lint:lint-gradle:27.1.3=lintClassPath -com.android.tools.lint:lint-model:27.1.3=lintClassPath -com.android.tools.lint:lint:27.1.3=lintClassPath -com.android.tools:annotations:27.1.3=lintClassPath -com.android.tools:common:27.1.3=lintClassPath -com.android.tools:dvlib:27.1.3=lintClassPath -com.android.tools:repository:27.1.3=lintClassPath -com.android.tools:sdk-common:27.1.3=lintClassPath -com.android.tools:sdklib:27.1.3=lintClassPath -com.android:signflinger:4.1.3=lintClassPath -com.android:zipflinger:4.1.3=lintClassPath -com.google.code.findbugs:jsr305:3.0.2=lintClassPath -com.google.code.gson:gson:2.8.5=lintClassPath -com.google.errorprone:error_prone_annotations:2.3.2=lintClassPath -com.google.guava:failureaccess:1.0.1=lintClassPath -com.google.guava:guava:28.1-jre=lintClassPath -com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=lintClassPath -com.google.j2objc:j2objc-annotations:1.3=lintClassPath -com.google.jimfs:jimfs:1.1=lintClassPath -com.google.protobuf:protobuf-java:3.10.0=lintClassPath -com.googlecode.json-simple:json-simple:1.1=lintClassPath -com.squareup:javawriter:2.5.0=lintClassPath -com.sun.activation:javax.activation:1.2.0=lintClassPath -com.sun.istack:istack-commons-runtime:3.0.7=lintClassPath -com.sun.xml.fastinfoset:FastInfoset:1.2.15=lintClassPath -commons-codec:commons-codec:1.10=lintClassPath -commons-logging:commons-logging:1.2=lintClassPath -it.unimi.dsi:fastutil:7.2.0=lintClassPath -javax.activation:javax.activation-api:1.2.0=lintClassPath -javax.inject:javax.inject:1=lintClassPath -javax.xml.bind:jaxb-api:2.3.1=lintClassPath -net.sf.jopt-simple:jopt-simple:4.9=lintClassPath -net.sf.kxml:kxml2:2.3.0=lintClassPath -org.apache.commons:commons-compress:1.12=lintClassPath -org.apache.httpcomponents:httpclient:4.5.6=lintClassPath -org.apache.httpcomponents:httpcore:4.4.10=lintClassPath -org.apache.httpcomponents:httpmime:4.5.6=lintClassPath -org.bouncycastle:bcpkix-jdk15on:1.56=lintClassPath -org.bouncycastle:bcprov-jdk15on:1.56=lintClassPath -org.checkerframework:checker-qual:2.8.1=lintClassPath -org.codehaus.groovy:groovy-all:2.4.15=lintClassPath -org.codehaus.mojo:animal-sniffer-annotations:1.18=lintClassPath -org.glassfish.jaxb:jaxb-runtime:2.3.1=lintClassPath -org.glassfish.jaxb:txw2:2.3.1=lintClassPath -org.jetbrains.kotlin:kotlin-reflect:1.3.72=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib-common:1.3.72=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib:1.3.72=lintClassPath -org.jetbrains.trove4j:trove4j:20160824=lintClassPath -org.jetbrains:annotations:13.0=lintClassPath -org.jvnet.staxex:stax-ex:1.8=lintClassPath -org.ow2.asm:asm-analysis:7.0=lintClassPath -org.ow2.asm:asm-commons:7.0=lintClassPath -org.ow2.asm:asm-tree:7.0=lintClassPath -org.ow2.asm:asm-util:7.0=lintClassPath -org.ow2.asm:asm:7.0=lintClassPath -empty=androidApis,androidTestUtil,compile,coreLibraryDesugaring,debugAndroidTestAnnotationProcessorClasspath,debugAnnotationProcessorClasspath,debugUnitTestAnnotationProcessorClasspath,lintChecks,lintPublish,profileAnnotationProcessorClasspath,profileUnitTestAnnotationProcessorClasspath,releaseAnnotationProcessorClasspath,releaseUnitTestAnnotationProcessorClasspath,testCompile diff --git a/packages/integration_test/example/pubspec.yaml b/packages/integration_test/example/pubspec.yaml index 02e8000344d92..7b5ad87e8e7a7 100644 --- a/packages/integration_test/example/pubspec.yaml +++ b/packages/integration_test/example/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -34,8 +34,8 @@ dev_dependencies: # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec - _fe_analyzer_shared: 68.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - analyzer: 6.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + _fe_analyzer_shared: 69.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 6.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -87,4 +87,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 02cb +# PUBSPEC CHECKSUM: 41ce diff --git a/packages/integration_test/integration_test_macos/pubspec.yaml b/packages/integration_test/integration_test_macos/pubspec.yaml index f67bee1a83a3c..817e26886e4ec 100644 --- a/packages/integration_test/integration_test_macos/pubspec.yaml +++ b/packages/integration_test/integration_test_macos/pubspec.yaml @@ -19,10 +19,10 @@ dependencies: characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: pedantic: 1.11.1 -# PUBSPEC CHECKSUM: 4789 +# PUBSPEC CHECKSUM: 908a diff --git a/packages/integration_test/pubspec.yaml b/packages/integration_test/pubspec.yaml index 24e3edf0b7d75..ae56f28ced256 100644 --- a/packages/integration_test/pubspec.yaml +++ b/packages/integration_test/pubspec.yaml @@ -27,7 +27,7 @@ dependencies: leak_tracker_testing: 3.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - meta: 1.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stream_channel: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -47,4 +47,4 @@ flutter: ios: pluginClass: IntegrationTestPlugin -# PUBSPEC CHECKSUM: 3a98 +# PUBSPEC CHECKSUM: be99