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
bd1921ec
Unverified
Commit
bd1921ec
authored
Feb 16, 2018
by
Alexandre Ardhuin
Committed by
GitHub
Feb 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unnecessary parenthesis (#14533)
parent
a37a8424
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
38 additions
and
38 deletions
+38
-38
main.dart
dev/integration_tests/external_ui/lib/main.dart
+2
-2
video_demo.dart
examples/flutter_gallery/lib/demo/video_demo.dart
+1
-1
gestures.dart
examples/layers/widgets/gestures.dart
+1
-1
flexible_space_bar.dart
packages/flutter/lib/src/material/flexible_space_bar.dart
+1
-1
colors.dart
packages/flutter/lib/src/painting/colors.dart
+1
-1
list_tile_test.dart
packages/flutter/test/material/list_tile_test.dart
+10
-10
tabs_test.dart
packages/flutter/test/material/tabs_test.dart
+10
-10
heroes_test.dart
packages/flutter/test/widgets/heroes_test.dart
+2
-2
nested_scroll_view_test.dart
packages/flutter/test/widgets/nested_scroll_view_test.dart
+5
-5
tracking_scroll_controller_test.dart
...flutter/test/widgets/tracking_scroll_controller_test.dart
+3
-3
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+2
-2
No files found.
dev/integration_tests/external_ui/lib/main.dart
View file @
bd1921ec
...
...
@@ -153,11 +153,11 @@ Press play to produce texture frames.''';
],
),
),
floatingActionButton:
(
_icon
==
null
?
null
:
new
FloatingActionButton
(
floatingActionButton:
_icon
==
null
?
null
:
new
FloatingActionButton
(
key:
const
ValueKey
<
String
>(
'fab'
),
child:
new
Icon
(
_icon
),
onPressed:
_nextState
,
)
)
,
),
),
);
}
...
...
examples/flutter_gallery/lib/demo/video_demo.dart
View file @
bd1921ec
...
...
@@ -399,7 +399,7 @@ class _VideoDemoState extends State<VideoDemo>
appBar:
new
AppBar
(
title:
const
Text
(
'Videos'
),
),
body:
(
isSupported
)
body:
isSupported
?
new
ConnectivityOverlay
(
child:
new
ListView
(
children:
<
Widget
>[
...
...
examples/layers/widgets/gestures.dart
View file @
bd1921ec
...
...
@@ -109,7 +109,7 @@ class GestureDemoState extends State<GestureDemo> {
void
_handleScaleUpdate
(
ScaleUpdateDetails
details
)
{
setState
(()
{
_zoom
=
(
_previousZoom
*
details
.
scale
)
;
_zoom
=
_previousZoom
*
details
.
scale
;
// Ensure that item under the focal point stays in the same place despite zooming
final
Offset
normalizedOffset
=
(
_startingFocalPoint
-
_previousOffset
)
/
_previousZoom
;
...
...
packages/flutter/lib/src/material/flexible_space_bar.dart
View file @
bd1921ec
...
...
@@ -117,7 +117,7 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
// 0.0 -> Expanded
// 1.0 -> Collapsed to toolbar
final
double
t
=
(
1.0
-
(
settings
.
currentExtent
-
settings
.
minExtent
)
/
(
deltaExtent
)
).
clamp
(
0.0
,
1.0
);
final
double
t
=
(
1.0
-
(
settings
.
currentExtent
-
settings
.
minExtent
)
/
deltaExtent
).
clamp
(
0.0
,
1.0
);
// background image
if
(
widget
.
background
!=
null
)
{
...
...
packages/flutter/lib/src/painting/colors.dart
View file @
bd1921ec
...
...
@@ -225,7 +225,7 @@ class ColorSwatch<T> extends Color {
if
(
other
.
runtimeType
!=
runtimeType
)
return
false
;
final
ColorSwatch
<
T
>
typedOther
=
other
;
return
super
==(
other
)
&&
_swatch
==
typedOther
.
_swatch
;
return
super
==
other
&&
_swatch
==
typedOther
.
_swatch
;
}
@override
...
...
packages/flutter/test/material/list_tile_test.dart
View file @
bd1921ec
...
...
@@ -285,16 +285,16 @@ void main() {
Color
textColor
(
Key
key
)
=>
tester
.
state
<
TestTextState
>(
find
.
byKey
(
key
)).
textStyle
.
color
;
// A selected ListTile's leading, trailing, and text get the primary color by default
await
(
tester
.
pumpWidget
(
buildFrame
(
selected:
true
)
));
await
(
tester
.
pump
(
const
Duration
(
milliseconds:
300
)
));
// DefaultTextStyle changes animate
await
tester
.
pumpWidget
(
buildFrame
(
selected:
true
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
300
));
// DefaultTextStyle changes animate
expect
(
iconColor
(
leadingKey
),
theme
.
primaryColor
);
expect
(
iconColor
(
trailingKey
),
theme
.
primaryColor
);
expect
(
textColor
(
titleKey
),
theme
.
primaryColor
);
expect
(
textColor
(
subtitleKey
),
theme
.
primaryColor
);
// A selected ListTile's leading, trailing, and text get the ListTileTheme's selectedColor
await
(
tester
.
pumpWidget
(
buildFrame
(
selected:
true
,
selectedColor:
green
)
));
await
(
tester
.
pump
(
const
Duration
(
milliseconds:
300
)
));
// DefaultTextStyle changes animate
await
tester
.
pumpWidget
(
buildFrame
(
selected:
true
,
selectedColor:
green
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
300
));
// DefaultTextStyle changes animate
expect
(
iconColor
(
leadingKey
),
green
);
expect
(
iconColor
(
trailingKey
),
green
);
expect
(
textColor
(
titleKey
),
green
);
...
...
@@ -302,16 +302,16 @@ void main() {
// An unselected ListTile's leading and trailing get the ListTileTheme's iconColor
// An unselected ListTile's title texts get the ListTileTheme's textColor
await
(
tester
.
pumpWidget
(
buildFrame
(
iconColor:
red
,
textColor:
green
)
));
await
(
tester
.
pump
(
const
Duration
(
milliseconds:
300
)
));
// DefaultTextStyle changes animate
await
tester
.
pumpWidget
(
buildFrame
(
iconColor:
red
,
textColor:
green
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
300
));
// DefaultTextStyle changes animate
expect
(
iconColor
(
leadingKey
),
red
);
expect
(
iconColor
(
trailingKey
),
red
);
expect
(
textColor
(
titleKey
),
green
);
expect
(
textColor
(
subtitleKey
),
green
);
// If the item is disabled it's rendered with the theme's disabled color.
await
(
tester
.
pumpWidget
(
buildFrame
(
enabled:
false
)
));
await
(
tester
.
pump
(
const
Duration
(
milliseconds:
300
)
));
// DefaultTextStyle changes animate
await
tester
.
pumpWidget
(
buildFrame
(
enabled:
false
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
300
));
// DefaultTextStyle changes animate
expect
(
iconColor
(
leadingKey
),
theme
.
disabledColor
);
expect
(
iconColor
(
trailingKey
),
theme
.
disabledColor
);
expect
(
textColor
(
titleKey
),
theme
.
disabledColor
);
...
...
@@ -319,8 +319,8 @@ void main() {
// If the item is disabled it's rendered with the theme's disabled color.
// Even if it's selected.
await
(
tester
.
pumpWidget
(
buildFrame
(
enabled:
false
,
selected:
true
)
));
await
(
tester
.
pump
(
const
Duration
(
milliseconds:
300
)
));
// DefaultTextStyle changes animate
await
tester
.
pumpWidget
(
buildFrame
(
enabled:
false
,
selected:
true
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
300
));
// DefaultTextStyle changes animate
expect
(
iconColor
(
leadingKey
),
theme
.
disabledColor
);
expect
(
iconColor
(
trailingKey
),
theme
.
disabledColor
);
expect
(
textColor
(
titleKey
),
theme
.
disabledColor
);
...
...
packages/flutter/test/material/tabs_test.dart
View file @
bd1921ec
...
...
@@ -1332,11 +1332,11 @@ void main() {
// A fling in the TabBar or TabBarView, shouldn't do anything.
await
(
tester
.
fling
(
find
.
byType
(
TabBar
),
const
Offset
(-
100.0
,
0.0
),
5000.0
)
);
await
(
tester
.
pumpAndSettle
()
);
await
tester
.
fling
(
find
.
byType
(
TabBar
),
const
Offset
(-
100.0
,
0.0
),
5000.0
);
await
tester
.
pumpAndSettle
(
);
await
(
tester
.
fling
(
find
.
byType
(
TabBarView
),
const
Offset
(
100.0
,
0.0
),
5000.0
)
);
await
(
tester
.
pumpAndSettle
()
);
await
tester
.
fling
(
find
.
byType
(
TabBarView
),
const
Offset
(
100.0
,
0.0
),
5000.0
);
await
tester
.
pumpAndSettle
(
);
expect
(
controller
.
index
,
0
);
});
...
...
@@ -1378,17 +1378,17 @@ void main() {
// A fling in the TabBar or TabBarView, shouldn't move the tab.
await
(
tester
.
fling
(
find
.
byType
(
TabBar
),
const
Offset
(-
100.0
,
0.0
),
5000.0
)
);
await
(
tester
.
pump
(
const
Duration
(
milliseconds:
50
)
));
await
tester
.
fling
(
find
.
byType
(
TabBar
),
const
Offset
(-
100.0
,
0.0
),
5000.0
);
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
expect
(
tester
.
getTopLeft
(
find
.
widgetWithText
(
Tab
,
'TAB'
)).
dx
,
0
);
expect
(
tester
.
getTopRight
(
find
.
widgetWithText
(
Tab
,
'TAB'
)).
dx
,
800
);
await
(
tester
.
pumpAndSettle
()
);
await
tester
.
pumpAndSettle
(
);
await
(
tester
.
fling
(
find
.
byType
(
TabBarView
),
const
Offset
(
100.0
,
0.0
),
5000.0
)
);
await
(
tester
.
pump
(
const
Duration
(
milliseconds:
50
)
));
await
tester
.
fling
(
find
.
byType
(
TabBarView
),
const
Offset
(
100.0
,
0.0
),
5000.0
);
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
expect
(
tester
.
getTopLeft
(
find
.
widgetWithText
(
Tab
,
'TAB'
)).
dx
,
0
);
expect
(
tester
.
getTopRight
(
find
.
widgetWithText
(
Tab
,
'TAB'
)).
dx
,
800
);
await
(
tester
.
pumpAndSettle
()
);
await
tester
.
pumpAndSettle
(
);
expect
(
controller
.
index
,
0
);
expect
(
find
.
text
(
'TAB'
),
findsOneWidget
);
...
...
packages/flutter/test/widgets/heroes_test.dart
View file @
bd1921ec
...
...
@@ -758,7 +758,7 @@ void main() {
// Scroll the target upwards by 25 pixels. The Hero flight's Y coordinate
// will be redirected from 100 to 75.
await
(
tester
.
drag
(
find
.
byKey
(
routeContainerKey
),
const
Offset
(
0.0
,
-
25.0
)
));
await
tester
.
drag
(
find
.
byKey
(
routeContainerKey
),
const
Offset
(
0.0
,
-
25.0
));
await
tester
.
pump
();
await
tester
.
pump
(
const
Duration
(
milliseconds:
10
));
final
double
yAt110ms
=
tester
.
getTopLeft
(
find
.
byKey
(
routeHeroKey
)).
dy
;
...
...
@@ -833,7 +833,7 @@ void main() {
expect
(
yAt100ms
,
lessThan
(
200.0
));
expect
(
yAt100ms
,
greaterThan
(
100.0
));
await
(
tester
.
drag
(
find
.
byKey
(
routeContainerKey
),
const
Offset
(
0.0
,
-
400.0
)
));
await
tester
.
drag
(
find
.
byKey
(
routeContainerKey
),
const
Offset
(
0.0
,
-
400.0
));
await
tester
.
pump
();
await
tester
.
pump
(
const
Duration
(
milliseconds:
10
));
expect
(
find
.
byKey
(
routeContainerKey
),
findsNothing
);
// Scrolled off the top
...
...
packages/flutter/test/widgets/nested_scroll_view_test.dart
View file @
bd1921ec
...
...
@@ -229,7 +229,7 @@ void main() {
// Fully expand the appbar by scrolling (no animation) to 0.0.
controller
.
jumpTo
(
0.0
);
await
(
tester
.
pumpAndSettle
()
);
await
tester
.
pumpAndSettle
(
);
expect
(
scrollOffset
,
0.0
);
expect
(
tester
.
renderObject
<
RenderBox
>(
find
.
byType
(
AppBar
)).
size
.
height
,
200.0
);
...
...
@@ -291,12 +291,12 @@ void main() {
// A scroll collapses Page0's appbar to 150.0.
controller
.
jumpTo
(
50.0
);
await
(
tester
.
pumpAndSettle
()
);
await
tester
.
pumpAndSettle
(
);
expect
(
tester
.
renderObject
<
RenderBox
>(
find
.
byType
(
AppBar
)).
size
.
height
,
150.0
);
// Fling to Page1. Page1's appbar height is the same as the appbar for Page0.
await
tester
.
fling
(
find
.
text
(
'Page0'
),
const
Offset
(-
100.0
,
0.0
),
10000.0
);
await
(
tester
.
pumpAndSettle
()
);
await
tester
.
pumpAndSettle
(
);
expect
(
find
.
text
(
'Page0'
),
findsNothing
);
expect
(
find
.
text
(
'Page1'
),
findsOneWidget
);
expect
(
find
.
text
(
'Page2'
),
findsNothing
);
...
...
@@ -305,10 +305,10 @@ void main() {
// Expand Page1's appbar and then fling to Page2. Page2's appbar appears
// fully expanded.
controller
.
jumpTo
(
0.0
);
await
(
tester
.
pumpAndSettle
()
);
await
tester
.
pumpAndSettle
(
);
expect
(
tester
.
renderObject
<
RenderBox
>(
find
.
byType
(
AppBar
)).
size
.
height
,
200.0
);
await
tester
.
fling
(
find
.
text
(
'Page1'
),
const
Offset
(-
100.0
,
0.0
),
10000.0
);
await
(
tester
.
pumpAndSettle
()
);
await
tester
.
pumpAndSettle
(
);
expect
(
find
.
text
(
'Page0'
),
findsNothing
);
expect
(
find
.
text
(
'Page1'
),
findsNothing
);
expect
(
find
.
text
(
'Page2'
),
findsOneWidget
);
...
...
packages/flutter/test/widgets/tracking_scroll_controller_test.dart
View file @
bd1921ec
...
...
@@ -37,10 +37,10 @@ void main() {
expect
(
find
.
text
(
'Page2-Item1'
),
findsNothing
);
controller
.
jumpTo
(
listItemHeight
+
10
);
await
(
tester
.
pumpAndSettle
()
);
await
tester
.
pumpAndSettle
(
);
await
tester
.
fling
(
find
.
text
(
'Page0-Item1'
),
const
Offset
(-
100.0
,
0.0
),
10000.0
);
await
(
tester
.
pumpAndSettle
()
);
await
tester
.
pumpAndSettle
(
);
expect
(
find
.
text
(
'Page0-Item1'
),
findsNothing
);
expect
(
find
.
text
(
'Page1-Item1'
),
findsOneWidget
);
...
...
@@ -48,7 +48,7 @@ void main() {
expect
(
find
.
text
(
'Page2-Item1'
),
findsNothing
);
await
tester
.
fling
(
find
.
text
(
'Page1-Item1'
),
const
Offset
(-
100.0
,
0.0
),
10000.0
);
await
(
tester
.
pumpAndSettle
()
);
await
tester
.
pumpAndSettle
(
);
expect
(
find
.
text
(
'Page0-Item1'
),
findsNothing
);
expect
(
find
.
text
(
'Page1-Item1'
),
findsNothing
);
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
bd1921ec
...
...
@@ -274,8 +274,8 @@ Future<XcodeBuildResult> buildXcodeProject({
appIosDir:
appDirectory
,
iosEngineDir:
flutterFrameworkDir
(
buildInfo
.
mode
),
isSwift:
app
.
isSwift
,
pluginOrFlutterPodChanged:
(
injectPluginsResult
.
hasChanged
||
previousGeneratedXcconfig
!=
currentGeneratedXcconfig
)
,
pluginOrFlutterPodChanged:
injectPluginsResult
.
hasChanged
||
previousGeneratedXcconfig
!=
currentGeneratedXcconfig
,
);
}
...
...
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