Fix up MediaQuery's operator= and hashCode
This commit is contained in:
@@ -62,7 +62,7 @@ class WidgetFlutterBinding extends BindingBase with Scheduler, Gesturer, Rendere
|
||||
void handleMetricsChanged() {
|
||||
super.handleMetricsChanged();
|
||||
for (BindingObserver observer in _observers)
|
||||
observer.didChangeMetrics(ui.window.size);
|
||||
observer.didChangeMetrics();
|
||||
}
|
||||
|
||||
void handleLocaleChanged() {
|
||||
|
||||
@@ -39,10 +39,15 @@ class MediaQueryData {
|
||||
return false;
|
||||
MediaQueryData typedOther = other;
|
||||
return typedOther.size == size
|
||||
&& typedOther.padding == padding;
|
||||
&& typedOther.padding == padding
|
||||
&& typedOther.devicePixelRatio == devicePixelRatio;
|
||||
}
|
||||
|
||||
int get hashCode => size.hashCode;
|
||||
int get hashCode => hashValues(
|
||||
size.hashCode,
|
||||
padding.hashCode,
|
||||
devicePixelRatio.hashCode
|
||||
);
|
||||
|
||||
String toString() => '$runtimeType($size, $orientation)';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user