Unverified Commit 3302a12b authored by xster's avatar xster Committed by GitHub

Let Flutter SDK use cupertino_icons 1.0.0 (#65087)

parent d2d07219
// 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();
}
}
...@@ -10,8 +10,6 @@ import 'dart:math' as math; ...@@ -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_layout.dart';
import 'package:macrobenchmarks/src/web/bench_text_out_of_picture_bounds.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_image.dart';
import 'src/web/bench_build_material_checkbox.dart'; import 'src/web/bench_build_material_checkbox.dart';
import 'src/web/bench_card_infinite_scroll.dart'; import 'src/web/bench_card_infinite_scroll.dart';
...@@ -26,15 +24,12 @@ import 'src/web/bench_paths.dart'; ...@@ -26,15 +24,12 @@ import 'src/web/bench_paths.dart';
import 'src/web/bench_picture_recording.dart'; import 'src/web/bench_picture_recording.dart';
import 'src/web/bench_simple_lazy_text_scroll.dart'; import 'src/web/bench_simple_lazy_text_scroll.dart';
import 'src/web/bench_text_out_of_picture_bounds.dart'; import 'src/web/bench_text_out_of_picture_bounds.dart';
import 'src/web/gallery/gallery_recorder.dart';
import 'src/web/recorder.dart'; import 'src/web/recorder.dart';
typedef RecorderFactory = Recorder Function(); typedef RecorderFactory = Recorder Function();
const bool isCanvasKit = bool.fromEnvironment('FLUTTER_WEB_USE_SKIA', defaultValue: false); 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. /// List of all benchmarks that run in the devicelab.
/// ///
/// When adding a new benchmark, add it to this map. Make sure that the name /// When adding a new benchmark, add it to this map. Make sure that the name
...@@ -67,27 +62,6 @@ final Map<String, RecorderFactory> benchmarks = <String, RecorderFactory>{ ...@@ -67,27 +62,6 @@ final Map<String, RecorderFactory> benchmarks = <String, RecorderFactory>{
BenchTextCachedLayout.canvasBenchmarkName: () => BenchTextCachedLayout(useCanvas: true), BenchTextCachedLayout.canvasBenchmarkName: () => BenchTextCachedLayout(useCanvas: true),
BenchBuildColorsGrid.domBenchmarkName: () => BenchBuildColorsGrid.dom(), BenchBuildColorsGrid.domBenchmarkName: () => BenchBuildColorsGrid.dom(),
BenchBuildColorsGrid.canvasBenchmarkName: () => BenchBuildColorsGrid.canvas(), 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,
),
}, },
}; };
......
...@@ -17,13 +17,6 @@ dependencies: ...@@ -17,13 +17,6 @@ dependencies:
# flutter update-packages --force-upgrade # flutter update-packages --force-upgrade
flutter_gallery_assets: 0.2.6 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" 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" 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" async: 2.5.0-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...@@ -32,61 +25,22 @@ dependencies: ...@@ -32,61 +25,22 @@ dependencies:
collection: 1.15.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"
convert: 2.1.1 # 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" 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" 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" 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" 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" 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: 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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: dev_dependencies:
flutter_test: flutter_test:
...@@ -104,14 +58,18 @@ dev_dependencies: ...@@ -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" 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" 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" 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_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" 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" 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" 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_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_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" 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" 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" 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: 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" shelf_packages_handler: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...@@ -119,6 +77,7 @@ dev_dependencies: ...@@ -119,6 +77,7 @@ dev_dependencies:
shelf_web_socket: 0.2.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" 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_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" 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_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" 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" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...@@ -249,48 +208,6 @@ flutter: ...@@ -249,48 +208,6 @@ flutter:
- packages/flutter_gallery_assets/splash_effects/splash_effect_8.gif - 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_9.gif
- packages/flutter_gallery_assets/splash_effects/splash_effect_10.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. # The following font is required for running Flutter Gallery benchmarks.
fonts: fonts:
...@@ -298,4 +215,4 @@ flutter: ...@@ -298,4 +215,4 @@ flutter:
fonts: fonts:
- asset: packages/flutter_gallery_assets/fonts/GalleryIcons.ttf - asset: packages/flutter_gallery_assets/fonts/GalleryIcons.ttf
# PUBSPEC CHECKSUM: 7d7b # PUBSPEC CHECKSUM: 9c4a
...@@ -20,12 +20,12 @@ dependencies: ...@@ -20,12 +20,12 @@ dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
# This plugin is using Android Embedding 1 # 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 # TODO(egarciad): Add a plugin that uses Android Embedding 2
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # 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" 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" characters: 1.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...@@ -96,4 +96,4 @@ flutter: ...@@ -96,4 +96,4 @@ flutter:
# For details regarding fonts from package dependencies, # For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages # see https://flutter.dev/custom-fonts/#from-packages
# PUBSPEC CHECKSUM: bf4a # PUBSPEC CHECKSUM: 3f48
...@@ -22,7 +22,7 @@ dependencies: ...@@ -22,7 +22,7 @@ dependencies:
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # 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" 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" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...@@ -137,4 +137,4 @@ flutter: ...@@ -137,4 +137,4 @@ flutter:
# For details regarding fonts from package dependencies, # For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages # see https://flutter.dev/custom-fonts/#from-packages
# PUBSPEC CHECKSUM: eba8 # PUBSPEC CHECKSUM: 20a5
...@@ -22,7 +22,7 @@ dependencies: ...@@ -22,7 +22,7 @@ dependencies:
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # 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" 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" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...@@ -91,4 +91,4 @@ flutter: ...@@ -91,4 +91,4 @@ flutter:
# For details regarding fonts from package dependencies, # For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages # see https://flutter.dev/custom-fonts/#from-packages
# PUBSPEC CHECKSUM: 9423 # PUBSPEC CHECKSUM: 2920
...@@ -22,7 +22,7 @@ dependencies: ...@@ -22,7 +22,7 @@ dependencies:
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # 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" 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" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...@@ -137,4 +137,4 @@ flutter: ...@@ -137,4 +137,4 @@ flutter:
# For details regarding fonts from package dependencies, # For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages # see https://flutter.dev/custom-fonts/#from-packages
# PUBSPEC CHECKSUM: eba8 # PUBSPEC CHECKSUM: 20a5
...@@ -9,8 +9,8 @@ dependencies: ...@@ -9,8 +9,8 @@ dependencies:
sdk: flutter sdk: flutter
flutter_driver: flutter_driver:
sdk: flutter sdk: flutter
cupertino_icons: 0.1.3 cupertino_icons: 1.0.0
device_info: 0.4.2+8 device_info: 0.4.2+9
archive: 2.0.13 # 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" args: 1.6.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...@@ -82,4 +82,4 @@ flutter: ...@@ -82,4 +82,4 @@ flutter:
assets: assets:
- assets/ - assets/
# PUBSPEC CHECKSUM: 5acc # PUBSPEC CHECKSUM: beca
...@@ -32,18 +32,19 @@ const List<String> coolColorNames = <String>[ ...@@ -32,18 +32,19 @@ const List<String> coolColorNames = <String>[
const int _kChildCount = 50; const int _kChildCount = 50;
class CupertinoNavigationDemo extends StatelessWidget { class CupertinoNavigationDemo extends StatelessWidget {
CupertinoNavigationDemo() CupertinoNavigationDemo({ this.randomSeed })
: colorItems = List<Color>.generate(_kChildCount, (int index) { : colorItems = List<Color>.generate(_kChildCount, (int index) {
return coolColors[math.Random().nextInt(coolColors.length)]; return coolColors[math.Random(randomSeed).nextInt(coolColors.length)];
}) , }) ,
colorNameItems = List<String>.generate(_kChildCount, (int index) { colorNameItems = List<String>.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'; static const String routeName = '/cupertino/navigation';
final List<Color> colorItems; final List<Color> colorItems;
final List<String> colorNameItems; final List<String> colorNameItems;
final int randomSeed;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -56,15 +57,15 @@ class CupertinoNavigationDemo extends StatelessWidget { ...@@ -56,15 +57,15 @@ class CupertinoNavigationDemo extends StatelessWidget {
tabBar: CupertinoTabBar( tabBar: CupertinoTabBar(
items: const <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Icon(CupertinoIcons.home), icon: Icon(CupertinoIcons.house, size: 27),
label: 'Home', label: 'Home',
), ),
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Icon(CupertinoIcons.conversation_bubble), icon: Icon(CupertinoIcons.chat_bubble, size: 27),
label: 'Support', label: 'Support',
), ),
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Icon(CupertinoIcons.profile_circled), icon: Icon(CupertinoIcons.person_circle, size: 27),
label: 'Profile', label: 'Profile',
), ),
], ],
...@@ -78,6 +79,7 @@ class CupertinoNavigationDemo extends StatelessWidget { ...@@ -78,6 +79,7 @@ class CupertinoNavigationDemo extends StatelessWidget {
return CupertinoDemoTab1( return CupertinoDemoTab1(
colorItems: colorItems, colorItems: colorItems,
colorNameItems: colorNameItems, colorNameItems: colorNameItems,
randomSeed: randomSeed,
); );
}, },
defaultTitle: 'Colors', defaultTitle: 'Colors',
...@@ -134,10 +136,15 @@ final Widget trailingButtons = Row( ...@@ -134,10 +136,15 @@ final Widget trailingButtons = Row(
); );
class CupertinoDemoTab1 extends StatelessWidget { class CupertinoDemoTab1 extends StatelessWidget {
const CupertinoDemoTab1({this.colorItems, this.colorNameItems}); const CupertinoDemoTab1({
this.colorItems,
this.colorNameItems,
this.randomSeed,
});
final List<Color> colorItems; final List<Color> colorItems;
final List<String> colorNameItems; final List<String> colorNameItems;
final int randomSeed;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -165,6 +172,7 @@ class CupertinoDemoTab1 extends StatelessWidget { ...@@ -165,6 +172,7 @@ class CupertinoDemoTab1 extends StatelessWidget {
lastItem: index == _kChildCount - 1, lastItem: index == _kChildCount - 1,
color: colorItems[index], color: colorItems[index],
colorName: colorNameItems[index], colorName: colorNameItems[index],
randomSeed: randomSeed,
); );
}, },
childCount: _kChildCount, childCount: _kChildCount,
...@@ -178,12 +186,19 @@ class CupertinoDemoTab1 extends StatelessWidget { ...@@ -178,12 +186,19 @@ class CupertinoDemoTab1 extends StatelessWidget {
} }
class Tab1RowItem 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 int index;
final bool lastItem; final bool lastItem;
final Color color; final Color color;
final String colorName; final String colorName;
final int randomSeed;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -196,6 +211,7 @@ class Tab1RowItem extends StatelessWidget { ...@@ -196,6 +211,7 @@ class Tab1RowItem extends StatelessWidget {
color: color, color: color,
colorName: colorName, colorName: colorName,
index: index, index: index,
randomSeed: randomSeed,
), ),
)); ));
}, },
...@@ -274,11 +290,12 @@ class Tab1RowItem extends StatelessWidget { ...@@ -274,11 +290,12 @@ class Tab1RowItem extends StatelessWidget {
} }
class Tab1ItemPage extends StatefulWidget { 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 Color color;
final String colorName; final String colorName;
final int index; final int index;
final int randomSeed;
@override @override
State<StatefulWidget> createState() => Tab1ItemPageState(); State<StatefulWidget> createState() => Tab1ItemPageState();
...@@ -289,7 +306,7 @@ class Tab1ItemPageState extends State<Tab1ItemPage> { ...@@ -289,7 +306,7 @@ class Tab1ItemPageState extends State<Tab1ItemPage> {
void initState() { void initState() {
super.initState(); super.initState();
relatedColors = List<Color>.generate(10, (int index) { relatedColors = List<Color>.generate(10, (int index) {
final math.Random random = math.Random(); final math.Random random = math.Random(widget.randomSeed);
return Color.fromARGB( return Color.fromARGB(
255, 255,
(widget.color.red + random.nextInt(100) - 50).clamp(0, 255) as int, (widget.color.red + random.nextInt(100) - 50).clamp(0, 255) as int,
......
...@@ -40,17 +40,15 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> { ...@@ -40,17 +40,15 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> {
keyboardType: TextInputType.multiline, keyboardType: TextInputType.multiline,
prefix: const Padding(padding: EdgeInsets.symmetric(horizontal: 4.0)), prefix: const Padding(padding: EdgeInsets.symmetric(horizontal: 4.0)),
suffix: Padding( suffix: Padding(
padding: const EdgeInsets.symmetric(horizontal: 4.0), padding: const EdgeInsets.symmetric(horizontal: 2.0),
child: CupertinoButton( child: CupertinoButton(
color: CupertinoColors.activeGreen,
minSize: 0.0, minSize: 0.0,
child: const Icon( child: const Icon(
CupertinoIcons.up_arrow, CupertinoIcons.arrow_up_circle_fill,
size: 21.0, size: 28.0,
color: CupertinoColors.white, color: CupertinoColors.activeGreen,
), ),
padding: const EdgeInsets.all(2.0), padding: const EdgeInsets.only(bottom: 4),
borderRadius: BorderRadius.circular(15.0),
onPressed: ()=> setState(()=> _chatTextController.clear()), onPressed: ()=> setState(()=> _chatTextController.clear()),
), ),
), ),
...@@ -63,7 +61,7 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> { ...@@ -63,7 +61,7 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> {
Widget _buildNameField() { Widget _buildNameField() {
return const CupertinoTextField( return const CupertinoTextField(
prefix: Icon( prefix: Icon(
CupertinoIcons.person_solid, CupertinoIcons.person_fill,
color: CupertinoColors.lightBackgroundGray, color: CupertinoColors.lightBackgroundGray,
size: 28.0, size: 28.0,
), ),
...@@ -81,9 +79,9 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> { ...@@ -81,9 +79,9 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> {
Widget _buildEmailField() { Widget _buildEmailField() {
return const CupertinoTextField( return const CupertinoTextField(
prefix: Icon( prefix: Icon(
CupertinoIcons.mail_solid, CupertinoIcons.envelope_fill,
color: CupertinoColors.lightBackgroundGray, color: CupertinoColors.lightBackgroundGray,
size: 28.0, size: 26,
), ),
padding: EdgeInsets.symmetric(horizontal: 6.0, vertical: 12.0), padding: EdgeInsets.symmetric(horizontal: 6.0, vertical: 12.0),
clearButtonMode: OverlayVisibilityMode.editing, clearButtonMode: OverlayVisibilityMode.editing,
...@@ -100,9 +98,9 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> { ...@@ -100,9 +98,9 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> {
return CupertinoTextField( return CupertinoTextField(
controller: _locationTextController, controller: _locationTextController,
prefix: const Icon( prefix: const Icon(
CupertinoIcons.location_solid, CupertinoIcons.location_fill,
color: CupertinoColors.lightBackgroundGray, color: CupertinoColors.lightBackgroundGray,
size: 28.0, size: 26,
), ),
padding: const EdgeInsets.symmetric(horizontal: 6.0, vertical: 12.0), padding: const EdgeInsets.symmetric(horizontal: 6.0, vertical: 12.0),
clearButtonMode: OverlayVisibilityMode.editing, clearButtonMode: OverlayVisibilityMode.editing,
...@@ -117,9 +115,9 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> { ...@@ -117,9 +115,9 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> {
Widget _buildPinField() { Widget _buildPinField() {
return const CupertinoTextField( return const CupertinoTextField(
prefix: Icon( prefix: Icon(
CupertinoIcons.padlock_solid, CupertinoIcons.lock_open_fill,
color: CupertinoColors.lightBackgroundGray, color: CupertinoColors.lightBackgroundGray,
size: 28.0, size: 26,
), ),
padding: EdgeInsets.symmetric(horizontal: 6.0, vertical: 12.0), padding: EdgeInsets.symmetric(horizontal: 6.0, vertical: 12.0),
clearButtonMode: OverlayVisibilityMode.editing, clearButtonMode: OverlayVisibilityMode.editing,
...@@ -137,9 +135,9 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> { ...@@ -137,9 +135,9 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> {
return CupertinoTextField( return CupertinoTextField(
controller: TextEditingController(text: 'colleague, reading club'), controller: TextEditingController(text: 'colleague, reading club'),
prefix: const Icon( prefix: const Icon(
CupertinoIcons.tags_solid, CupertinoIcons.tag_fill,
color: CupertinoColors.lightBackgroundGray, color: CupertinoColors.lightBackgroundGray,
size: 28.0, size: 26,
), ),
enabled: false, enabled: false,
padding: const EdgeInsets.symmetric(horizontal: 6.0, vertical: 12.0), padding: const EdgeInsets.symmetric(horizontal: 6.0, vertical: 12.0),
......
...@@ -8,12 +8,12 @@ dependencies: ...@@ -8,12 +8,12 @@ dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
collection: 1.15.0-nullsafety.3 collection: 1.15.0-nullsafety.3
device_info: 0.4.2+8 device_info: 0.4.2+9
intl: 0.16.1 intl: 0.16.1
connectivity: 0.4.9+3 connectivity: 0.4.9+5
string_scanner: 1.1.0-nullsafety.1 string_scanner: 1.1.0-nullsafety.1
url_launcher: 5.7.2 url_launcher: 5.7.5
cupertino_icons: 0.1.3 cupertino_icons: 1.0.0
video_player: 0.10.6 video_player: 0.10.6
scoped_model: 1.0.1 scoped_model: 1.0.1
shrine_images: 1.1.2 shrine_images: 1.1.2
...@@ -277,4 +277,4 @@ flutter: ...@@ -277,4 +277,4 @@ flutter:
- asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Regular.ttf - asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Regular.ttf
- asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Light.ttf - asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Light.ttf
# PUBSPEC CHECKSUM: 023a # PUBSPEC CHECKSUM: 1f3d
// 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<ByteData> 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'),
);
});
}
...@@ -8,7 +8,7 @@ environment: ...@@ -8,7 +8,7 @@ environment:
dependencies: dependencies:
flutter: flutter:
sdk: 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" 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" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...@@ -19,4 +19,4 @@ dependencies: ...@@ -19,4 +19,4 @@ dependencies:
flutter: flutter:
uses-material-design: true uses-material-design: true
# PUBSPEC CHECKSUM: 8dce # PUBSPEC CHECKSUM: b3cf
.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
...@@ -22,7 +22,7 @@ dependencies: ...@@ -22,7 +22,7 @@ dependencies:
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # 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" 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" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...@@ -99,4 +99,4 @@ flutter: ...@@ -99,4 +99,4 @@ flutter:
androidPackage: com.example.iosadd2appflutter androidPackage: com.example.iosadd2appflutter
iosBundleIdentifier: com.example.iosAdd2appFlutter iosBundleIdentifier: com.example.iosAdd2appFlutter
# PUBSPEC CHECKSUM: 9423 # PUBSPEC CHECKSUM: 2920
...@@ -22,7 +22,7 @@ dependencies: ...@@ -22,7 +22,7 @@ dependencies:
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # 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" 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" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...@@ -99,4 +99,4 @@ flutter: ...@@ -99,4 +99,4 @@ flutter:
androidPackage: com.example.iosadd2appflutter androidPackage: com.example.iosadd2appflutter
iosBundleIdentifier: com.example.iosAdd2appFlutter iosBundleIdentifier: com.example.iosAdd2appFlutter
# PUBSPEC CHECKSUM: 9423 # PUBSPEC CHECKSUM: 2920
...@@ -20,7 +20,7 @@ dependencies: ...@@ -20,7 +20,7 @@ dependencies:
sdk: flutter sdk: flutter
# This integration test includes a watchOS pod. Add a Flutter plugin # This integration test includes a watchOS pod. Add a Flutter plugin
# to prompt the tool to run pod install. # 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" 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" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...@@ -91,4 +91,4 @@ flutter: ...@@ -91,4 +91,4 @@ flutter:
# For details regarding fonts from package dependencies, # For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages # see https://flutter.dev/custom-fonts/#from-packages
# PUBSPEC CHECKSUM: c70b # PUBSPEC CHECKSUM: 220c
...@@ -10,7 +10,7 @@ environment: ...@@ -10,7 +10,7 @@ environment:
dependencies: dependencies:
flutter: flutter:
sdk: 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" 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" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...@@ -39,4 +39,4 @@ dev_dependencies: ...@@ -39,4 +39,4 @@ dev_dependencies:
flutter: flutter:
uses-material-design: true uses-material-design: true
# PUBSPEC CHECKSUM: 9423 # PUBSPEC CHECKSUM: 2920
...@@ -19,7 +19,7 @@ dev_dependencies: ...@@ -19,7 +19,7 @@ dev_dependencies:
sdk: flutter sdk: flutter
flutter_test: flutter_test:
sdk: flutter sdk: flutter
integration_test: 0.9.2 integration_test: 0.9.2+1
http: 0.12.2 http: 0.12.2
test: 1.16.0-nullsafety.5 test: 1.16.0-nullsafety.5
...@@ -78,4 +78,4 @@ dev_dependencies: ...@@ -78,4 +78,4 @@ dev_dependencies:
webkit_inspection_protocol: 0.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" 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" yaml: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: eb1f # PUBSPEC CHECKSUM: f37b
...@@ -12,7 +12,7 @@ dependencies: ...@@ -12,7 +12,7 @@ dependencies:
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # 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" 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" collection: 1.15.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...@@ -54,4 +54,4 @@ flutter: ...@@ -54,4 +54,4 @@ flutter:
assets: assets:
- images/coast.jpg - images/coast.jpg
# PUBSPEC CHECKSUM: 9423 # PUBSPEC CHECKSUM: 2920
...@@ -21,7 +21,7 @@ import 'package:flutter/widgets.dart'; ...@@ -21,7 +21,7 @@ import 'package:flutter/widgets.dart';
/// cupertino_icons: ^1.0.0 /// cupertino_icons: ^1.0.0
/// ``` /// ```
/// ///
/// For a map of available icons for use, see <http://flutter.github.io/cupertino_icons> /// For a map of available icons for use, see <https://flutter.github.io/cupertino_icons>
/// for cupertino_icons version >1.0.0. /// for cupertino_icons version >1.0.0.
/// ///
/// See <https://github.com/flutter/cupertino_icons/blob/master/map.png> for /// See <https://github.com/flutter/cupertino_icons/blob/master/map.png> for
......
...@@ -1379,15 +1379,18 @@ class _BackChevron extends StatelessWidget { ...@@ -1379,15 +1379,18 @@ class _BackChevron extends StatelessWidget {
// Replicate the Icon logic here to get a tightly sized icon and add // Replicate the Icon logic here to get a tightly sized icon and add
// custom non-square padding. // custom non-square padding.
Widget iconWidget = Text.rich( Widget iconWidget = Padding(
TextSpan( padding: const EdgeInsetsDirectional.only(start: 6, end: 2),
text: String.fromCharCode(CupertinoIcons.back.codePoint), child: Text.rich(
style: TextStyle( TextSpan(
inherit: false, text: String.fromCharCode(CupertinoIcons.back.codePoint),
color: textStyle.color, style: TextStyle(
fontSize: 34.0, inherit: false,
fontFamily: CupertinoIcons.back.fontFamily, color: textStyle.color,
package: CupertinoIcons.back.fontPackage, fontSize: 30.0,
fontFamily: CupertinoIcons.back.fontFamily,
package: CupertinoIcons.back.fontPackage,
),
), ),
), ),
); );
......
...@@ -46,11 +46,11 @@ const Color _kDisabledBackground = CupertinoDynamicColor.withBrightness( ...@@ -46,11 +46,11 @@ const Color _kDisabledBackground = CupertinoDynamicColor.withBrightness(
darkColor: Color(0xFF050505), 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/. // Note it may not be consistent with https://developer.apple.com/design/resources/.
const CupertinoDynamicColor _kClearButtonColor = CupertinoDynamicColor.withBrightness( const CupertinoDynamicColor _kClearButtonColor = CupertinoDynamicColor.withBrightness(
color: Color(0xFF636366), color: Color(0x33000000),
darkColor: Color(0xFFAEAEB2), darkColor: Color(0x33FFFFFF),
); );
// An eyeballed value that moves the cursor slightly left of where it is // An eyeballed value that moves the cursor slightly left of where it is
......
...@@ -135,11 +135,11 @@ void main() { ...@@ -135,11 +135,11 @@ void main() {
// place. // place.
expect( expect(
tester.getTopLeft(flying(tester, find.text('Page 1')).first), tester.getTopLeft(flying(tester, find.text('Page 1')).first),
const Offset(337.0234375, 13.5), const Offset(337.1953125, 13.5),
); );
expect( expect(
tester.getTopLeft(flying(tester, find.text('Page 1')).last), 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() { ...@@ -156,11 +156,11 @@ void main() {
// Same as LTR but more to the right now. // Same as LTR but more to the right now.
expect( expect(
tester.getTopLeft(flying(tester, find.text('Page 1')).first), tester.getTopLeft(flying(tester, find.text('Page 1')).first),
const Offset(362.9765625, 13.5), const Offset(362.8046875, 13.5),
); );
expect( expect(
tester.getTopLeft(flying(tester, find.text('Page 1')).last), 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() { ...@@ -329,7 +329,7 @@ void main() {
expect(bottomMiddle.text.style!.color, const Color(0xff00050a)); expect(bottomMiddle.text.style!.color, const Color(0xff00050a));
expect( expect(
tester.getTopLeft(flying(tester, find.text('Page 1')).first), 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 // The top back label is styled exactly the same way. But the opacity tweens
...@@ -339,7 +339,7 @@ void main() { ...@@ -339,7 +339,7 @@ void main() {
expect(topBackLabel.text.style!.color, const Color(0xff00050a)); expect(topBackLabel.text.style!.color, const Color(0xff00050a));
expect( expect(
tester.getTopLeft(flying(tester, find.text('Page 1')).last), 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() { ...@@ -374,7 +374,7 @@ void main() {
expect(bottomMiddle.text.style!.color, const Color(0xff00050a)); expect(bottomMiddle.text.style!.color, const Color(0xff00050a));
expect( expect(
tester.getTopLeft(flying(tester, find.text('Page 1')).first), 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 // The top back label is styled exactly the same way. But the opacity tweens
...@@ -384,7 +384,7 @@ void main() { ...@@ -384,7 +384,7 @@ void main() {
expect(topBackLabel.text.style!.color, const Color(0xff00050a)); expect(topBackLabel.text.style!.color, const Color(0xff00050a));
expect( expect(
tester.getTopLeft(flying(tester, find.text('Page 1')).last), 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() { ...@@ -599,12 +599,12 @@ void main() {
// Come in from the right and fade in. // Come in from the right and fade in.
checkOpacity(tester, backChevron, 0.0); checkOpacity(tester, backChevron, 0.0);
expect( 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)); await tester.pump(const Duration(milliseconds: 150));
checkOpacity(tester, backChevron, 0.09497911669313908); checkOpacity(tester, backChevron, 0.09497911669313908);
expect( 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 { testWidgets('First appearance of back chevron fades in from the left in RTL', (WidgetTester tester) async {
...@@ -643,14 +643,14 @@ void main() { ...@@ -643,14 +643,14 @@ void main() {
checkOpacity(tester, backChevron, 0.0); checkOpacity(tester, backChevron, 0.0);
expect( expect(
tester.getTopRight(backChevron), tester.getTopRight(backChevron),
const Offset(692.921875, 5.0), const Offset(687.265625, 7.0),
); );
await tester.pump(const Duration(milliseconds: 150)); await tester.pump(const Duration(milliseconds: 150));
checkOpacity(tester, backChevron, 0.09497911669313908); checkOpacity(tester, backChevron, 0.09497911669313908);
expect( expect(
tester.getTopRight(backChevron), tester.getTopRight(backChevron),
const Offset(742.7394726872444, 5.0), const Offset(742.9441165328026, 7.0),
); );
}); });
...@@ -670,15 +670,15 @@ void main() { ...@@ -670,15 +670,15 @@ void main() {
checkOpacity(tester, backChevrons.first, 0.8833301812410355); checkOpacity(tester, backChevrons.first, 0.8833301812410355);
checkOpacity(tester, backChevrons.last, 0.0); checkOpacity(tester, backChevrons.last, 0.0);
// Both overlap at the same place. // Both overlap at the same place.
expect(tester.getTopLeft(backChevrons.first), const Offset(8.0, 5.0)); expect(tester.getTopLeft(backChevrons.first), const Offset(14.0, 7.0));
expect(tester.getTopLeft(backChevrons.last), const Offset(8.0, 5.0)); expect(tester.getTopLeft(backChevrons.last), const Offset(14.0, 7.0));
await tester.pump(const Duration(milliseconds: 150)); await tester.pump(const Duration(milliseconds: 150));
checkOpacity(tester, backChevrons.first, 0.0); checkOpacity(tester, backChevrons.first, 0.0);
checkOpacity(tester, backChevrons.last, 0.4604858811944723); checkOpacity(tester, backChevrons.last, 0.4604858811944723);
// Still in the same place. // Still in the same place.
expect(tester.getTopLeft(backChevrons.first), const Offset(8.0, 5.0)); expect(tester.getTopLeft(backChevrons.first), const Offset(14.0, 7.0));
expect(tester.getTopLeft(backChevrons.last), const Offset(8.0, 5.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 { testWidgets('Bottom middle just fades if top page has a custom leading', (WidgetTester tester) async {
...@@ -789,14 +789,14 @@ void main() { ...@@ -789,14 +789,14 @@ void main() {
checkOpacity(tester, flying(tester, find.text('Page 1')), 0.6697911769151688); checkOpacity(tester, flying(tester, find.text('Page 1')), 0.6697911769151688);
expect( expect(
tester.getTopLeft(flying(tester, find.text('Page 1'))), 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)); await tester.pump(const Duration(milliseconds: 150));
checkOpacity(tester, flying(tester, find.text('Page 1')), 0.0); checkOpacity(tester, flying(tester, find.text('Page 1')), 0.0);
expect( expect(
tester.getTopLeft(flying(tester, find.text('Page 1'))), 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() { ...@@ -826,7 +826,7 @@ void main() {
checkOpacity(tester, flying(tester, find.text('Page 1')), 0.6697911769151688); checkOpacity(tester, flying(tester, find.text('Page 1')), 0.6697911769151688);
expect( expect(
tester.getTopRight(flying(tester, find.text('Page 1'))), 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)); await tester.pump(const Duration(milliseconds: 150));
...@@ -834,7 +834,7 @@ void main() { ...@@ -834,7 +834,7 @@ void main() {
expect( expect(
tester.getTopRight(flying(tester, find.text('Page 1'))), tester.getTopRight(flying(tester, find.text('Page 1'))),
// >1000. It's now off the screen. // >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() { ...@@ -856,11 +856,11 @@ void main() {
checkOpacity(tester, flying(tester, find.text('Page 1')).last, 0.0); checkOpacity(tester, flying(tester, find.text('Page 1')).last, 0.0);
expect( expect(
tester.getTopLeft(flying(tester, find.text('Page 1')).first), tester.getTopLeft(flying(tester, find.text('Page 1')).first),
const Offset(17.375, 52.39453125), const Offset(17.546875, 52.39453125),
); );
expect( expect(
tester.getTopLeft(flying(tester, find.text('Page 1')).last), 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)); await tester.pump(const Duration(milliseconds: 150));
...@@ -868,11 +868,11 @@ void main() { ...@@ -868,11 +868,11 @@ void main() {
checkOpacity(tester, flying(tester, find.text('Page 1')).last, 0.4604858811944723); checkOpacity(tester, flying(tester, find.text('Page 1')).last, 0.4604858811944723);
expect( expect(
tester.getTopLeft(flying(tester, find.text('Page 1')).first), tester.getTopLeft(flying(tester, find.text('Page 1')).first),
const Offset(40.818575382232666, 22.49655644595623), const Offset(43.92089730501175, 22.49655644595623),
); );
expect( expect(
tester.getTopLeft(flying(tester, find.text('Page 1')).last), 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() { ...@@ -896,11 +896,11 @@ void main() {
checkOpacity(tester, flying(tester, find.text('Back')), 0.0); checkOpacity(tester, flying(tester, find.text('Back')), 0.0);
expect( expect(
tester.getTopLeft(flying(tester, find.text('A title too long to fit'))), 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( expect(
tester.getTopLeft(flying(tester, find.text('Back'))), 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)); await tester.pump(const Duration(milliseconds: 150));
...@@ -908,11 +908,11 @@ void main() { ...@@ -908,11 +908,11 @@ void main() {
checkOpacity(tester, flying(tester, find.text('Back')), 0.4604858811944723); checkOpacity(tester, flying(tester, find.text('Back')), 0.4604858811944723);
expect( expect(
tester.getTopLeft(flying(tester, find.text('A title too long to fit'))), 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( expect(
tester.getTopLeft(flying(tester, find.text('Back'))), tester.getTopLeft(flying(tester, find.text('Back'))),
const Offset(40.818575382232666, 22.49655644595623), const Offset(43.92089730501175, 22.49655644595623),
); );
}); });
......
...@@ -154,8 +154,8 @@ void main() { ...@@ -154,8 +154,8 @@ void main() {
// Also shows the previous page's title next to the back button. // Also shows the previous page's title next to the back button.
expect(find.widgetWithText(CupertinoButton, 'An iPod'), findsOneWidget); expect(find.widgetWithText(CupertinoButton, 'An iPod'), findsOneWidget);
// 2 paddings + 1 ahem character at font size 34.0. // 3 paddings + 1 ahem character at font size 34.0.
expect(tester.getTopLeft(find.text('An iPod')).dx, 8.0 + 34.0 + 6.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 { testWidgets('Previous title is correct on first transition frame', (WidgetTester tester) async {
...@@ -261,7 +261,7 @@ void main() { ...@@ -261,7 +261,7 @@ void main() {
// from An iPod to Back (since An Internet communicator is too long to // from An iPod to Back (since An Internet communicator is too long to
// fit in the back button). // fit in the back button).
expect(find.widgetWithText(CupertinoButton, 'Back'), findsOneWidget); 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 { testWidgets('Back swipe dismiss interrupted by route push', (WidgetTester tester) async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment