complete migration of flutter repo to Object.hash* (#99505)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user