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 {
);
void
updateRenderObject
(
_RenderCheckbox
renderObject
,
_CheckboxRenderObjectWidget
oldWidget
)
{
renderObject
.
value
=
value
;
renderObject
.
activeColor
=
activeColor
;
renderObject
.
inactiveColor
=
inactiveColor
;
renderObject
.
onChanged
=
onChanged
;
renderObject
..
value
=
value
..
activeColor
=
activeColor
..
inactiveColor
=
inactiveColor
..
onChanged
=
onChanged
;
}
}
...
...
packages/flutter/lib/src/material/radio.dart
View file @
7a2d82d0
...
...
@@ -80,10 +80,11 @@ class _RadioRenderObjectWidget extends LeafRenderObjectWidget {
);
void
updateRenderObject
(
_RenderRadio
renderObject
,
_RadioRenderObjectWidget
oldWidget
)
{
renderObject
.
value
=
selected
;
renderObject
.
activeColor
=
activeColor
;
renderObject
.
inactiveColor
=
inactiveColor
;
renderObject
.
onChanged
=
onChanged
;
renderObject
..
value
=
selected
..
activeColor
=
activeColor
..
inactiveColor
=
inactiveColor
..
onChanged
=
onChanged
;
}
}
...
...
packages/flutter/lib/src/material/slider.dart
View file @
7a2d82d0
...
...
@@ -62,9 +62,10 @@ class _SliderRenderObjectWidget extends LeafRenderObjectWidget {
);
void
updateRenderObject
(
_RenderSlider
renderObject
,
_SliderRenderObjectWidget
oldWidget
)
{
renderObject
.
value
=
value
;
renderObject
.
activeColor
=
activeColor
;
renderObject
.
onChanged
=
onChanged
;
renderObject
..
value
=
value
..
activeColor
=
activeColor
..
onChanged
=
onChanged
;
}
}
...
...
packages/flutter/lib/src/material/switch.dart
View file @
7a2d82d0
...
...
@@ -78,12 +78,13 @@ class _SwitchRenderObjectWidget extends LeafRenderObjectWidget {
);
void
updateRenderObject
(
_RenderSwitch
renderObject
,
_SwitchRenderObjectWidget
oldWidget
)
{
renderObject
.
value
=
value
;
renderObject
.
activeColor
=
activeColor
;
renderObject
.
inactiveColor
=
inactiveColor
;
renderObject
.
activeTrackColor
=
activeTrackColor
;
renderObject
.
inactiveTrackColor
=
inactiveTrackColor
;
renderObject
.
onChanged
=
onChanged
;
renderObject
..
value
=
value
..
activeColor
=
activeColor
..
inactiveColor
=
inactiveColor
..
activeTrackColor
=
activeTrackColor
..
inactiveTrackColor
=
inactiveTrackColor
..
onChanged
=
onChanged
;
}
}
...
...
packages/flutter/lib/src/material/tabs.dart
View file @
7a2d82d0
...
...
@@ -270,12 +270,13 @@ class _TabBarWrapper extends MultiChildRenderObjectWidget {
}
void
updateRenderObject
(
_RenderTabBar
renderObject
,
_TabBarWrapper
oldWidget
)
{
renderObject
.
selectedIndex
=
selectedIndex
;
renderObject
.
indicatorColor
=
indicatorColor
;
renderObject
.
indicatorRect
=
indicatorRect
;
renderObject
.
textAndIcons
=
textAndIcons
;
renderObject
.
isScrollable
=
isScrollable
;
renderObject
.
onLayoutChanged
=
onLayoutChanged
;
renderObject
..
selectedIndex
=
selectedIndex
..
indicatorColor
=
indicatorColor
..
indicatorRect
=
indicatorRect
..
textAndIcons
=
textAndIcons
..
isScrollable
=
isScrollable
..
onLayoutChanged
=
onLayoutChanged
;
}
}
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
7a2d82d0
...
...
@@ -102,8 +102,9 @@ class ShaderMask extends OneChildRenderObjectWidget {
}
void
updateRenderObject
(
RenderShaderMask
renderObject
,
ShaderMask
oldWidget
)
{
renderObject
.
shaderCallback
=
shaderCallback
;
renderObject
.
transferMode
=
transferMode
;
renderObject
..
shaderCallback
=
shaderCallback
..
transferMode
=
transferMode
;
}
}
...
...
@@ -132,8 +133,9 @@ class DecoratedBox extends OneChildRenderObjectWidget {
RenderDecoratedBox
createRenderObject
()
=>
new
RenderDecoratedBox
(
decoration:
decoration
,
position:
position
);
void
updateRenderObject
(
RenderDecoratedBox
renderObject
,
DecoratedBox
oldWidget
)
{
renderObject
.
decoration
=
decoration
;
renderObject
.
position
=
position
;
renderObject
..
decoration
=
decoration
..
position
=
position
;
}
}
...
...
@@ -166,13 +168,15 @@ class CustomPaint extends OneChildRenderObjectWidget {
);
void
updateRenderObject
(
RenderCustomPaint
renderObject
,
CustomPaint
oldWidget
)
{
renderObject
.
painter
=
painter
;
renderObject
.
foregroundPainter
=
foregroundPainter
;
renderObject
..
painter
=
painter
..
foregroundPainter
=
foregroundPainter
;
}
void
didUnmountRenderObject
(
RenderCustomPaint
renderObject
)
{
renderObject
.
painter
=
null
;
renderObject
.
foregroundPainter
=
null
;
renderObject
..
painter
=
null
..
foregroundPainter
=
null
;
}
}
...
...
@@ -220,8 +224,9 @@ class ClipRRect extends OneChildRenderObjectWidget {
RenderClipRRect
createRenderObject
()
=>
new
RenderClipRRect
(
xRadius:
xRadius
,
yRadius:
yRadius
);
void
updateRenderObject
(
RenderClipRRect
renderObject
,
ClipRRect
oldWidget
)
{
renderObject
.
xRadius
=
xRadius
;
renderObject
.
yRadius
=
yRadius
;
renderObject
..
xRadius
=
xRadius
..
yRadius
=
yRadius
;
}
}
...
...
@@ -283,10 +288,11 @@ class Transform extends OneChildRenderObjectWidget {
);
void
updateRenderObject
(
RenderTransform
renderObject
,
Transform
oldWidget
)
{
renderObject
.
transform
=
transform
;
renderObject
.
origin
=
origin
;
renderObject
.
alignment
=
alignment
;
renderObject
.
transformHitTests
=
transformHitTests
;
renderObject
..
transform
=
transform
..
origin
=
origin
..
alignment
=
alignment
..
transformHitTests
=
transformHitTests
;
}
}
...
...
@@ -307,8 +313,9 @@ class FractionalTranslation extends OneChildRenderObjectWidget {
RenderFractionalTranslation
createRenderObject
()
=>
new
RenderFractionalTranslation
(
translation:
translation
,
transformHitTests:
transformHitTests
);
void
updateRenderObject
(
RenderFractionalTranslation
renderObject
,
FractionalTranslation
oldWidget
)
{
renderObject
.
translation
=
translation
;
renderObject
.
transformHitTests
=
transformHitTests
;
renderObject
..
translation
=
translation
..
transformHitTests
=
transformHitTests
;
}
}
...
...
@@ -381,9 +388,10 @@ class Align extends OneChildRenderObjectWidget {
RenderPositionedBox
createRenderObject
()
=>
new
RenderPositionedBox
(
alignment:
alignment
,
widthFactor:
widthFactor
,
heightFactor:
heightFactor
);
void
updateRenderObject
(
RenderPositionedBox
renderObject
,
Align
oldWidget
)
{
renderObject
.
alignment
=
alignment
;
renderObject
.
widthFactor
=
widthFactor
;
renderObject
.
heightFactor
=
heightFactor
;
renderObject
..
alignment
=
alignment
..
widthFactor
=
widthFactor
..
heightFactor
=
heightFactor
;
}
}
...
...
@@ -563,8 +571,9 @@ class FractionallySizedBox extends OneChildRenderObjectWidget {
);
void
updateRenderObject
(
RenderFractionallySizedBox
renderObject
,
FractionallySizedBox
oldWidget
)
{
renderObject
.
widthFactor
=
width
;
renderObject
.
heightFactor
=
height
;
renderObject
..
widthFactor
=
width
..
heightFactor
=
height
;
}
void
debugFillDescription
(
List
<
String
>
description
)
{
...
...
packages/flutter/lib/src/widgets/gesture_detector.dart
View file @
7a2d82d0
...
...
@@ -450,11 +450,12 @@ class _GestureSemantics extends OneChildRenderObjectWidget {
void
updateRenderObject
(
RenderSemanticsGestureHandler
renderObject
,
_GestureSemantics
oldWidget
)
{
Map
<
Type
,
GestureRecognizer
>
recognizers
=
owner
.
_recognizers
;
renderObject
.
onTap
=
recognizers
.
containsKey
(
TapGestureRecognizer
)
?
_handleTap
:
null
;
renderObject
.
onLongPress
=
recognizers
.
containsKey
(
LongPressGestureRecognizer
)
?
_handleLongPress
:
null
;
renderObject
.
onHorizontalDragUpdate
=
recognizers
.
containsKey
(
VerticalDragGestureRecognizer
)
||
recognizers
.
containsKey
(
PanGestureRecognizer
)
?
_handleHorizontalDragUpdate
:
null
;
renderObject
.
onVerticalDragUpdate
=
recognizers
.
containsKey
(
VerticalDragGestureRecognizer
)
||
recognizers
.
containsKey
(
PanGestureRecognizer
)
?
_handleVerticalDragUpdate
:
null
;
renderObject
..
onTap
=
recognizers
.
containsKey
(
TapGestureRecognizer
)
?
_handleTap
:
null
..
onLongPress
=
recognizers
.
containsKey
(
LongPressGestureRecognizer
)
?
_handleLongPress
:
null
..
onHorizontalDragUpdate
=
recognizers
.
containsKey
(
VerticalDragGestureRecognizer
)
||
recognizers
.
containsKey
(
PanGestureRecognizer
)
?
_handleHorizontalDragUpdate
:
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 {
);
void
updateRenderObject
(
RenderPerformanceOverlay
renderObject
,
RenderObjectWidget
oldWidget
)
{
renderObject
.
optionsMask
=
optionsMask
;
renderObject
.
rasterizerThreshold
=
rasterizerThreshold
;
renderObject
..
optionsMask
=
optionsMask
..
rasterizerThreshold
=
rasterizerThreshold
;
}
}
packages/flutter_sprites/lib/src/sprite_widget.dart
View file @
7a2d82d0
...
...
@@ -27,7 +27,8 @@ class SpriteWidget extends OneChildRenderObjectWidget {
SpriteBox
createRenderObject
()
=>
new
SpriteBox
(
rootNode
,
transformMode
);
void
updateRenderObject
(
SpriteBox
renderObject
,
SpriteWidget
oldWidget
)
{
renderObject
.
rootNode
=
rootNode
;
renderObject
.
transformMode
=
transformMode
;
renderObject
..
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