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
52790aed
Commit
52790aed
authored
Sep 03, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use null-aware operators in package:sky
parent
8df083df
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
13 additions
and
18 deletions
+13
-18
activity.dart
packages/flutter/lib/mojo/activity.dart
+1
-1
layer.dart
packages/flutter/lib/src/rendering/layer.dart
+1
-1
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+2
-5
default_text_style.dart
packages/flutter/lib/src/widgets/default_text_style.dart
+1
-1
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+3
-3
homogeneous_viewport.dart
packages/flutter/lib/src/widgets/homogeneous_viewport.dart
+1
-1
icon.dart
packages/flutter/lib/src/widgets/icon.dart
+1
-1
scaffold.dart
packages/flutter/lib/src/widgets/scaffold.dart
+1
-1
transitions.dart
packages/flutter/lib/src/widgets/transitions.dart
+1
-3
pubspec.yaml
packages/flutter/pubspec.yaml
+1
-1
No files found.
packages/flutter/lib/mojo/activity.dart
View file @
52790aed
...
...
@@ -50,7 +50,7 @@ void updateTaskDescription(String label, Color color) {
TaskDescription
description
=
new
TaskDescription
()
..
label
=
label
..
primaryColor
=
(
color
!=
null
?
color
.
value
:
null
)
;
..
primaryColor
=
color
?.
value
;
_activityProxy
.
ptr
.
setTaskDescription
(
description
);
}
...
...
packages/flutter/lib/src/rendering/layer.dart
View file @
52790aed
...
...
@@ -242,7 +242,7 @@ class OpacityLayer extends ContainerLayer {
int
alpha
;
void
addToScene
(
sky
.
SceneBuilder
builder
,
Offset
layerOffset
)
{
builder
.
pushOpacity
(
alpha
,
bounds
==
null
?
null
:
bounds
.
shift
(
layerOffset
));
builder
.
pushOpacity
(
alpha
,
bounds
?
.
shift
(
layerOffset
));
addChildrenToScene
(
builder
,
offset
+
layerOffset
);
builder
.
pop
();
}
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
52790aed
...
...
@@ -487,10 +487,7 @@ class Stack extends MultiChildRenderObjectWrapper {
RenderStack
get
renderObject
=>
super
.
renderObject
;
void
updateParentData
(
RenderObject
child
,
Positioned
positioned
)
{
if
(
positioned
==
null
)
_updateParentDataWithValues
(
child
,
null
,
null
,
null
,
null
);
else
_updateParentDataWithValues
(
child
,
positioned
.
top
,
positioned
.
right
,
positioned
.
bottom
,
positioned
.
left
);
_updateParentDataWithValues
(
child
,
positioned
?.
top
,
positioned
?.
right
,
positioned
?.
bottom
,
positioned
?.
left
);
}
void
_updateParentDataWithValues
(
RenderObject
child
,
double
top
,
double
right
,
double
bottom
,
double
left
)
{
...
...
@@ -592,7 +589,7 @@ class Flex extends MultiChildRenderObjectWrapper {
}
void
updateParentData
(
RenderObject
child
,
Flexible
flexible
)
{
_updateParentDataWithValues
(
child
,
flexible
==
null
?
null
:
flexible
.
flex
);
_updateParentDataWithValues
(
child
,
flexible
?
.
flex
);
}
void
_updateParentDataWithValues
(
RenderObject
child
,
int
flex
)
{
...
...
packages/flutter/lib/src/widgets/default_text_style.dart
View file @
52790aed
...
...
@@ -21,7 +21,7 @@ class DefaultTextStyle extends Inherited {
static
TextStyle
of
(
Widget
widget
)
{
DefaultTextStyle
result
=
widget
.
inheritedOfType
(
DefaultTextStyle
);
return
result
==
null
?
null
:
result
.
style
;
return
result
?
.
style
;
}
bool
syncShouldNotify
(
DefaultTextStyle
old
)
=>
style
!=
old
.
style
;
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
52790aed
...
...
@@ -498,7 +498,7 @@ abstract class TagNode extends Widget {
}
void
_sync
(
Widget
old
,
dynamic
slot
)
{
Widget
oldChild
=
old
==
null
?
null
:
(
old
as
TagNode
)
.
child
;
Widget
oldChild
=
(
old
as
TagNode
)?
.
child
;
child
=
syncChild
(
child
,
oldChild
,
slot
);
if
(
child
!=
null
)
{
assert
(
child
.
parent
==
this
);
...
...
@@ -1259,7 +1259,7 @@ abstract class OneChildRenderObjectWrapper extends RenderObjectWrapper {
void
syncRenderObject
(
RenderObjectWrapper
old
)
{
super
.
syncRenderObject
(
old
);
Widget
oldChild
=
old
==
null
?
null
:
(
old
as
OneChildRenderObjectWrapper
)
.
child
;
Widget
oldChild
=
(
old
as
OneChildRenderObjectWrapper
)?
.
child
;
Widget
newChild
=
child
;
_child
=
syncChild
(
newChild
,
oldChild
,
null
);
assert
((
newChild
==
null
&&
child
==
null
)
||
(
newChild
!=
null
&&
child
.
parent
==
this
));
...
...
@@ -1304,7 +1304,7 @@ abstract class MultiChildRenderObjectWrapper extends RenderObjectWrapper {
void
insertChildRenderObject
(
RenderObjectWrapper
child
,
Widget
slot
)
{
final
renderObject
=
this
.
renderObject
;
// TODO(ianh): Remove this once the analyzer is cleverer
RenderObject
nextSibling
=
slot
!=
null
?
slot
.
renderObject
:
null
;
RenderObject
nextSibling
=
slot
?.
renderObject
;
assert
(
nextSibling
==
null
||
nextSibling
is
RenderObject
);
assert
(
renderObject
is
ContainerRenderObjectMixin
);
renderObject
.
add
(
child
.
renderObject
,
before:
nextSibling
);
...
...
packages/flutter/lib/src/widgets/homogeneous_viewport.dart
View file @
52790aed
...
...
@@ -65,7 +65,7 @@ class HomogeneousViewport extends RenderObjectWrapper {
}
void
insertChildRenderObject
(
RenderObjectWrapper
child
,
Widget
slot
)
{
RenderObject
nextSibling
=
slot
!=
null
?
slot
.
renderObject
:
null
;
RenderObject
nextSibling
=
slot
?.
renderObject
;
renderObject
.
add
(
child
.
renderObject
,
before:
nextSibling
);
}
...
...
packages/flutter/lib/src/widgets/icon.dart
View file @
52790aed
...
...
@@ -31,7 +31,7 @@ class IconTheme extends Inherited {
static
IconThemeData
of
(
Component
component
)
{
IconTheme
result
=
component
.
inheritedOfType
(
IconTheme
);
return
result
==
null
?
null
:
result
.
data
;
return
result
?
.
data
;
}
bool
syncShouldNotify
(
IconTheme
old
)
=>
data
!=
old
.
data
;
...
...
packages/flutter/lib/src/widgets/scaffold.dart
View file @
52790aed
...
...
@@ -208,7 +208,7 @@ class Scaffold extends RenderObjectWrapper {
}
void
insertChildRenderObject
(
RenderObjectWrapper
child
,
ScaffoldSlots
slot
)
{
renderObject
[
slot
]
=
child
!=
null
?
child
.
renderObject
:
null
;
renderObject
[
slot
]
=
child
?.
renderObject
;
}
void
detachChildRenderObject
(
RenderObjectWrapper
child
)
{
...
...
packages/flutter/lib/src/widgets/transitions.dart
View file @
52790aed
...
...
@@ -11,8 +11,6 @@ import 'package:vector_math/vector_math.dart';
export
'package:sky/animation/direction.dart'
show
Direction
;
dynamic
_maybe
(
AnimatedValue
x
)
=>
x
!=
null
?
x
.
value
:
null
;
// A helper class to anchor widgets to one another. Pass an instance of this to
// a Transition, then use the build() method to create a child with the same
// transition applied.
...
...
@@ -270,7 +268,7 @@ class SquashTransition extends TransitionBase {
performance
.
updateVariable
(
width
);
if
(
height
!=
null
)
performance
.
updateVariable
(
height
);
return
new
SizedBox
(
width:
_maybe
(
width
),
height:
_maybe
(
height
)
,
child:
child
);
return
new
SizedBox
(
width:
width
?.
value
,
height:
height
?.
value
,
child:
child
);
}
}
...
...
packages/flutter/pubspec.yaml
View file @
52790aed
...
...
@@ -15,4 +15,4 @@ dependencies:
vector_math
:
^1.4.3
intl
:
^0.12.4+2
environment
:
sdk
:
'
>=1.
8
.0
<2.0.0'
sdk
:
'
>=1.
12
.0
<2.0.0'
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