Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
3302a12b
Unverified
Commit
3302a12b
authored
Oct 17, 2020
by
xster
Committed by
GitHub
Oct 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let Flutter SDK use cupertino_icons 1.0.0 (#65087)
parent
d2d07219
Changes
25
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
207 additions
and
264 deletions
+207
-264
gallery_recorder.dart
...macrobenchmarks/lib/src/web/gallery/gallery_recorder.dart
+0
-48
web_benchmarks.dart
dev/benchmarks/macrobenchmarks/lib/web_benchmarks.dart
+0
-26
pubspec.yaml
dev/benchmarks/macrobenchmarks/pubspec.yaml
+6
-89
pubspec.yaml
...ration_tests/android_embedding_v2_smoke_test/pubspec.yaml
+3
-3
pubspec.yaml
...id_splash_screens/splash_screen_kitchen_sink/pubspec.yaml
+2
-2
pubspec.yaml
...oid_splash_screens/splash_screen_load_rotate/pubspec.yaml
+2
-2
pubspec.yaml
...id_splash_screens/splash_screen_trans_rotate/pubspec.yaml
+2
-2
pubspec.yaml
...gration_tests/flutter_driver_screenshot_test/pubspec.yaml
+3
-3
cupertino_navigation_demo.dart
...gallery/lib/demo/cupertino/cupertino_navigation_demo.dart
+27
-10
cupertino_text_field_demo.dart
...gallery/lib/demo/cupertino/cupertino_text_field_demo.dart
+14
-16
pubspec.yaml
dev/integration_tests/flutter_gallery/pubspec.yaml
+5
-5
cupertino_navigation_demo_test.dart
...y/test/demo/cupertino/cupertino_navigation_demo_test.dart
+41
-0
pubspec.yaml
...integration_tests/gradle_deprecated_settings/pubspec.yaml
+2
-2
.gitignore
dev/integration_tests/ios_add2app/flutterapp/.gitignore
+41
-0
pubspec.yaml
dev/integration_tests/ios_add2app/flutterapp/pubspec.yaml
+2
-2
pubspec.yaml
...tion_tests/ios_add2app_life_cycle/flutterapp/pubspec.yaml
+2
-2
pubspec.yaml
dev/integration_tests/ios_app_with_extensions/pubspec.yaml
+2
-2
pubspec.yaml
dev/integration_tests/non_nullable/pubspec.yaml
+2
-2
pubspec.yaml
dev/integration_tests/web_e2e_tests/pubspec.yaml
+2
-2
pubspec.yaml
examples/image_list/pubspec.yaml
+2
-2
icons.dart
packages/flutter/lib/src/cupertino/icons.dart
+1
-1
nav_bar.dart
packages/flutter/lib/src/cupertino/nav_bar.dart
+12
-9
text_field.dart
packages/flutter/lib/src/cupertino/text_field.dart
+3
-3
nav_bar_transition_test.dart
packages/flutter/test/cupertino/nav_bar_transition_test.dart
+28
-28
route_test.dart
packages/flutter/test/cupertino/route_test.dart
+3
-3
No files found.
dev/benchmarks/macrobenchmarks/lib/src/web/gallery/gallery_recorder.dart
deleted
100644 → 0
View file @
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
();
}
}
dev/benchmarks/macrobenchmarks/lib/web_benchmarks.dart
View file @
3302a12b
...
...
@@ -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<String, RecorderFactory> benchmarks = <String, RecorderFactory>{
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
,
),
},
};
...
...
dev/benchmarks/macrobenchmarks/pubspec.yaml
View file @
3302a12b
This diff is collapsed.
Click to expand it.
dev/integration_tests/android_embedding_v2_smoke_test/pubspec.yaml
View file @
3302a12b
...
...
@@ -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
dev/integration_tests/android_splash_screens/splash_screen_kitchen_sink/pubspec.yaml
View file @
3302a12b
...
...
@@ -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
dev/integration_tests/android_splash_screens/splash_screen_load_rotate/pubspec.yaml
View file @
3302a12b
...
...
@@ -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
dev/integration_tests/android_splash_screens/splash_screen_trans_rotate/pubspec.yaml
View file @
3302a12b
...
...
@@ -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
dev/integration_tests/flutter_driver_screenshot_test/pubspec.yaml
View file @
3302a12b
...
...
@@ -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
dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart
View file @
3302a12b
...
...
@@ -32,18 +32,19 @@ const List<String> coolColorNames = <String>[
const
int
_kChildCount
=
50
;
class
CupertinoNavigationDemo
extends
StatelessWidget
{
CupertinoNavigationDemo
()
CupertinoNavigationDemo
(
{
this
.
randomSeed
}
)
:
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
)
{
return
coolColorNames
[
math
.
Random
().
nextInt
(
coolColorNames
.
length
)];
return
coolColorNames
[
math
.
Random
(
randomSeed
).
nextInt
(
coolColorNames
.
length
)];
});
static
const
String
routeName
=
'/cupertino/navigation'
;
final
List
<
Color
>
colorItems
;
final
List
<
String
>
colorNameItems
;
final
int
randomSeed
;
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -56,15 +57,15 @@ class CupertinoNavigationDemo extends StatelessWidget {
tabBar:
CupertinoTabBar
(
items:
const
<
BottomNavigationBarItem
>[
BottomNavigationBarItem
(
icon:
Icon
(
CupertinoIcons
.
ho
me
),
icon:
Icon
(
CupertinoIcons
.
ho
use
,
size:
27
),
label:
'Home'
,
),
BottomNavigationBarItem
(
icon:
Icon
(
CupertinoIcons
.
c
onversation_bubble
),
icon:
Icon
(
CupertinoIcons
.
c
hat_bubble
,
size:
27
),
label:
'Support'
,
),
BottomNavigationBarItem
(
icon:
Icon
(
CupertinoIcons
.
p
rofile_circled
),
icon:
Icon
(
CupertinoIcons
.
p
erson_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
<
Color
>
colorItems
;
final
List
<
String
>
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
<
StatefulWidget
>
createState
()
=>
Tab1ItemPageState
();
...
...
@@ -289,7 +306,7 @@ class Tab1ItemPageState extends State<Tab1ItemPage> {
void
initState
()
{
super
.
initState
();
relatedColors
=
List
<
Color
>.
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
,
...
...
dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_text_field_demo.dart
View file @
3302a12b
...
...
@@ -40,17 +40,15 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> {
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:
2
1
.0
,
color:
CupertinoColors
.
white
,
CupertinoIcons
.
arrow_up_circle_fill
,
size:
2
8
.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<CupertinoTextFieldDemo> {
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<CupertinoTextFieldDemo> {
Widget
_buildEmailField
()
{
return
const
CupertinoTextField
(
prefix:
Icon
(
CupertinoIcons
.
mail_solid
,
CupertinoIcons
.
envelope_fill
,
color:
CupertinoColors
.
lightBackgroundGray
,
size:
2
8.0
,
size:
2
6
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
6.0
,
vertical:
12.0
),
clearButtonMode:
OverlayVisibilityMode
.
editing
,
...
...
@@ -100,9 +98,9 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> {
return
CupertinoTextField
(
controller:
_locationTextController
,
prefix:
const
Icon
(
CupertinoIcons
.
location_
solid
,
CupertinoIcons
.
location_
fill
,
color:
CupertinoColors
.
lightBackgroundGray
,
size:
2
8.0
,
size:
2
6
,
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
6.0
,
vertical:
12.0
),
clearButtonMode:
OverlayVisibilityMode
.
editing
,
...
...
@@ -117,9 +115,9 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> {
Widget
_buildPinField
()
{
return
const
CupertinoTextField
(
prefix:
Icon
(
CupertinoIcons
.
padlock_solid
,
CupertinoIcons
.
lock_open_fill
,
color:
CupertinoColors
.
lightBackgroundGray
,
size:
2
8.0
,
size:
2
6
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
6.0
,
vertical:
12.0
),
clearButtonMode:
OverlayVisibilityMode
.
editing
,
...
...
@@ -137,9 +135,9 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> {
return
CupertinoTextField
(
controller:
TextEditingController
(
text:
'colleague, reading club'
),
prefix:
const
Icon
(
CupertinoIcons
.
tag
s_solid
,
CupertinoIcons
.
tag
_fill
,
color:
CupertinoColors
.
lightBackgroundGray
,
size:
2
8.0
,
size:
2
6
,
),
enabled:
false
,
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
6.0
,
vertical:
12.0
),
...
...
dev/integration_tests/flutter_gallery/pubspec.yaml
View file @
3302a12b
...
...
@@ -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
dev/integration_tests/flutter_gallery/test/demo/cupertino/cupertino_navigation_demo_test.dart
0 → 100644
View file @
3302a12b
// 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'
),
);
});
}
dev/integration_tests/gradle_deprecated_settings/pubspec.yaml
View file @
3302a12b
...
...
@@ -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
dev/integration_tests/ios_add2app/flutterapp/.gitignore
0 → 100644
View file @
3302a12b
.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
dev/integration_tests/ios_add2app/flutterapp/pubspec.yaml
View file @
3302a12b
...
...
@@ -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
dev/integration_tests/ios_add2app_life_cycle/flutterapp/pubspec.yaml
View file @
3302a12b
...
...
@@ -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
dev/integration_tests/ios_app_with_extensions/pubspec.yaml
View file @
3302a12b
...
...
@@ -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
dev/integration_tests/non_nullable/pubspec.yaml
View file @
3302a12b
...
...
@@ -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
dev/integration_tests/web_e2e_tests/pubspec.yaml
View file @
3302a12b
...
...
@@ -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
examples/image_list/pubspec.yaml
View file @
3302a12b
...
...
@@ -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
packages/flutter/lib/src/cupertino/icons.dart
View file @
3302a12b
...
...
@@ -21,7 +21,7 @@ import 'package:flutter/widgets.dart';
/// 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 <http
s
://flutter.github.io/cupertino_icons>
/// for cupertino_icons version >1.0.0.
///
/// See <https://github.com/flutter/cupertino_icons/blob/master/map.png> for
...
...
packages/flutter/lib/src/cupertino/nav_bar.dart
View file @
3302a12b
...
...
@@ -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
,
),
),
),
);
...
...
packages/flutter/lib/src/cupertino/text_field.dart
View file @
3302a12b
...
...
@@ -46,11 +46,11 @@ const Color _kDisabledBackground = CupertinoDynamicColor.withBrightness(
darkColor:
Color
(
0xFF050505
),
);
// Value inspected from Xcode 1
1 & iOS 13
.0 Simulator.
// Value inspected from Xcode 1
2 & iOS 14
.0 Simulator.
// Note it may not be consistent with https://developer.apple.com/design/resources/.
const
CupertinoDynamicColor
_kClearButtonColor
=
CupertinoDynamicColor
.
withBrightness
(
color:
Color
(
0x
FF636366
),
darkColor:
Color
(
0x
FFAEAEB2
),
color:
Color
(
0x
33000000
),
darkColor:
Color
(
0x
33FFFFFF
),
);
// An eyeballed value that moves the cursor slightly left of where it is
...
...
packages/flutter/test/cupertino/nav_bar_transition_test.dart
View file @
3302a12b
...
...
@@ -135,11 +135,11 @@ void main() {
// place.
expect
(
tester
.
getTopLeft
(
flying
(
tester
,
find
.
text
(
'Page 1'
)).
first
),
const
Offset
(
337.
023437
5
,
13.5
),
const
Offset
(
337.
195312
5
,
13.5
),
);
expect
(
tester
.
getTopLeft
(
flying
(
tester
,
find
.
text
(
'Page 1'
)).
last
),
const
Offset
(
337.
023437
5
,
13.5
),
const
Offset
(
337.
195312
5
,
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.
976562
5
,
13.5
),
const
Offset
(
362.
804687
5
,
13.5
),
);
expect
(
tester
.
getTopLeft
(
flying
(
tester
,
find
.
text
(
'Page 1'
)).
last
),
const
Offset
(
362.
976562
5
,
13.5
),
const
Offset
(
362.
804687
5
,
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.
023437
5
,
13.5
),
const
Offset
(
337.
195312
5
,
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.
023437
5
,
13.5
),
const
Offset
(
337.
195312
5
,
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.
976562
5
,
13.5
),
const
Offset
(
362.
804687
5
,
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.
976562
5
,
13.5
),
const
Offset
(
362.
804687
5
,
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
(
6
92.921875
,
5
.0
),
const
Offset
(
6
87.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
(
3
0
.8125
,
13.5
),
const
Offset
(
3
4
.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
(-
2
62
.2321922779083
,
13.5
),
const
Offset
(-
2
58
.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
(
76
9
.1875
,
13.5
),
const
Offset
(
76
5
.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
(
10
62
.2321922779083
,
13.5
),
const
Offset
(
10
58
.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.
3
75
,
52.39453125
),
const
Offset
(
17.
5468
75
,
52.39453125
),
);
expect
(
tester
.
getTopLeft
(
flying
(
tester
,
find
.
text
(
'Page 1'
)).
last
),
const
Offset
(
17.
3
75
,
52.39453125
),
const
Offset
(
17.
5468
75
,
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
(
4
0.818575382232666
,
22.49655644595623
),
const
Offset
(
4
3.92089730501175
,
22.49655644595623
),
);
expect
(
tester
.
getTopLeft
(
flying
(
tester
,
find
.
text
(
'Page 1'
)).
last
),
const
Offset
(
4
0.818575382232666
,
22.49655644595623
),
const
Offset
(
4
3.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.
3
75
,
52.39453125
),
const
Offset
(
17.
5468
75
,
52.39453125
),
);
expect
(
tester
.
getTopLeft
(
flying
(
tester
,
find
.
text
(
'Back'
))),
const
Offset
(
17.
3
75
,
52.39453125
),
const
Offset
(
17.
5468
75
,
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
(
4
0.818575382232666
,
22.49655644595623
),
const
Offset
(
4
3.92089730501175
,
22.49655644595623
),
);
expect
(
tester
.
getTopLeft
(
flying
(
tester
,
find
.
text
(
'Back'
))),
const
Offset
(
4
0.818575382232666
,
22.49655644595623
),
const
Offset
(
4
3.92089730501175
,
22.49655644595623
),
);
});
...
...
packages/flutter/test/cupertino/route_test.dart
View file @
3302a12b
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment