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
c621ec82
Commit
c621ec82
authored
Sep 28, 2016
by
Adam Barth
Committed by
GitHub
Sep 28, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename Interval.start to begin (#6115)
For consistency with Tween. Fixes #5169
parent
e6ed26d6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
curves.dart
packages/flutter/lib/src/animation/curves.dart
+8
-8
No files found.
packages/flutter/lib/src/animation/curves.dart
View file @
c621ec82
...
...
@@ -77,10 +77,10 @@ class Interval extends Curve {
/// Creates an interval curve.
///
/// The [start] and [end] arguments must not be null.
const
Interval
(
this
.
start
,
this
.
end
,
{
this
.
curve
:
Curves
.
linear
});
const
Interval
(
this
.
begin
,
this
.
end
,
{
this
.
curve
:
Curves
.
linear
});
/// The smallest value for which this interval is 0.0.
final
double
start
;
final
double
begin
;
/// The smallest value for which this interval is 1.0.
final
double
end
;
...
...
@@ -90,14 +90,14 @@ class Interval extends Curve {
@override
double
transform
(
double
t
)
{
assert
(
start
>=
0.0
);
assert
(
start
<=
1.0
);
assert
(
begin
>=
0.0
);
assert
(
begin
<=
1.0
);
assert
(
end
>=
0.0
);
assert
(
end
<=
1.0
);
assert
(
end
>=
start
);
assert
(
end
>=
begin
);
if
(
t
==
0.0
||
t
==
1.0
)
return
t
;
t
=
((
t
-
start
)
/
(
end
-
start
)).
clamp
(
0.0
,
1.0
);
t
=
((
t
-
begin
)
/
(
end
-
begin
)).
clamp
(
0.0
,
1.0
);
if
(
t
==
0.0
||
t
==
1.0
)
return
t
;
return
curve
.
transform
(
t
);
...
...
@@ -106,8 +106,8 @@ class Interval extends Curve {
@override
String
toString
()
{
if
(
curve
is
!
Linear
)
return
'
$runtimeType
(
$
start
\
u22EF
$end
)
\
u27A9
$curve
'
;
return
'
$runtimeType
(
$
start
\
u22EF
$end
)'
;
return
'
$runtimeType
(
$
begin
\
u22EF
$end
)
\
u27A9
$curve
'
;
return
'
$runtimeType
(
$
begin
\
u22EF
$end
)'
;
}
}
...
...
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