refactor: Deprecations after dart upgrade

This commit is contained in:
Krille 2024-02-28 12:31:54 +01:00
parent af2215e6ef
commit 1b93471d64
No known key found for this signature in database
GPG Key ID: E067ECD60F1A0652
6 changed files with 10 additions and 6 deletions

View File

@ -1,2 +1,2 @@
flutter_version=3.10.6
dart_version=3.0.6
flutter_version=3.19.0
dart_version=3.3.0

View File

@ -44,7 +44,7 @@ class Receipt {
const Receipt(this.user, this.time);
@override
bool operator ==(dynamic other) => (other is Receipt &&
bool operator ==(Object other) => (other is Receipt &&
other.user == user &&
other.time.millisecondsSinceEpoch == time.millisecondsSinceEpoch);

View File

@ -2364,7 +2364,7 @@ class Room {
: setSpaceChild(roomId, via: const []);
@override
bool operator ==(dynamic other) => (other is Room && other.id == id);
bool operator ==(Object other) => (other is Room && other.id == id);
@override
int get hashCode => Object.hashAll([id]);

View File

@ -175,7 +175,7 @@ class User extends Event {
room.canChangePowerLevel && powerLevel < room.ownPowerLevel;
@override
bool operator ==(dynamic other) => (other is User &&
bool operator ==(Object other) => (other is User &&
other.id == id &&
other.room == room &&
other.membership == membership);

View File

@ -1,3 +1,7 @@
// ignore_for_file: deprecated_member_use
// ignoring the elementAt deprecation because this would make the SDK
// incompatible with older flutter versions than 3.19.0 or dart 3.3.0
import 'dart:async';
import 'dart:ffi';
import 'dart:typed_data';

View File

@ -354,7 +354,7 @@ abstract class SignableKey extends MatrixSignableKey {
String toString() => json.encode(toJson());
@override
bool operator ==(dynamic other) => (other is SignableKey &&
bool operator ==(Object other) => (other is SignableKey &&
other.userId == userId &&
other.identifier == identifier);