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
a9151779
Unverified
Commit
a9151779
authored
Aug 09, 2019
by
Michael Goderbauer
Committed by
GitHub
Aug 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Add equals and hasCode to Tween (#37793)" (#37895)
This reverts commit
b39e315e
.
parent
90a3d8e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
30 deletions
+1
-30
tween.dart
packages/flutter/lib/src/animation/tween.dart
+1
-16
tween_test.dart
packages/flutter/test/animation/tween_test.dart
+0
-14
No files found.
packages/flutter/lib/src/animation/tween.dart
View file @
a9151779
...
...
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:ui'
show
Color
,
Rect
,
Size
,
hashValues
;
import
'dart:ui'
show
Color
,
Size
,
Rect
;
import
'package:flutter/foundation.dart'
;
...
...
@@ -260,21 +260,6 @@ class Tween<T extends dynamic> extends Animatable<T> {
return
lerp
(
t
);
}
@override
int
get
hashCode
{
return
hashValues
(
begin
,
end
);
}
@override
bool
operator
==(
dynamic
other
)
{
if
(
identical
(
this
,
other
))
return
true
;
if
(
other
.
runtimeType
!=
runtimeType
)
return
false
;
final
Tween
<
T
>
typedOther
=
other
;
return
typedOther
.
begin
==
begin
&&
typedOther
.
end
==
end
;
}
@override
String
toString
()
=>
'
$runtimeType
(
$begin
\
u2192
$end
)'
;
}
...
...
packages/flutter/test/animation/tween_test.dart
View file @
a9151779
...
...
@@ -93,18 +93,4 @@ void main() {
expect
(
tween
.
lerp
(
0.5
),
100.0
);
expect
(
tween
.
lerp
(
1.0
),
100.0
);
});
test
(
'Tween equals'
,
()
{
final
Tween
<
double
>
doubleTween1
=
Tween
<
double
>(
begin:
10
,
end:
22
);
final
Tween
<
double
>
doubleTween2
=
Tween
<
double
>(
begin:
10
,
end:
22
);
final
Tween
<
double
>
doubleTween3
=
Tween
<
double
>(
begin:
33
,
end:
44
);
final
Tween
<
int
>
intTween
=
Tween
<
int
>(
begin:
33
,
end:
44
);
final
Tween
<
double
>
constantTween
=
ConstantTween
<
double
>(
10
);
expect
(
doubleTween1
==
doubleTween1
,
isTrue
);
expect
(
doubleTween1
==
doubleTween2
,
isTrue
);
expect
(
doubleTween2
==
doubleTween3
,
isFalse
);
expect
(
doubleTween2
==
intTween
,
isFalse
);
expect
(
doubleTween1
==
constantTween
,
isFalse
);
});
}
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