From 3302a12b20caf62b2bf7eadee6fc4d34887a236f Mon Sep 17 00:00:00 2001 From: xster Date: Fri, 16 Oct 2020 22:36:01 -0700 Subject: [PATCH] Let Flutter SDK use cupertino_icons 1.0.0 (#65087) --- .../lib/src/web/gallery/gallery_recorder.dart | 48 ---------- .../macrobenchmarks/lib/web_benchmarks.dart | 26 ----- dev/benchmarks/macrobenchmarks/pubspec.yaml | 95 ++----------------- .../pubspec.yaml | 6 +- .../splash_screen_kitchen_sink/pubspec.yaml | 4 +- .../splash_screen_load_rotate/pubspec.yaml | 4 +- .../splash_screen_trans_rotate/pubspec.yaml | 4 +- .../pubspec.yaml | 6 +- .../cupertino/cupertino_navigation_demo.dart | 37 ++++++-- .../cupertino/cupertino_text_field_demo.dart | 30 +++--- .../flutter_gallery/pubspec.yaml | 10 +- .../cupertino_navigation_demo_test.dart | 41 ++++++++ .../gradle_deprecated_settings/pubspec.yaml | 4 +- .../ios_add2app/flutterapp/.gitignore | 41 ++++++++ .../ios_add2app/flutterapp/pubspec.yaml | 4 +- .../flutterapp/pubspec.yaml | 4 +- .../ios_app_with_extensions/pubspec.yaml | 4 +- .../non_nullable/pubspec.yaml | 4 +- .../web_e2e_tests/pubspec.yaml | 4 +- examples/image_list/pubspec.yaml | 4 +- packages/flutter/lib/src/cupertino/icons.dart | 2 +- .../flutter/lib/src/cupertino/nav_bar.dart | 21 ++-- .../flutter/lib/src/cupertino/text_field.dart | 6 +- .../cupertino/nav_bar_transition_test.dart | 56 +++++------ .../flutter/test/cupertino/route_test.dart | 6 +- 25 files changed, 207 insertions(+), 264 deletions(-) delete mode 100644 dev/benchmarks/macrobenchmarks/lib/src/web/gallery/gallery_recorder.dart create mode 100644 dev/integration_tests/flutter_gallery/test/demo/cupertino/cupertino_navigation_demo_test.dart create mode 100644 dev/integration_tests/ios_add2app/flutterapp/.gitignore diff --git a/dev/benchmarks/macrobenchmarks/lib/src/web/gallery/gallery_recorder.dart b/dev/benchmarks/macrobenchmarks/lib/src/web/gallery/gallery_recorder.dart deleted file mode 100644 index 5de16c5482..0000000000 --- a/dev/benchmarks/macrobenchmarks/lib/src/web/gallery/gallery_recorder.dart +++ /dev/null @@ -1,48 +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:gallery/benchmarks/gallery_automator.dart'; - -import 'package:macrobenchmarks/src/web/recorder.dart'; - -/// A recorder that measures frame building durations for the Gallery. -class GalleryRecorder extends WidgetRecorder { - GalleryRecorder({ - @required this.benchmarkName, - this.shouldRunPredicate, - this.testScrollsOnly = false, - }) : assert(testScrollsOnly || shouldRunPredicate != null), - super(name: benchmarkName, useCustomWarmUp: true); - - /// The name of the gallery benchmark to be run. - final String benchmarkName; - - /// A function that accepts the name of a demo and returns whether we should - /// run this demo in this benchmark. - final bool Function(String) shouldRunPredicate; - - /// Whether this benchmark only tests scrolling. - final bool testScrollsOnly; - - /// Whether we should continue recording. - @override - bool shouldContinue() => !_finished || profile.shouldContinue(); - - GalleryAutomator _galleryAutomator; - bool get _finished => _galleryAutomator?.finished ?? false; - - /// Creates the [GalleryAutomator] widget. - @override - Widget createWidget() { - _galleryAutomator = GalleryAutomator( - benchmarkName: benchmarkName, - shouldRunPredicate: shouldRunPredicate, - testScrollsOnly: testScrollsOnly, - stopWarmingUpCallback: profile.stopWarmingUp, - ); - return _galleryAutomator.createWidget(); - } -} diff --git a/dev/benchmarks/macrobenchmarks/lib/web_benchmarks.dart b/dev/benchmarks/macrobenchmarks/lib/web_benchmarks.dart index e07c920831..cff1edf4c0 100644 --- a/dev/benchmarks/macrobenchmarks/lib/web_benchmarks.dart +++ b/dev/benchmarks/macrobenchmarks/lib/web_benchmarks.dart @@ -10,8 +10,6 @@ import 'dart:math' as math; import 'package:macrobenchmarks/src/web/bench_text_layout.dart'; import 'package:macrobenchmarks/src/web/bench_text_out_of_picture_bounds.dart'; -import 'package:gallery/benchmarks/gallery_automator.dart' show DemoType, typeOfDemo; - import 'src/web/bench_build_image.dart'; import 'src/web/bench_build_material_checkbox.dart'; import 'src/web/bench_card_infinite_scroll.dart'; @@ -26,15 +24,12 @@ import 'src/web/bench_paths.dart'; import 'src/web/bench_picture_recording.dart'; import 'src/web/bench_simple_lazy_text_scroll.dart'; import 'src/web/bench_text_out_of_picture_bounds.dart'; -import 'src/web/gallery/gallery_recorder.dart'; import 'src/web/recorder.dart'; typedef RecorderFactory = Recorder Function(); const bool isCanvasKit = bool.fromEnvironment('FLUTTER_WEB_USE_SKIA', defaultValue: false); -const String _galleryBenchmarkPrefix = 'gallery_v2'; - /// List of all benchmarks that run in the devicelab. /// /// When adding a new benchmark, add it to this map. Make sure that the name @@ -67,27 +62,6 @@ final Map benchmarks = { BenchTextCachedLayout.canvasBenchmarkName: () => BenchTextCachedLayout(useCanvas: true), BenchBuildColorsGrid.domBenchmarkName: () => BenchBuildColorsGrid.dom(), BenchBuildColorsGrid.canvasBenchmarkName: () => BenchBuildColorsGrid.canvas(), - - // The following benchmark is for the Flutter Gallery. - // This benchmark is failing when run with CanvasKit, so we skip it - // for now. - // TODO(yjbanov): https://github.com/flutter/flutter/issues/59082 - '${_galleryBenchmarkPrefix}_studies_perf': () => GalleryRecorder( - benchmarkName: '${_galleryBenchmarkPrefix}_studies_perf', - shouldRunPredicate: (String demo) => typeOfDemo(demo) == DemoType.study, - ), - '${_galleryBenchmarkPrefix}_unanimated_perf': () => GalleryRecorder( - benchmarkName: '${_galleryBenchmarkPrefix}_unanimated_perf', - shouldRunPredicate: (String demo) => typeOfDemo(demo) == DemoType.unanimatedWidget, - ), - '${_galleryBenchmarkPrefix}_animated_perf': () => GalleryRecorder( - benchmarkName: '${_galleryBenchmarkPrefix}_animated_perf', - shouldRunPredicate: (String demo) => typeOfDemo(demo) == DemoType.animatedWidget, - ), - '${_galleryBenchmarkPrefix}_scroll_perf': () => GalleryRecorder( - benchmarkName: '${_galleryBenchmarkPrefix}_scroll_perf', - testScrollsOnly: true, - ), }, }; diff --git a/dev/benchmarks/macrobenchmarks/pubspec.yaml b/dev/benchmarks/macrobenchmarks/pubspec.yaml index 8773d29893..bbe4f4f0a4 100644 --- a/dev/benchmarks/macrobenchmarks/pubspec.yaml +++ b/dev/benchmarks/macrobenchmarks/pubspec.yaml @@ -17,13 +17,6 @@ dependencies: # flutter update-packages --force-upgrade flutter_gallery_assets: 0.2.6 - # This is needed for web_benchmarks. - gallery: - git: - url: https://github.com/flutter/gallery.git - ref: d8b4858f88ab9006c15a5c9e197386623ea2e12c - - animations: 1.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" archive: 2.0.13 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 1.6.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.5.0-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -32,61 +25,22 @@ dependencies: collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 2.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - cupertino_icons: 0.1.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - ffi: 0.1.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.0.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - flare_dart: 2.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - flare_flutter: 2.0.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - flutter_localized_locales: 1.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - flutter_staggered_grid_view: 0.3.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - google_fonts: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - http: 0.12.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - intl: 0.16.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - js: 0.6.3-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.3.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - package_info: 0.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.8.0-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - path_provider: 1.6.14 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - path_provider_linux: 0.0.1+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - path_provider_macos: 0.0.4+4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - path_provider_platform_interface: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - path_provider_windows: 0.0.4+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - pedantic: 1.10.0-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - platform: 3.0.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - plugin_platform_interface: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - process: 4.0.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - rally_assets: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - scoped_model: 1.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - shared_preferences: 0.5.12 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - shared_preferences_linux: 0.0.2+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - shared_preferences_macos: 0.0.1+10 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - shared_preferences_platform_interface: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - shared_preferences_web: 0.1.2+7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - shared_preferences_windows: 0.0.1+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - shrine_images: 1.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.8.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.10.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stream_channel: 2.1.0-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - string_scanner: 1.1.0-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" sync_http: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" term_glyph: 1.2.0-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" typed_data: 1.3.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - url_launcher: 5.7.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - url_launcher_linux: 0.0.1+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - url_launcher_macos: 0.0.1+8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - url_launcher_platform_interface: 1.0.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - url_launcher_web: 0.1.4+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - url_launcher_windows: 0.0.1+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - win32: 1.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - xdg_directories: 0.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: flutter_test: @@ -104,14 +58,18 @@ dev_dependencies: fake_async: 1.2.0-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" html: 0.14.0+4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + http: 0.12.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" http_multi_server: 2.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + js: 0.6.3-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 0.9.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" node_interop: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" node_io: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" node_preamble: 1.4.12 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" package_config: 1.9.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pedantic: 1.10.0-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pool: 1.5.0-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf: 0.7.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_packages_handler: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -119,6 +77,7 @@ dev_dependencies: shelf_web_socket: 0.2.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_map_stack_trace: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_maps: 0.10.10-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + string_scanner: 1.1.0-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_api: 0.2.19-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -249,48 +208,6 @@ flutter: - packages/flutter_gallery_assets/splash_effects/splash_effect_8.gif - packages/flutter_gallery_assets/splash_effects/splash_effect_9.gif - packages/flutter_gallery_assets/splash_effects/splash_effect_10.gif - - packages/rally_assets/logo.png - - packages/rally_assets/thumb.png - - packages/shrine_images/diamond.png - - packages/shrine_images/slanted_menu.png - - packages/shrine_images/0-0.jpg - - packages/shrine_images/1-0.jpg - - packages/shrine_images/2-0.jpg - - packages/shrine_images/3-0.jpg - - packages/shrine_images/4-0.jpg - - packages/shrine_images/5-0.jpg - - packages/shrine_images/6-0.jpg - - packages/shrine_images/7-0.jpg - - packages/shrine_images/8-0.jpg - - packages/shrine_images/9-0.jpg - - packages/shrine_images/10-0.jpg - - packages/shrine_images/11-0.jpg - - packages/shrine_images/12-0.jpg - - packages/shrine_images/13-0.jpg - - packages/shrine_images/14-0.jpg - - packages/shrine_images/15-0.jpg - - packages/shrine_images/16-0.jpg - - packages/shrine_images/17-0.jpg - - packages/shrine_images/18-0.jpg - - packages/shrine_images/19-0.jpg - - packages/shrine_images/20-0.jpg - - packages/shrine_images/21-0.jpg - - packages/shrine_images/22-0.jpg - - packages/shrine_images/23-0.jpg - - packages/shrine_images/24-0.jpg - - packages/shrine_images/25-0.jpg - - packages/shrine_images/26-0.jpg - - packages/shrine_images/27-0.jpg - - packages/shrine_images/28-0.jpg - - packages/shrine_images/29-0.jpg - - packages/shrine_images/30-0.jpg - - packages/shrine_images/31-0.jpg - - packages/shrine_images/32-0.jpg - - packages/shrine_images/33-0.jpg - - packages/shrine_images/34-0.jpg - - packages/shrine_images/35-0.jpg - - packages/shrine_images/36-0.jpg - - packages/shrine_images/37-0.jpg # The following font is required for running Flutter Gallery benchmarks. fonts: @@ -298,4 +215,4 @@ flutter: fonts: - asset: packages/flutter_gallery_assets/fonts/GalleryIcons.ttf -# PUBSPEC CHECKSUM: 7d7b +# PUBSPEC CHECKSUM: 9c4a 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 5cdffdf592..275937d327 100644 --- a/dev/integration_tests/android_embedding_v2_smoke_test/pubspec.yaml +++ b/dev/integration_tests/android_embedding_v2_smoke_test/pubspec.yaml @@ -20,12 +20,12 @@ dependencies: flutter: sdk: flutter # This plugin is using Android Embedding 1 - battery: 1.0.6 + battery: 1.0.7 # TODO(egarciad): Add a plugin that uses Android Embedding 2 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: 0.1.3 + cupertino_icons: 1.0.0 battery_platform_interface: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" characters: 1.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -96,4 +96,4 @@ flutter: # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages -# PUBSPEC CHECKSUM: bf4a +# PUBSPEC CHECKSUM: 3f48 diff --git a/dev/integration_tests/android_splash_screens/splash_screen_kitchen_sink/pubspec.yaml b/dev/integration_tests/android_splash_screens/splash_screen_kitchen_sink/pubspec.yaml index 675d1d5372..fb4406f4e8 100644 --- a/dev/integration_tests/android_splash_screens/splash_screen_kitchen_sink/pubspec.yaml +++ b/dev/integration_tests/android_splash_screens/splash_screen_kitchen_sink/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: 0.1.3 + cupertino_icons: 1.0.0 characters: 1.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -137,4 +137,4 @@ flutter: # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages -# PUBSPEC CHECKSUM: eba8 +# PUBSPEC CHECKSUM: 20a5 diff --git a/dev/integration_tests/android_splash_screens/splash_screen_load_rotate/pubspec.yaml b/dev/integration_tests/android_splash_screens/splash_screen_load_rotate/pubspec.yaml index fe5489f106..08586f3c69 100644 --- a/dev/integration_tests/android_splash_screens/splash_screen_load_rotate/pubspec.yaml +++ b/dev/integration_tests/android_splash_screens/splash_screen_load_rotate/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: 0.1.3 + cupertino_icons: 1.0.0 characters: 1.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -91,4 +91,4 @@ flutter: # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages -# PUBSPEC CHECKSUM: 9423 +# PUBSPEC CHECKSUM: 2920 diff --git a/dev/integration_tests/android_splash_screens/splash_screen_trans_rotate/pubspec.yaml b/dev/integration_tests/android_splash_screens/splash_screen_trans_rotate/pubspec.yaml index 2ed07f8286..1d190509ce 100644 --- a/dev/integration_tests/android_splash_screens/splash_screen_trans_rotate/pubspec.yaml +++ b/dev/integration_tests/android_splash_screens/splash_screen_trans_rotate/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: 0.1.3 + cupertino_icons: 1.0.0 characters: 1.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -137,4 +137,4 @@ flutter: # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages -# PUBSPEC CHECKSUM: eba8 +# PUBSPEC CHECKSUM: 20a5 diff --git a/dev/integration_tests/flutter_driver_screenshot_test/pubspec.yaml b/dev/integration_tests/flutter_driver_screenshot_test/pubspec.yaml index 29987d40ca..0d2c54491b 100644 --- a/dev/integration_tests/flutter_driver_screenshot_test/pubspec.yaml +++ b/dev/integration_tests/flutter_driver_screenshot_test/pubspec.yaml @@ -9,8 +9,8 @@ dependencies: sdk: flutter flutter_driver: sdk: flutter - cupertino_icons: 0.1.3 - device_info: 0.4.2+8 + cupertino_icons: 1.0.0 + device_info: 0.4.2+9 archive: 2.0.13 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 1.6.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -82,4 +82,4 @@ flutter: assets: - assets/ -# PUBSPEC CHECKSUM: 5acc +# PUBSPEC CHECKSUM: beca diff --git a/dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart b/dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart index 097d7d5019..36fbb4d2e6 100644 --- a/dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart +++ b/dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart @@ -32,18 +32,19 @@ const List coolColorNames = [ const int _kChildCount = 50; class CupertinoNavigationDemo extends StatelessWidget { - CupertinoNavigationDemo() + CupertinoNavigationDemo({ this.randomSeed }) : colorItems = List.generate(_kChildCount, (int index) { - return coolColors[math.Random().nextInt(coolColors.length)]; + return coolColors[math.Random(randomSeed).nextInt(coolColors.length)]; }) , colorNameItems = List.generate(_kChildCount, (int index) { - return coolColorNames[math.Random().nextInt(coolColorNames.length)]; + return coolColorNames[math.Random(randomSeed).nextInt(coolColorNames.length)]; }); static const String routeName = '/cupertino/navigation'; final List colorItems; final List colorNameItems; + final int randomSeed; @override Widget build(BuildContext context) { @@ -56,15 +57,15 @@ class CupertinoNavigationDemo extends StatelessWidget { tabBar: CupertinoTabBar( items: const [ BottomNavigationBarItem( - icon: Icon(CupertinoIcons.home), + icon: Icon(CupertinoIcons.house, size: 27), label: 'Home', ), BottomNavigationBarItem( - icon: Icon(CupertinoIcons.conversation_bubble), + icon: Icon(CupertinoIcons.chat_bubble, size: 27), label: 'Support', ), BottomNavigationBarItem( - icon: Icon(CupertinoIcons.profile_circled), + icon: Icon(CupertinoIcons.person_circle, size: 27), label: 'Profile', ), ], @@ -78,6 +79,7 @@ class CupertinoNavigationDemo extends StatelessWidget { return CupertinoDemoTab1( colorItems: colorItems, colorNameItems: colorNameItems, + randomSeed: randomSeed, ); }, defaultTitle: 'Colors', @@ -134,10 +136,15 @@ final Widget trailingButtons = Row( ); class CupertinoDemoTab1 extends StatelessWidget { - const CupertinoDemoTab1({this.colorItems, this.colorNameItems}); + const CupertinoDemoTab1({ + this.colorItems, + this.colorNameItems, + this.randomSeed, + }); final List colorItems; final List colorNameItems; + final int randomSeed; @override Widget build(BuildContext context) { @@ -165,6 +172,7 @@ class CupertinoDemoTab1 extends StatelessWidget { lastItem: index == _kChildCount - 1, color: colorItems[index], colorName: colorNameItems[index], + randomSeed: randomSeed, ); }, childCount: _kChildCount, @@ -178,12 +186,19 @@ class CupertinoDemoTab1 extends StatelessWidget { } class Tab1RowItem extends StatelessWidget { - const Tab1RowItem({this.index, this.lastItem, this.color, this.colorName}); + const Tab1RowItem({ + this.index, + this.lastItem, + this.color, + this.colorName, + this.randomSeed, + }); final int index; final bool lastItem; final Color color; final String colorName; + final int randomSeed; @override Widget build(BuildContext context) { @@ -196,6 +211,7 @@ class Tab1RowItem extends StatelessWidget { color: color, colorName: colorName, index: index, + randomSeed: randomSeed, ), )); }, @@ -274,11 +290,12 @@ class Tab1RowItem extends StatelessWidget { } class Tab1ItemPage extends StatefulWidget { - const Tab1ItemPage({this.color, this.colorName, this.index}); + const Tab1ItemPage({this.color, this.colorName, this.index, this.randomSeed}); final Color color; final String colorName; final int index; + final int randomSeed; @override State createState() => Tab1ItemPageState(); @@ -289,7 +306,7 @@ class Tab1ItemPageState extends State { void initState() { super.initState(); relatedColors = List.generate(10, (int index) { - final math.Random random = math.Random(); + final math.Random random = math.Random(widget.randomSeed); return Color.fromARGB( 255, (widget.color.red + random.nextInt(100) - 50).clamp(0, 255) as int, diff --git a/dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_text_field_demo.dart b/dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_text_field_demo.dart index 08964d6f38..77956ddcda 100644 --- a/dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_text_field_demo.dart +++ b/dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_text_field_demo.dart @@ -40,17 +40,15 @@ class _CupertinoTextFieldDemoState extends State { keyboardType: TextInputType.multiline, prefix: const Padding(padding: EdgeInsets.symmetric(horizontal: 4.0)), suffix: Padding( - padding: const EdgeInsets.symmetric(horizontal: 4.0), + padding: const EdgeInsets.symmetric(horizontal: 2.0), child: CupertinoButton( - color: CupertinoColors.activeGreen, minSize: 0.0, child: const Icon( - CupertinoIcons.up_arrow, - size: 21.0, - color: CupertinoColors.white, + CupertinoIcons.arrow_up_circle_fill, + size: 28.0, + color: CupertinoColors.activeGreen, ), - padding: const EdgeInsets.all(2.0), - borderRadius: BorderRadius.circular(15.0), + padding: const EdgeInsets.only(bottom: 4), onPressed: ()=> setState(()=> _chatTextController.clear()), ), ), @@ -63,7 +61,7 @@ class _CupertinoTextFieldDemoState extends State { Widget _buildNameField() { return const CupertinoTextField( prefix: Icon( - CupertinoIcons.person_solid, + CupertinoIcons.person_fill, color: CupertinoColors.lightBackgroundGray, size: 28.0, ), @@ -81,9 +79,9 @@ class _CupertinoTextFieldDemoState extends State { Widget _buildEmailField() { return const CupertinoTextField( prefix: Icon( - CupertinoIcons.mail_solid, + CupertinoIcons.envelope_fill, color: CupertinoColors.lightBackgroundGray, - size: 28.0, + size: 26, ), padding: EdgeInsets.symmetric(horizontal: 6.0, vertical: 12.0), clearButtonMode: OverlayVisibilityMode.editing, @@ -100,9 +98,9 @@ class _CupertinoTextFieldDemoState extends State { return CupertinoTextField( controller: _locationTextController, prefix: const Icon( - CupertinoIcons.location_solid, + CupertinoIcons.location_fill, color: CupertinoColors.lightBackgroundGray, - size: 28.0, + size: 26, ), padding: const EdgeInsets.symmetric(horizontal: 6.0, vertical: 12.0), clearButtonMode: OverlayVisibilityMode.editing, @@ -117,9 +115,9 @@ class _CupertinoTextFieldDemoState extends State { Widget _buildPinField() { return const CupertinoTextField( prefix: Icon( - CupertinoIcons.padlock_solid, + CupertinoIcons.lock_open_fill, color: CupertinoColors.lightBackgroundGray, - size: 28.0, + size: 26, ), padding: EdgeInsets.symmetric(horizontal: 6.0, vertical: 12.0), clearButtonMode: OverlayVisibilityMode.editing, @@ -137,9 +135,9 @@ class _CupertinoTextFieldDemoState extends State { return CupertinoTextField( controller: TextEditingController(text: 'colleague, reading club'), prefix: const Icon( - CupertinoIcons.tags_solid, + CupertinoIcons.tag_fill, color: CupertinoColors.lightBackgroundGray, - size: 28.0, + size: 26, ), enabled: false, padding: const EdgeInsets.symmetric(horizontal: 6.0, vertical: 12.0), diff --git a/dev/integration_tests/flutter_gallery/pubspec.yaml b/dev/integration_tests/flutter_gallery/pubspec.yaml index b0cba85dcf..3db1617291 100644 --- a/dev/integration_tests/flutter_gallery/pubspec.yaml +++ b/dev/integration_tests/flutter_gallery/pubspec.yaml @@ -8,12 +8,12 @@ dependencies: flutter: sdk: flutter collection: 1.15.0-nullsafety.3 - device_info: 0.4.2+8 + device_info: 0.4.2+9 intl: 0.16.1 - connectivity: 0.4.9+3 + connectivity: 0.4.9+5 string_scanner: 1.1.0-nullsafety.1 - url_launcher: 5.7.2 - cupertino_icons: 0.1.3 + url_launcher: 5.7.5 + cupertino_icons: 1.0.0 video_player: 0.10.6 scoped_model: 1.0.1 shrine_images: 1.1.2 @@ -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: 023a +# PUBSPEC CHECKSUM: 1f3d diff --git a/dev/integration_tests/flutter_gallery/test/demo/cupertino/cupertino_navigation_demo_test.dart b/dev/integration_tests/flutter_gallery/test/demo/cupertino/cupertino_navigation_demo_test.dart new file mode 100644 index 0000000000..e1698fb9d1 --- /dev/null +++ b/dev/integration_tests/flutter_gallery/test/demo/cupertino/cupertino_navigation_demo_test.dart @@ -0,0 +1,41 @@ +// 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/cupertino.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_gallery/demo/cupertino/cupertino_navigation_demo.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Navigation demo golden', (WidgetTester tester) async { + // The point is to mainly test the cupertino icons that we don't have a + // dependency against in the flutter/cupertino package directly. + + final Future font = rootBundle.load( + 'packages/cupertino_icons/assets/CupertinoIcons.ttf' + ); + + await (FontLoader('packages/cupertino_icons/CupertinoIcons')..addFont(font)) + .load(); + + await tester.pumpWidget(CupertinoApp( + home: CupertinoNavigationDemo(randomSeed: 123456), + )); + + await expectLater( + find.byType(CupertinoNavigationDemo), + matchesGoldenFile('cupertino_navigation_demo.screen.1.png'), + ); + + // Tap some row to go to the next page. + await tester.tap(find.text('Buy this cool color').first); + await tester.pump(); + await tester.pump(const Duration(milliseconds: 500)); + + await expectLater( + find.byType(CupertinoNavigationDemo), + matchesGoldenFile('cupertino_navigation_demo.screen.2.png'), + ); + }); +} diff --git a/dev/integration_tests/gradle_deprecated_settings/pubspec.yaml b/dev/integration_tests/gradle_deprecated_settings/pubspec.yaml index 0f78772f1c..f46ce71b4a 100644 --- a/dev/integration_tests/gradle_deprecated_settings/pubspec.yaml +++ b/dev/integration_tests/gradle_deprecated_settings/pubspec.yaml @@ -8,7 +8,7 @@ environment: dependencies: flutter: sdk: flutter - camera: 0.5.8+8 + camera: 0.5.8+9 characters: 1.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -19,4 +19,4 @@ dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 8dce +# PUBSPEC CHECKSUM: b3cf diff --git a/dev/integration_tests/ios_add2app/flutterapp/.gitignore b/dev/integration_tests/ios_add2app/flutterapp/.gitignore new file mode 100644 index 0000000000..cdecf14aaa --- /dev/null +++ b/dev/integration_tests/ios_add2app/flutterapp/.gitignore @@ -0,0 +1,41 @@ +.DS_Store +.dart_tool/ + +.packages +.pub/ + +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +*.swp +profile + +DerivedData/ + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +build/ +.android/ +.ios/ +.flutter-plugins diff --git a/dev/integration_tests/ios_add2app/flutterapp/pubspec.yaml b/dev/integration_tests/ios_add2app/flutterapp/pubspec.yaml index 42c8c495b0..92e9ef0207 100644 --- a/dev/integration_tests/ios_add2app/flutterapp/pubspec.yaml +++ b/dev/integration_tests/ios_add2app/flutterapp/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: 0.1.3 + cupertino_icons: 1.0.0 characters: 1.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -99,4 +99,4 @@ flutter: androidPackage: com.example.iosadd2appflutter iosBundleIdentifier: com.example.iosAdd2appFlutter -# PUBSPEC CHECKSUM: 9423 +# PUBSPEC CHECKSUM: 2920 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 a98e3ca2f9..920036bbf3 100644 --- a/dev/integration_tests/ios_add2app_life_cycle/flutterapp/pubspec.yaml +++ b/dev/integration_tests/ios_add2app_life_cycle/flutterapp/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: 0.1.3 + cupertino_icons: 1.0.0 characters: 1.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -99,4 +99,4 @@ flutter: androidPackage: com.example.iosadd2appflutter iosBundleIdentifier: com.example.iosAdd2appFlutter -# PUBSPEC CHECKSUM: 9423 +# PUBSPEC CHECKSUM: 2920 diff --git a/dev/integration_tests/ios_app_with_extensions/pubspec.yaml b/dev/integration_tests/ios_app_with_extensions/pubspec.yaml index 7c178025d8..5bd1be41e7 100644 --- a/dev/integration_tests/ios_app_with_extensions/pubspec.yaml +++ b/dev/integration_tests/ios_app_with_extensions/pubspec.yaml @@ -20,7 +20,7 @@ dependencies: sdk: flutter # This integration test includes a watchOS pod. Add a Flutter plugin # to prompt the tool to run pod install. - device_info: 0.4.2+8 + device_info: 0.4.2+9 characters: 1.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -91,4 +91,4 @@ flutter: # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages -# PUBSPEC CHECKSUM: c70b +# PUBSPEC CHECKSUM: 220c diff --git a/dev/integration_tests/non_nullable/pubspec.yaml b/dev/integration_tests/non_nullable/pubspec.yaml index be4aa814cf..c51ec7ca12 100644 --- a/dev/integration_tests/non_nullable/pubspec.yaml +++ b/dev/integration_tests/non_nullable/pubspec.yaml @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - cupertino_icons: 0.1.3 + cupertino_icons: 1.0.0 characters: 1.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -39,4 +39,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 9423 +# PUBSPEC CHECKSUM: 2920 diff --git a/dev/integration_tests/web_e2e_tests/pubspec.yaml b/dev/integration_tests/web_e2e_tests/pubspec.yaml index c9d4cab372..e14d95dbca 100644 --- a/dev/integration_tests/web_e2e_tests/pubspec.yaml +++ b/dev/integration_tests/web_e2e_tests/pubspec.yaml @@ -19,7 +19,7 @@ dev_dependencies: sdk: flutter flutter_test: sdk: flutter - integration_test: 0.9.2 + integration_test: 0.9.2+1 http: 0.12.2 test: 1.16.0-nullsafety.5 @@ -78,4 +78,4 @@ dev_dependencies: webkit_inspection_protocol: 0.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: eb1f +# PUBSPEC CHECKSUM: f37b diff --git a/examples/image_list/pubspec.yaml b/examples/image_list/pubspec.yaml index f2488f88b2..bfa737b794 100644 --- a/examples/image_list/pubspec.yaml +++ b/examples/image_list/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: 0.1.3 + cupertino_icons: 1.0.0 characters: 1.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -54,4 +54,4 @@ flutter: assets: - images/coast.jpg -# PUBSPEC CHECKSUM: 9423 +# PUBSPEC CHECKSUM: 2920 diff --git a/packages/flutter/lib/src/cupertino/icons.dart b/packages/flutter/lib/src/cupertino/icons.dart index e27f3e7647..671e0af596 100644 --- a/packages/flutter/lib/src/cupertino/icons.dart +++ b/packages/flutter/lib/src/cupertino/icons.dart @@ -21,7 +21,7 @@ import 'package:flutter/widgets.dart'; /// cupertino_icons: ^1.0.0 /// ``` /// -/// For a map of available icons for use, see +/// For a map of available icons for use, see /// for cupertino_icons version >1.0.0. /// /// See for diff --git a/packages/flutter/lib/src/cupertino/nav_bar.dart b/packages/flutter/lib/src/cupertino/nav_bar.dart index f108e49229..0ae25905c4 100644 --- a/packages/flutter/lib/src/cupertino/nav_bar.dart +++ b/packages/flutter/lib/src/cupertino/nav_bar.dart @@ -1379,15 +1379,18 @@ class _BackChevron extends StatelessWidget { // Replicate the Icon logic here to get a tightly sized icon and add // custom non-square padding. - Widget iconWidget = Text.rich( - TextSpan( - text: String.fromCharCode(CupertinoIcons.back.codePoint), - style: TextStyle( - inherit: false, - color: textStyle.color, - fontSize: 34.0, - fontFamily: CupertinoIcons.back.fontFamily, - package: CupertinoIcons.back.fontPackage, + Widget iconWidget = Padding( + padding: const EdgeInsetsDirectional.only(start: 6, end: 2), + child: Text.rich( + TextSpan( + text: String.fromCharCode(CupertinoIcons.back.codePoint), + style: TextStyle( + inherit: false, + color: textStyle.color, + fontSize: 30.0, + fontFamily: CupertinoIcons.back.fontFamily, + package: CupertinoIcons.back.fontPackage, + ), ), ), ); diff --git a/packages/flutter/lib/src/cupertino/text_field.dart b/packages/flutter/lib/src/cupertino/text_field.dart index 0dc8027713..5d3e0dd1a1 100644 --- a/packages/flutter/lib/src/cupertino/text_field.dart +++ b/packages/flutter/lib/src/cupertino/text_field.dart @@ -46,11 +46,11 @@ const Color _kDisabledBackground = CupertinoDynamicColor.withBrightness( darkColor: Color(0xFF050505), ); -// Value inspected from Xcode 11 & iOS 13.0 Simulator. +// Value inspected from Xcode 12 & iOS 14.0 Simulator. // Note it may not be consistent with https://developer.apple.com/design/resources/. const CupertinoDynamicColor _kClearButtonColor = CupertinoDynamicColor.withBrightness( - color: Color(0xFF636366), - darkColor: Color(0xFFAEAEB2), + color: Color(0x33000000), + darkColor: Color(0x33FFFFFF), ); // An eyeballed value that moves the cursor slightly left of where it is diff --git a/packages/flutter/test/cupertino/nav_bar_transition_test.dart b/packages/flutter/test/cupertino/nav_bar_transition_test.dart index f7f46b2f72..dfa955d0e4 100644 --- a/packages/flutter/test/cupertino/nav_bar_transition_test.dart +++ b/packages/flutter/test/cupertino/nav_bar_transition_test.dart @@ -135,11 +135,11 @@ void main() { // place. expect( tester.getTopLeft(flying(tester, find.text('Page 1')).first), - const Offset(337.0234375, 13.5), + const Offset(337.1953125, 13.5), ); expect( tester.getTopLeft(flying(tester, find.text('Page 1')).last), - const Offset(337.0234375, 13.5), + const Offset(337.1953125, 13.5), ); }); @@ -156,11 +156,11 @@ void main() { // Same as LTR but more to the right now. expect( tester.getTopLeft(flying(tester, find.text('Page 1')).first), - const Offset(362.9765625, 13.5), + const Offset(362.8046875, 13.5), ); expect( tester.getTopLeft(flying(tester, find.text('Page 1')).last), - const Offset(362.9765625, 13.5), + const Offset(362.8046875, 13.5), ); }); @@ -329,7 +329,7 @@ void main() { expect(bottomMiddle.text.style!.color, const Color(0xff00050a)); expect( tester.getTopLeft(flying(tester, find.text('Page 1')).first), - const Offset(337.0234375, 13.5), + const Offset(337.1953125, 13.5), ); // The top back label is styled exactly the same way. But the opacity tweens @@ -339,7 +339,7 @@ void main() { expect(topBackLabel.text.style!.color, const Color(0xff00050a)); expect( tester.getTopLeft(flying(tester, find.text('Page 1')).last), - const Offset(337.0234375, 13.5), + const Offset(337.1953125, 13.5), ); } @@ -374,7 +374,7 @@ void main() { expect(bottomMiddle.text.style!.color, const Color(0xff00050a)); expect( tester.getTopLeft(flying(tester, find.text('Page 1')).first), - const Offset(362.9765625, 13.5), + const Offset(362.8046875, 13.5), ); // The top back label is styled exactly the same way. But the opacity tweens @@ -384,7 +384,7 @@ void main() { expect(topBackLabel.text.style!.color, const Color(0xff00050a)); expect( tester.getTopLeft(flying(tester, find.text('Page 1')).last), - const Offset(362.9765625, 13.5), + const Offset(362.8046875, 13.5), ); } @@ -599,12 +599,12 @@ void main() { // Come in from the right and fade in. checkOpacity(tester, backChevron, 0.0); expect( - tester.getTopLeft(backChevron), const Offset(73.078125, 5.0)); + tester.getTopLeft(backChevron), const Offset(86.734375, 7.0)); await tester.pump(const Duration(milliseconds: 150)); checkOpacity(tester, backChevron, 0.09497911669313908); expect( - tester.getTopLeft(backChevron), const Offset(23.260527312755585, 5.0)); + tester.getTopLeft(backChevron), const Offset(31.055883467197418, 7.0)); }); testWidgets('First appearance of back chevron fades in from the left in RTL', (WidgetTester tester) async { @@ -643,14 +643,14 @@ void main() { checkOpacity(tester, backChevron, 0.0); expect( tester.getTopRight(backChevron), - const Offset(692.921875, 5.0), + const Offset(687.265625, 7.0), ); await tester.pump(const Duration(milliseconds: 150)); checkOpacity(tester, backChevron, 0.09497911669313908); expect( tester.getTopRight(backChevron), - const Offset(742.7394726872444, 5.0), + const Offset(742.9441165328026, 7.0), ); }); @@ -670,15 +670,15 @@ void main() { checkOpacity(tester, backChevrons.first, 0.8833301812410355); checkOpacity(tester, backChevrons.last, 0.0); // Both overlap at the same place. - expect(tester.getTopLeft(backChevrons.first), const Offset(8.0, 5.0)); - expect(tester.getTopLeft(backChevrons.last), const Offset(8.0, 5.0)); + expect(tester.getTopLeft(backChevrons.first), const Offset(14.0, 7.0)); + expect(tester.getTopLeft(backChevrons.last), const Offset(14.0, 7.0)); await tester.pump(const Duration(milliseconds: 150)); checkOpacity(tester, backChevrons.first, 0.0); checkOpacity(tester, backChevrons.last, 0.4604858811944723); // Still in the same place. - expect(tester.getTopLeft(backChevrons.first), const Offset(8.0, 5.0)); - expect(tester.getTopLeft(backChevrons.last), const Offset(8.0, 5.0)); + expect(tester.getTopLeft(backChevrons.first), const Offset(14.0, 7.0)); + expect(tester.getTopLeft(backChevrons.last), const Offset(14.0, 7.0)); }); testWidgets('Bottom middle just fades if top page has a custom leading', (WidgetTester tester) async { @@ -789,14 +789,14 @@ void main() { checkOpacity(tester, flying(tester, find.text('Page 1')), 0.6697911769151688); expect( tester.getTopLeft(flying(tester, find.text('Page 1'))), - const Offset(30.8125, 13.5), + const Offset(34.8125, 13.5), ); await tester.pump(const Duration(milliseconds: 150)); checkOpacity(tester, flying(tester, find.text('Page 1')), 0.0); expect( tester.getTopLeft(flying(tester, find.text('Page 1'))), - const Offset(-262.2321922779083, 13.5), + const Offset(-258.2321922779083, 13.5), ); }); @@ -826,7 +826,7 @@ void main() { checkOpacity(tester, flying(tester, find.text('Page 1')), 0.6697911769151688); expect( tester.getTopRight(flying(tester, find.text('Page 1'))), - const Offset(769.1875, 13.5), + const Offset(765.1875, 13.5), ); await tester.pump(const Duration(milliseconds: 150)); @@ -834,7 +834,7 @@ void main() { expect( tester.getTopRight(flying(tester, find.text('Page 1'))), // >1000. It's now off the screen. - const Offset(1062.2321922779083, 13.5), + const Offset(1058.2321922779083, 13.5), ); }); @@ -856,11 +856,11 @@ void main() { checkOpacity(tester, flying(tester, find.text('Page 1')).last, 0.0); expect( tester.getTopLeft(flying(tester, find.text('Page 1')).first), - const Offset(17.375, 52.39453125), + const Offset(17.546875, 52.39453125), ); expect( tester.getTopLeft(flying(tester, find.text('Page 1')).last), - const Offset(17.375, 52.39453125), + const Offset(17.546875, 52.39453125), ); await tester.pump(const Duration(milliseconds: 150)); @@ -868,11 +868,11 @@ void main() { checkOpacity(tester, flying(tester, find.text('Page 1')).last, 0.4604858811944723); expect( tester.getTopLeft(flying(tester, find.text('Page 1')).first), - const Offset(40.818575382232666, 22.49655644595623), + const Offset(43.92089730501175, 22.49655644595623), ); expect( tester.getTopLeft(flying(tester, find.text('Page 1')).last), - const Offset(40.818575382232666, 22.49655644595623), + const Offset(43.92089730501175, 22.49655644595623), ); }); @@ -896,11 +896,11 @@ void main() { checkOpacity(tester, flying(tester, find.text('Back')), 0.0); expect( tester.getTopLeft(flying(tester, find.text('A title too long to fit'))), - const Offset(17.375, 52.39453125), + const Offset(17.546875, 52.39453125), ); expect( tester.getTopLeft(flying(tester, find.text('Back'))), - const Offset(17.375, 52.39453125), + const Offset(17.546875, 52.39453125), ); await tester.pump(const Duration(milliseconds: 150)); @@ -908,11 +908,11 @@ void main() { checkOpacity(tester, flying(tester, find.text('Back')), 0.4604858811944723); expect( tester.getTopLeft(flying(tester, find.text('A title too long to fit'))), - const Offset(40.818575382232666, 22.49655644595623), + const Offset(43.92089730501175, 22.49655644595623), ); expect( tester.getTopLeft(flying(tester, find.text('Back'))), - const Offset(40.818575382232666, 22.49655644595623), + const Offset(43.92089730501175, 22.49655644595623), ); }); diff --git a/packages/flutter/test/cupertino/route_test.dart b/packages/flutter/test/cupertino/route_test.dart index bacea8f004..0a9a8bd1cc 100644 --- a/packages/flutter/test/cupertino/route_test.dart +++ b/packages/flutter/test/cupertino/route_test.dart @@ -154,8 +154,8 @@ void main() { // Also shows the previous page's title next to the back button. expect(find.widgetWithText(CupertinoButton, 'An iPod'), findsOneWidget); - // 2 paddings + 1 ahem character at font size 34.0. - expect(tester.getTopLeft(find.text('An iPod')).dx, 8.0 + 34.0 + 6.0); + // 3 paddings + 1 ahem character at font size 34.0. + expect(tester.getTopLeft(find.text('An iPod')).dx, 8.0 + 4.0 + 34.0 + 6.0); }); testWidgets('Previous title is correct on first transition frame', (WidgetTester tester) async { @@ -261,7 +261,7 @@ void main() { // from An iPod to Back (since An Internet communicator is too long to // fit in the back button). expect(find.widgetWithText(CupertinoButton, 'Back'), findsOneWidget); - expect(tester.getTopLeft(find.text('Back')).dx, 8.0 + 34.0 + 6.0); + expect(tester.getTopLeft(find.text('Back')).dx, 8.0 + 4.0 + 34.0 + 6.0); }); testWidgets('Back swipe dismiss interrupted by route push', (WidgetTester tester) async {