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
671aa9e9
Unverified
Commit
671aa9e9
authored
Mar 04, 2022
by
Viren Khatri
Committed by
GitHub
Mar 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
complete migration of flutter repo to Object.hash* (#99505)
parent
e047fe7f
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
25 additions
and
28 deletions
+25
-28
transformations_demo_board.dart
.../lib/demo/transformations/transformations_demo_board.dart
+1
-1
demo.dart
dev/integration_tests/flutter_gallery/lib/gallery/demo.dart
+1
-1
demos.dart
dev/integration_tests/flutter_gallery/lib/gallery/demos.dart
+1
-1
options.dart
...ntegration_tests/flutter_gallery/lib/gallery/options.dart
+1
-1
scales.dart
...integration_tests/flutter_gallery/lib/gallery/scales.dart
+2
-2
stack_trace.dart
dev/integration_tests/web/lib/stack_trace.dart
+4
-5
autocomplete.1.dart
examples/api/lib/material/autocomplete/autocomplete.1.dart
+1
-1
raw_autocomplete.1.dart
...ples/api/lib/widgets/autocomplete/raw_autocomplete.1.dart
+1
-1
README.md
packages/flutter/lib/src/foundation/README.md
+3
-3
expansion_tile_theme.dart
packages/flutter/lib/src/material/expansion_tile_theme.dart
+1
-1
basic_types.dart
packages/flutter/lib/src/painting/basic_types.dart
+2
-1
shortcuts.dart
packages/flutter/lib/src/widgets/shortcuts.dart
+1
-1
animated_icons_test.dart
packages/flutter/test/material/animated_icons_test.dart
+1
-1
flutter_goldens_test.dart
packages/flutter_goldens/test/flutter_goldens_test.dart
+1
-2
image.dart
packages/flutter_test/lib/src/image.dart
+1
-3
window.dart
packages/flutter_test/lib/src/window.dart
+1
-1
matchers_test.dart
packages/flutter_test/test/matchers_test.dart
+1
-1
update_packages.dart
packages/flutter_tools/lib/src/commands/update_packages.dart
+1
-1
No files found.
dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart
View file @
671aa9e9
...
...
@@ -275,7 +275,7 @@ class BoardPoint {
}
@override
int
get
hashCode
=>
hashValues
(
q
,
r
);
int
get
hashCode
=>
Object
.
hash
(
q
,
r
);
BoardPoint
copyWithColor
(
Color
nextColor
)
=>
BoardPoint
(
q
,
r
,
color:
nextColor
);
...
...
dev/integration_tests/flutter_gallery/lib/gallery/demo.dart
View file @
671aa9e9
...
...
@@ -37,7 +37,7 @@ class ComponentDemoTabData {
}
@override
int
get
hashCode
=>
hashValues
(
tabName
,
description
,
documentationUrl
);
int
get
hashCode
=>
Object
.
hash
(
tabName
,
description
,
documentationUrl
);
}
class
TabbedComponentDemoScaffold
extends
StatelessWidget
{
...
...
dev/integration_tests/flutter_gallery/lib/gallery/demos.dart
View file @
671aa9e9
...
...
@@ -29,7 +29,7 @@ class GalleryDemoCategory {
}
@override
int
get
hashCode
=>
hashValues
(
name
,
icon
);
int
get
hashCode
=>
Object
.
hash
(
name
,
icon
);
@override
String
toString
()
{
...
...
dev/integration_tests/flutter_gallery/lib/gallery/options.dart
View file @
671aa9e9
...
...
@@ -71,7 +71,7 @@ class GalleryOptions {
}
@override
int
get
hashCode
=>
hashValues
(
int
get
hashCode
=>
Object
.
hash
(
themeMode
,
textScaleFactor
,
visualDensity
,
...
...
dev/integration_tests/flutter_gallery/lib/gallery/scales.dart
View file @
671aa9e9
...
...
@@ -21,7 +21,7 @@ class GalleryTextScaleValue {
}
@override
int
get
hashCode
=>
hashValues
(
scale
,
label
);
int
get
hashCode
=>
Object
.
hash
(
scale
,
label
);
@override
String
toString
()
{
...
...
@@ -55,7 +55,7 @@ class GalleryVisualDensityValue {
}
@override
int
get
hashCode
=>
hashValues
(
visualDensity
,
label
);
int
get
hashCode
=>
Object
.
hash
(
visualDensity
,
label
);
@override
String
toString
()
{
...
...
dev/integration_tests/web/lib/stack_trace.dart
View file @
671aa9e9
...
...
@@ -3,7 +3,6 @@
// found in the LICENSE file.
import
'dart:html'
as
html
;
import
'dart:ui'
;
import
'package:collection/collection.dart'
;
import
'package:flutter/foundation.dart'
;
...
...
@@ -33,7 +32,7 @@ const List<StackFrame> expectedDebugStackFrames = <StackFrame>[
packageScheme:
'package'
,
package:
'packages'
,
packagePath:
'web_integration/stack_trace.dart'
,
line:
1
20
,
line:
1
19
,
column:
3
,
className:
'<unknown>'
,
method:
'baz'
,
...
...
@@ -44,7 +43,7 @@ const List<StackFrame> expectedDebugStackFrames = <StackFrame>[
packageScheme:
'package'
,
package:
'packages'
,
packagePath:
'web_integration/stack_trace.dart'
,
line:
11
5
,
line:
11
4
,
column:
3
,
className:
'<unknown>'
,
method:
'bar'
,
...
...
@@ -55,7 +54,7 @@ const List<StackFrame> expectedDebugStackFrames = <StackFrame>[
packageScheme:
'package'
,
package:
'packages'
,
packagePath:
'web_integration/stack_trace.dart'
,
line:
1
10
,
line:
1
09
,
column:
3
,
className:
'<unknown>'
,
method:
'foo'
,
...
...
@@ -154,7 +153,7 @@ class StackFrameEquality implements Equality<StackFrame> {
// TODO(dnfield): This ignore shouldn't be necessary, see https://github.com/dart-lang/sdk/issues/46477
@override
int
hash
(
StackFrame
e
)
{
// ignore: avoid_renaming_method_parameters
return
hashValues
(
e
.
number
,
e
.
packageScheme
,
e
.
package
,
e
.
packagePath
,
e
.
line
,
e
.
column
,
e
.
className
,
e
.
method
);
return
Object
.
hash
(
e
.
number
,
e
.
packageScheme
,
e
.
package
,
e
.
packagePath
,
e
.
line
,
e
.
column
,
e
.
className
,
e
.
method
);
}
@override
...
...
examples/api/lib/material/autocomplete/autocomplete.1.dart
View file @
671aa9e9
...
...
@@ -50,7 +50,7 @@ class User {
}
@override
int
get
hashCode
=>
hashValues
(
email
,
name
);
int
get
hashCode
=>
Object
.
hash
(
email
,
name
);
}
class
AutocompleteBasicUserExample
extends
StatelessWidget
{
...
...
examples/api/lib/widgets/autocomplete/raw_autocomplete.1.dart
View file @
671aa9e9
...
...
@@ -52,7 +52,7 @@ class User {
}
@override
int
get
hashCode
=>
hashValues
(
email
,
name
);
int
get
hashCode
=>
Object
.
hash
(
email
,
name
);
}
class
AutocompleteCustomTypeExample
extends
StatelessWidget
{
...
...
packages/flutter/lib/src/foundation/README.md
View file @
671aa9e9
...
...
@@ -3,9 +3,9 @@ nothing but core Dart packages. They can't depend on `dart:ui`, they
can't depend on any
`package:`
, and they can't depend on anything
outside this directory.
Currently they do depend on dart:ui, but only for
`VoidCallback`
and
`hashValues`
(and maybe one day
`hashList`
and
`lerpDouble`
), which
are all intended to be moved out
of
`dart:ui`
and into
`dart:core`
.
Currently they do depend on dart:ui, but only for
`VoidCallback`
(
and
maybe one day
`lerpDouble`
), which are all intended to be moved out
of
`dart:ui`
and into
`dart:core`
.
There is currently also an unfortunate dependency on the platform
dispatcher logic (SingletonFlutterWindow, Brightness,
...
...
packages/flutter/lib/src/material/expansion_tile_theme.dart
View file @
671aa9e9
...
...
@@ -123,7 +123,7 @@ class ExpansionTileThemeData with Diagnosticable {
@override
int
get
hashCode
{
return
hashValues
(
return
Object
.
hash
(
backgroundColor
,
collapsedBackgroundColor
,
tilePadding
,
...
...
packages/flutter/lib/src/painting/basic_types.dart
View file @
671aa9e9
...
...
@@ -41,7 +41,8 @@ export 'dart:ui' show
TextPosition
,
TileMode
,
VertexMode
,
// TODO(werainkhatri): remove these after all the dependencies are migrated
// TODO(werainkhatri): remove these after their deprecation period in engine
// https://github.com/flutter/flutter/pull/99505
hashValues
,
hashList
;
...
...
packages/flutter/lib/src/widgets/shortcuts.dart
View file @
671aa9e9
...
...
@@ -121,7 +121,7 @@ class KeySet<T extends KeyboardKey> {
:
Object
.
hash
(
h2
,
h1
);
}
// Sort key hash codes and feed to
hashList
to ensure the aggregate
// Sort key hash codes and feed to
Object.hashAll
to ensure the aggregate
// hash code does not depend on the key order.
final
List
<
int
>
sortedHashes
=
length
==
3
?
_tempHashStore3
...
...
packages/flutter/test/material/animated_icons_test.dart
View file @
671aa9e9
...
...
@@ -90,7 +90,7 @@ class RecordedScale extends RecordedCanvasCall {
}
@override
int
get
hashCode
=>
hashValues
(
sx
,
sy
);
int
get
hashCode
=>
Object
.
hash
(
sx
,
sy
);
}
void
main
(
)
{
...
...
packages/flutter_goldens/test/flutter_goldens_test.dart
View file @
671aa9e9
...
...
@@ -8,7 +8,6 @@ import 'dart:async';
import
'dart:convert'
;
import
'dart:io'
hide
Directory
;
import
'dart:typed_data'
;
import
'dart:ui'
show
hashValues
,
hashList
;
import
'package:file/file.dart'
;
import
'package:file/memory.dart'
;
...
...
@@ -873,7 +872,7 @@ class RunInvocation {
final
String
?
workingDirectory
;
@override
int
get
hashCode
=>
hashValues
(
hashList
(
command
),
workingDirectory
);
int
get
hashCode
=>
Object
.
hash
(
Object
.
hashAll
(
command
),
workingDirectory
);
bool
_commandEquals
(
List
<
String
>
other
)
{
if
(
other
==
command
)
{
...
...
packages/flutter_test/lib/src/image.dart
View file @
671aa9e9
...
...
@@ -6,8 +6,6 @@ import 'dart:async';
import
'dart:typed_data'
;
import
'dart:ui'
as
ui
;
import
'package:flutter/painting.dart'
;
import
'test_async_utils.dart'
;
final
Map
<
int
,
ui
.
Image
>
_cache
=
<
int
,
ui
.
Image
>{};
...
...
@@ -35,7 +33,7 @@ Future<ui.Image> createTestImage({
assert
(
height
!=
null
&&
height
>
0
);
assert
(
cache
!=
null
);
final
int
cacheKey
=
hashValues
(
width
,
height
);
final
int
cacheKey
=
Object
.
hash
(
width
,
height
);
if
(
cache
&&
_cache
.
containsKey
(
cacheKey
))
{
return
_cache
[
cacheKey
]!.
clone
();
}
...
...
packages/flutter_test/lib/src/window.dart
View file @
671aa9e9
...
...
@@ -581,7 +581,7 @@ class FakeAccessibilityFeatures implements ui.AccessibilityFeatures {
}
@override
int
get
hashCode
=>
ui
.
hashValues
(
accessibleNavigation
,
invertColors
,
disableAnimations
,
boldText
,
reduceMotion
,
highContrast
);
int
get
hashCode
=>
Object
.
hash
(
accessibleNavigation
,
invertColors
,
disableAnimations
,
boldText
,
reduceMotion
,
highContrast
);
/// This gives us some grace time when the dart:ui side adds something to
/// [AccessibilityFeatures], and makes things easier when we do rolls to
...
...
packages/flutter_test/test/matchers_test.dart
View file @
671aa9e9
...
...
@@ -738,5 +738,5 @@ class _CustomColor extends Color {
bool
operator
==(
Object
other
)
=>
isEqual
??
super
==
other
;
@override
int
get
hashCode
=>
hashValues
(
super
.
hashCode
,
isEqual
);
int
get
hashCode
=>
Object
.
hash
(
super
.
hashCode
,
isEqual
);
}
packages/flutter_tools/lib/src/commands/update_packages.dart
View file @
671aa9e9
...
...
@@ -1066,7 +1066,7 @@ class PubspecLine {
class
PubspecChecksum
extends
PubspecLine
{
PubspecChecksum
(
this
.
value
,
String
line
)
:
super
(
line
);
/// The checksum value, computed using [
hashValues
] over the direct, dev,
/// The checksum value, computed using [
Object.hash
] over the direct, dev,
/// and special dependencies sorted lexically.
///
/// If the line cannot be parsed, [value] will be null.
...
...
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