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
5b18fca0
Commit
5b18fca0
authored
May 09, 2017
by
Chris Bracken
Committed by
GitHub
May 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add const non-null asserts where required (#9937)
parent
58a11f01
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
curves.dart
packages/flutter/lib/src/animation/curves.dart
+12
-5
assertions.dart
packages/flutter/lib/src/foundation/assertions.dart
+1
-1
No files found.
packages/flutter/lib/src/animation/curves.dart
View file @
5b18fca0
...
@@ -53,7 +53,7 @@ class SawTooth extends Curve {
...
@@ -53,7 +53,7 @@ class SawTooth extends Curve {
/// Creates a sawtooth curve.
/// Creates a sawtooth curve.
///
///
/// The [count] argument must not be null.
/// The [count] argument must not be null.
const
SawTooth
(
this
.
count
);
const
SawTooth
(
this
.
count
)
:
assert
(
count
!=
null
)
;
/// The number of repetitions of the sawtooth pattern in the unit interval.
/// The number of repetitions of the sawtooth pattern in the unit interval.
final
int
count
;
final
int
count
;
...
@@ -84,7 +84,10 @@ class Interval extends Curve {
...
@@ -84,7 +84,10 @@ class Interval extends Curve {
/// Creates an interval curve.
/// Creates an interval curve.
///
///
/// The arguments must not be null.
/// The arguments must not be null.
const
Interval
(
this
.
begin
,
this
.
end
,
{
this
.
curve
:
Curves
.
linear
});
const
Interval
(
this
.
begin
,
this
.
end
,
{
this
.
curve
:
Curves
.
linear
})
:
assert
(
begin
!=
null
),
assert
(
end
!=
null
),
assert
(
curve
!=
null
);
/// The largest value for which this interval is 0.0.
/// The largest value for which this interval is 0.0.
///
///
...
@@ -128,7 +131,7 @@ class Threshold extends Curve {
...
@@ -128,7 +131,7 @@ class Threshold extends Curve {
/// Creates a threshold curve.
/// Creates a threshold curve.
///
///
/// The [threshold] argument must not be null.
/// The [threshold] argument must not be null.
const
Threshold
(
this
.
threshold
);
const
Threshold
(
this
.
threshold
)
:
assert
(
threshold
!=
null
)
;
/// The value before which the curve is 0.0 and after which the curve is 1.0.
/// The value before which the curve is 0.0 and after which the curve is 1.0.
///
///
...
@@ -163,7 +166,11 @@ class Cubic extends Curve {
...
@@ -163,7 +166,11 @@ class Cubic extends Curve {
/// cubic curves in [Curves].
/// cubic curves in [Curves].
///
///
/// The [a], [b], [c], and [d] arguments must not be null.
/// The [a], [b], [c], and [d] arguments must not be null.
const
Cubic
(
this
.
a
,
this
.
b
,
this
.
c
,
this
.
d
);
const
Cubic
(
this
.
a
,
this
.
b
,
this
.
c
,
this
.
d
)
:
assert
(
a
!=
null
),
assert
(
b
!=
null
),
assert
(
c
!=
null
),
assert
(
d
!=
null
);
/// The x coordinate of the first control point.
/// The x coordinate of the first control point.
///
///
...
@@ -229,7 +236,7 @@ class FlippedCurve extends Curve {
...
@@ -229,7 +236,7 @@ class FlippedCurve extends Curve {
/// Creates a flipped curve.
/// Creates a flipped curve.
///
///
/// The [curve] argument must not be null.
/// The [curve] argument must not be null.
const
FlippedCurve
(
this
.
curve
);
const
FlippedCurve
(
this
.
curve
)
:
assert
(
curve
!=
null
)
;
/// The curve that is being flipped.
/// The curve that is being flipped.
final
Curve
curve
;
final
Curve
curve
;
...
...
packages/flutter/lib/src/foundation/assertions.dart
View file @
5b18fca0
...
@@ -33,7 +33,7 @@ class FlutterErrorDetails {
...
@@ -33,7 +33,7 @@ class FlutterErrorDetails {
this
.
stackFilter
,
this
.
stackFilter
,
this
.
informationCollector
,
this
.
informationCollector
,
this
.
silent
:
false
this
.
silent
:
false
});
})
:
assert
(
exception
!=
null
)
;
/// The exception. Often this will be an [AssertionError], maybe specifically
/// The exception. Often this will be an [AssertionError], maybe specifically
/// a [FlutterError]. However, this could be any value at all.
/// a [FlutterError]. However, this could be any value at all.
...
...
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