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
7a2d82d0
Commit
7a2d82d0
authored
Mar 01, 2016
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2301 from abarth/dotdot_pattern
updateRenderObject() methods should use the .. pattern
parents
ad1eac32
ac1cba59
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
71 additions
and
54 deletions
+71
-54
checkbox.dart
packages/flutter/lib/src/material/checkbox.dart
+5
-4
radio.dart
packages/flutter/lib/src/material/radio.dart
+5
-4
slider.dart
packages/flutter/lib/src/material/slider.dart
+4
-3
switch.dart
packages/flutter/lib/src/material/switch.dart
+7
-6
tabs.dart
packages/flutter/lib/src/material/tabs.dart
+7
-6
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+30
-21
gesture_detector.dart
packages/flutter/lib/src/widgets/gesture_detector.dart
+7
-6
performance_overlay.dart
packages/flutter/lib/src/widgets/performance_overlay.dart
+3
-2
sprite_widget.dart
packages/flutter_sprites/lib/src/sprite_widget.dart
+3
-2
No files found.
packages/flutter/lib/src/material/checkbox.dart
View file @
7a2d82d0
...
@@ -75,10 +75,11 @@ class _CheckboxRenderObjectWidget extends LeafRenderObjectWidget {
...
@@ -75,10 +75,11 @@ class _CheckboxRenderObjectWidget extends LeafRenderObjectWidget {
);
);
void
updateRenderObject
(
_RenderCheckbox
renderObject
,
_CheckboxRenderObjectWidget
oldWidget
)
{
void
updateRenderObject
(
_RenderCheckbox
renderObject
,
_CheckboxRenderObjectWidget
oldWidget
)
{
renderObject
.
value
=
value
;
renderObject
renderObject
.
activeColor
=
activeColor
;
..
value
=
value
renderObject
.
inactiveColor
=
inactiveColor
;
..
activeColor
=
activeColor
renderObject
.
onChanged
=
onChanged
;
..
inactiveColor
=
inactiveColor
..
onChanged
=
onChanged
;
}
}
}
}
...
...
packages/flutter/lib/src/material/radio.dart
View file @
7a2d82d0
...
@@ -80,10 +80,11 @@ class _RadioRenderObjectWidget extends LeafRenderObjectWidget {
...
@@ -80,10 +80,11 @@ class _RadioRenderObjectWidget extends LeafRenderObjectWidget {
);
);
void
updateRenderObject
(
_RenderRadio
renderObject
,
_RadioRenderObjectWidget
oldWidget
)
{
void
updateRenderObject
(
_RenderRadio
renderObject
,
_RadioRenderObjectWidget
oldWidget
)
{
renderObject
.
value
=
selected
;
renderObject
renderObject
.
activeColor
=
activeColor
;
..
value
=
selected
renderObject
.
inactiveColor
=
inactiveColor
;
..
activeColor
=
activeColor
renderObject
.
onChanged
=
onChanged
;
..
inactiveColor
=
inactiveColor
..
onChanged
=
onChanged
;
}
}
}
}
...
...
packages/flutter/lib/src/material/slider.dart
View file @
7a2d82d0
...
@@ -62,9 +62,10 @@ class _SliderRenderObjectWidget extends LeafRenderObjectWidget {
...
@@ -62,9 +62,10 @@ class _SliderRenderObjectWidget extends LeafRenderObjectWidget {
);
);
void
updateRenderObject
(
_RenderSlider
renderObject
,
_SliderRenderObjectWidget
oldWidget
)
{
void
updateRenderObject
(
_RenderSlider
renderObject
,
_SliderRenderObjectWidget
oldWidget
)
{
renderObject
.
value
=
value
;
renderObject
renderObject
.
activeColor
=
activeColor
;
..
value
=
value
renderObject
.
onChanged
=
onChanged
;
..
activeColor
=
activeColor
..
onChanged
=
onChanged
;
}
}
}
}
...
...
packages/flutter/lib/src/material/switch.dart
View file @
7a2d82d0
...
@@ -78,12 +78,13 @@ class _SwitchRenderObjectWidget extends LeafRenderObjectWidget {
...
@@ -78,12 +78,13 @@ class _SwitchRenderObjectWidget extends LeafRenderObjectWidget {
);
);
void
updateRenderObject
(
_RenderSwitch
renderObject
,
_SwitchRenderObjectWidget
oldWidget
)
{
void
updateRenderObject
(
_RenderSwitch
renderObject
,
_SwitchRenderObjectWidget
oldWidget
)
{
renderObject
.
value
=
value
;
renderObject
renderObject
.
activeColor
=
activeColor
;
..
value
=
value
renderObject
.
inactiveColor
=
inactiveColor
;
..
activeColor
=
activeColor
renderObject
.
activeTrackColor
=
activeTrackColor
;
..
inactiveColor
=
inactiveColor
renderObject
.
inactiveTrackColor
=
inactiveTrackColor
;
..
activeTrackColor
=
activeTrackColor
renderObject
.
onChanged
=
onChanged
;
..
inactiveTrackColor
=
inactiveTrackColor
..
onChanged
=
onChanged
;
}
}
}
}
...
...
packages/flutter/lib/src/material/tabs.dart
View file @
7a2d82d0
...
@@ -270,12 +270,13 @@ class _TabBarWrapper extends MultiChildRenderObjectWidget {
...
@@ -270,12 +270,13 @@ class _TabBarWrapper extends MultiChildRenderObjectWidget {
}
}
void
updateRenderObject
(
_RenderTabBar
renderObject
,
_TabBarWrapper
oldWidget
)
{
void
updateRenderObject
(
_RenderTabBar
renderObject
,
_TabBarWrapper
oldWidget
)
{
renderObject
.
selectedIndex
=
selectedIndex
;
renderObject
renderObject
.
indicatorColor
=
indicatorColor
;
..
selectedIndex
=
selectedIndex
renderObject
.
indicatorRect
=
indicatorRect
;
..
indicatorColor
=
indicatorColor
renderObject
.
textAndIcons
=
textAndIcons
;
..
indicatorRect
=
indicatorRect
renderObject
.
isScrollable
=
isScrollable
;
..
textAndIcons
=
textAndIcons
renderObject
.
onLayoutChanged
=
onLayoutChanged
;
..
isScrollable
=
isScrollable
..
onLayoutChanged
=
onLayoutChanged
;
}
}
}
}
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
7a2d82d0
...
@@ -102,8 +102,9 @@ class ShaderMask extends OneChildRenderObjectWidget {
...
@@ -102,8 +102,9 @@ class ShaderMask extends OneChildRenderObjectWidget {
}
}
void
updateRenderObject
(
RenderShaderMask
renderObject
,
ShaderMask
oldWidget
)
{
void
updateRenderObject
(
RenderShaderMask
renderObject
,
ShaderMask
oldWidget
)
{
renderObject
.
shaderCallback
=
shaderCallback
;
renderObject
renderObject
.
transferMode
=
transferMode
;
..
shaderCallback
=
shaderCallback
..
transferMode
=
transferMode
;
}
}
}
}
...
@@ -132,8 +133,9 @@ class DecoratedBox extends OneChildRenderObjectWidget {
...
@@ -132,8 +133,9 @@ class DecoratedBox extends OneChildRenderObjectWidget {
RenderDecoratedBox
createRenderObject
()
=>
new
RenderDecoratedBox
(
decoration:
decoration
,
position:
position
);
RenderDecoratedBox
createRenderObject
()
=>
new
RenderDecoratedBox
(
decoration:
decoration
,
position:
position
);
void
updateRenderObject
(
RenderDecoratedBox
renderObject
,
DecoratedBox
oldWidget
)
{
void
updateRenderObject
(
RenderDecoratedBox
renderObject
,
DecoratedBox
oldWidget
)
{
renderObject
.
decoration
=
decoration
;
renderObject
renderObject
.
position
=
position
;
..
decoration
=
decoration
..
position
=
position
;
}
}
}
}
...
@@ -166,13 +168,15 @@ class CustomPaint extends OneChildRenderObjectWidget {
...
@@ -166,13 +168,15 @@ class CustomPaint extends OneChildRenderObjectWidget {
);
);
void
updateRenderObject
(
RenderCustomPaint
renderObject
,
CustomPaint
oldWidget
)
{
void
updateRenderObject
(
RenderCustomPaint
renderObject
,
CustomPaint
oldWidget
)
{
renderObject
.
painter
=
painter
;
renderObject
renderObject
.
foregroundPainter
=
foregroundPainter
;
..
painter
=
painter
..
foregroundPainter
=
foregroundPainter
;
}
}
void
didUnmountRenderObject
(
RenderCustomPaint
renderObject
)
{
void
didUnmountRenderObject
(
RenderCustomPaint
renderObject
)
{
renderObject
.
painter
=
null
;
renderObject
renderObject
.
foregroundPainter
=
null
;
..
painter
=
null
..
foregroundPainter
=
null
;
}
}
}
}
...
@@ -220,8 +224,9 @@ class ClipRRect extends OneChildRenderObjectWidget {
...
@@ -220,8 +224,9 @@ class ClipRRect extends OneChildRenderObjectWidget {
RenderClipRRect
createRenderObject
()
=>
new
RenderClipRRect
(
xRadius:
xRadius
,
yRadius:
yRadius
);
RenderClipRRect
createRenderObject
()
=>
new
RenderClipRRect
(
xRadius:
xRadius
,
yRadius:
yRadius
);
void
updateRenderObject
(
RenderClipRRect
renderObject
,
ClipRRect
oldWidget
)
{
void
updateRenderObject
(
RenderClipRRect
renderObject
,
ClipRRect
oldWidget
)
{
renderObject
.
xRadius
=
xRadius
;
renderObject
renderObject
.
yRadius
=
yRadius
;
..
xRadius
=
xRadius
..
yRadius
=
yRadius
;
}
}
}
}
...
@@ -283,10 +288,11 @@ class Transform extends OneChildRenderObjectWidget {
...
@@ -283,10 +288,11 @@ class Transform extends OneChildRenderObjectWidget {
);
);
void
updateRenderObject
(
RenderTransform
renderObject
,
Transform
oldWidget
)
{
void
updateRenderObject
(
RenderTransform
renderObject
,
Transform
oldWidget
)
{
renderObject
.
transform
=
transform
;
renderObject
renderObject
.
origin
=
origin
;
..
transform
=
transform
renderObject
.
alignment
=
alignment
;
..
origin
=
origin
renderObject
.
transformHitTests
=
transformHitTests
;
..
alignment
=
alignment
..
transformHitTests
=
transformHitTests
;
}
}
}
}
...
@@ -307,8 +313,9 @@ class FractionalTranslation extends OneChildRenderObjectWidget {
...
@@ -307,8 +313,9 @@ class FractionalTranslation extends OneChildRenderObjectWidget {
RenderFractionalTranslation
createRenderObject
()
=>
new
RenderFractionalTranslation
(
translation:
translation
,
transformHitTests:
transformHitTests
);
RenderFractionalTranslation
createRenderObject
()
=>
new
RenderFractionalTranslation
(
translation:
translation
,
transformHitTests:
transformHitTests
);
void
updateRenderObject
(
RenderFractionalTranslation
renderObject
,
FractionalTranslation
oldWidget
)
{
void
updateRenderObject
(
RenderFractionalTranslation
renderObject
,
FractionalTranslation
oldWidget
)
{
renderObject
.
translation
=
translation
;
renderObject
renderObject
.
transformHitTests
=
transformHitTests
;
..
translation
=
translation
..
transformHitTests
=
transformHitTests
;
}
}
}
}
...
@@ -381,9 +388,10 @@ class Align extends OneChildRenderObjectWidget {
...
@@ -381,9 +388,10 @@ class Align extends OneChildRenderObjectWidget {
RenderPositionedBox
createRenderObject
()
=>
new
RenderPositionedBox
(
alignment:
alignment
,
widthFactor:
widthFactor
,
heightFactor:
heightFactor
);
RenderPositionedBox
createRenderObject
()
=>
new
RenderPositionedBox
(
alignment:
alignment
,
widthFactor:
widthFactor
,
heightFactor:
heightFactor
);
void
updateRenderObject
(
RenderPositionedBox
renderObject
,
Align
oldWidget
)
{
void
updateRenderObject
(
RenderPositionedBox
renderObject
,
Align
oldWidget
)
{
renderObject
.
alignment
=
alignment
;
renderObject
renderObject
.
widthFactor
=
widthFactor
;
..
alignment
=
alignment
renderObject
.
heightFactor
=
heightFactor
;
..
widthFactor
=
widthFactor
..
heightFactor
=
heightFactor
;
}
}
}
}
...
@@ -563,8 +571,9 @@ class FractionallySizedBox extends OneChildRenderObjectWidget {
...
@@ -563,8 +571,9 @@ class FractionallySizedBox extends OneChildRenderObjectWidget {
);
);
void
updateRenderObject
(
RenderFractionallySizedBox
renderObject
,
FractionallySizedBox
oldWidget
)
{
void
updateRenderObject
(
RenderFractionallySizedBox
renderObject
,
FractionallySizedBox
oldWidget
)
{
renderObject
.
widthFactor
=
width
;
renderObject
renderObject
.
heightFactor
=
height
;
..
widthFactor
=
width
..
heightFactor
=
height
;
}
}
void
debugFillDescription
(
List
<
String
>
description
)
{
void
debugFillDescription
(
List
<
String
>
description
)
{
...
...
packages/flutter/lib/src/widgets/gesture_detector.dart
View file @
7a2d82d0
...
@@ -450,11 +450,12 @@ class _GestureSemantics extends OneChildRenderObjectWidget {
...
@@ -450,11 +450,12 @@ class _GestureSemantics extends OneChildRenderObjectWidget {
void
updateRenderObject
(
RenderSemanticsGestureHandler
renderObject
,
_GestureSemantics
oldWidget
)
{
void
updateRenderObject
(
RenderSemanticsGestureHandler
renderObject
,
_GestureSemantics
oldWidget
)
{
Map
<
Type
,
GestureRecognizer
>
recognizers
=
owner
.
_recognizers
;
Map
<
Type
,
GestureRecognizer
>
recognizers
=
owner
.
_recognizers
;
renderObject
.
onTap
=
recognizers
.
containsKey
(
TapGestureRecognizer
)
?
_handleTap
:
null
;
renderObject
renderObject
.
onLongPress
=
recognizers
.
containsKey
(
LongPressGestureRecognizer
)
?
_handleLongPress
:
null
;
..
onTap
=
recognizers
.
containsKey
(
TapGestureRecognizer
)
?
_handleTap
:
null
renderObject
.
onHorizontalDragUpdate
=
recognizers
.
containsKey
(
VerticalDragGestureRecognizer
)
||
..
onLongPress
=
recognizers
.
containsKey
(
LongPressGestureRecognizer
)
?
_handleLongPress
:
null
recognizers
.
containsKey
(
PanGestureRecognizer
)
?
_handleHorizontalDragUpdate
:
null
;
..
onHorizontalDragUpdate
=
recognizers
.
containsKey
(
VerticalDragGestureRecognizer
)
||
renderObject
.
onVerticalDragUpdate
=
recognizers
.
containsKey
(
VerticalDragGestureRecognizer
)
||
recognizers
.
containsKey
(
PanGestureRecognizer
)
?
_handleHorizontalDragUpdate
:
null
recognizers
.
containsKey
(
PanGestureRecognizer
)
?
_handleVerticalDragUpdate
:
null
;
..
onVerticalDragUpdate
=
recognizers
.
containsKey
(
VerticalDragGestureRecognizer
)
||
recognizers
.
containsKey
(
PanGestureRecognizer
)
?
_handleVerticalDragUpdate
:
null
;
}
}
}
}
packages/flutter/lib/src/widgets/performance_overlay.dart
View file @
7a2d82d0
...
@@ -62,7 +62,8 @@ class PerformanceOverlay extends LeafRenderObjectWidget {
...
@@ -62,7 +62,8 @@ class PerformanceOverlay extends LeafRenderObjectWidget {
);
);
void
updateRenderObject
(
RenderPerformanceOverlay
renderObject
,
RenderObjectWidget
oldWidget
)
{
void
updateRenderObject
(
RenderPerformanceOverlay
renderObject
,
RenderObjectWidget
oldWidget
)
{
renderObject
.
optionsMask
=
optionsMask
;
renderObject
renderObject
.
rasterizerThreshold
=
rasterizerThreshold
;
..
optionsMask
=
optionsMask
..
rasterizerThreshold
=
rasterizerThreshold
;
}
}
}
}
packages/flutter_sprites/lib/src/sprite_widget.dart
View file @
7a2d82d0
...
@@ -27,7 +27,8 @@ class SpriteWidget extends OneChildRenderObjectWidget {
...
@@ -27,7 +27,8 @@ class SpriteWidget extends OneChildRenderObjectWidget {
SpriteBox
createRenderObject
()
=>
new
SpriteBox
(
rootNode
,
transformMode
);
SpriteBox
createRenderObject
()
=>
new
SpriteBox
(
rootNode
,
transformMode
);
void
updateRenderObject
(
SpriteBox
renderObject
,
SpriteWidget
oldWidget
)
{
void
updateRenderObject
(
SpriteBox
renderObject
,
SpriteWidget
oldWidget
)
{
renderObject
.
rootNode
=
rootNode
;
renderObject
renderObject
.
transformMode
=
transformMode
;
..
rootNode
=
rootNode
..
transformMode
=
transformMode
;
}
}
}
}
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