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
48fb726b
Unverified
Commit
48fb726b
authored
Oct 01, 2018
by
Alexandre Ardhuin
Committed by
GitHub
Oct 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compare to null with == (#21944)
* compare to null with == * address review comments
parent
224f91e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
box_decoration.dart
packages/flutter/lib/src/painting/box_decoration.dart
+2
-3
text_style.dart
packages/flutter/lib/src/painting/text_style.dart
+1
-3
No files found.
packages/flutter/lib/src/painting/box_decoration.dart
View file @
48fb726b
...
...
@@ -83,11 +83,10 @@ class BoxDecoration extends Decoration {
this
.
backgroundBlendMode
,
this
.
shape
=
BoxShape
.
rectangle
,
})
:
assert
(
shape
!=
null
),
// TODO(mattcarroll): Use "backgroundBlendMode == null" when https://github.com/dart-lang/sdk/issues/34180 is in.
assert
(
identical
(
backgroundBlendMode
,
null
)
||
color
!=
null
||
gradient
!=
null
,
backgroundBlendMode
==
null
||
color
!=
null
||
gradient
!=
null
,
'backgroundBlendMode applies to BoxDecoration
\'
s background color or '
'gradient, but no color or gradient w
ere
provided.'
'gradient, but no color or gradient w
as
provided.'
);
@override
...
...
packages/flutter/lib/src/painting/text_style.dart
View file @
48fb726b
...
...
@@ -246,9 +246,7 @@ class TextStyle extends Diagnosticable {
String
package
,
})
:
fontFamily
=
package
==
null
?
fontFamily
:
'packages/
$package
/
$fontFamily
'
,
assert
(
inherit
!=
null
),
// TODO(dnfield): once https://github.com/dart-lang/sdk/issues/33408 is finished, this can be replaced with
// assert(color == null || foreground == null, _kColorForegroundWarning);
assert
(
identical
(
color
,
null
)
||
identical
(
foreground
,
null
),
_kColorForegroundWarning
);
assert
(
color
==
null
||
foreground
==
null
,
_kColorForegroundWarning
);
/// Whether null values are replaced with their value in an ancestor text
...
...
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