fix some stuff (maybe?)
This commit is contained in:
parent
a4d60e6c83
commit
3e82faeb86
10 changed files with 58 additions and 36 deletions
|
|
@ -4,9 +4,20 @@ part "full_room.freezed.dart";
|
|||
|
||||
@freezed
|
||||
abstract class FullRoom with _$FullRoom {
|
||||
const FullRoom._();
|
||||
const factory FullRoom({
|
||||
required Room roomData,
|
||||
required String title,
|
||||
required Uri? avatar,
|
||||
}) = _FullRoom;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
other.runtimeType == runtimeType &&
|
||||
other is FullRoom &&
|
||||
other.avatar == avatar &&
|
||||
other.title == title;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, title, avatar);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||
import "package:flutter/widgets.dart";
|
||||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
import "package:matrix/matrix.dart";
|
||||
|
|
@ -6,13 +7,26 @@ part "space.freezed.dart";
|
|||
|
||||
@freezed
|
||||
abstract class Space with _$Space {
|
||||
const Space._();
|
||||
const factory Space({
|
||||
required String title,
|
||||
required String id,
|
||||
required List<FullRoom> children,
|
||||
required IList<FullRoom> children,
|
||||
required Client client,
|
||||
Room? roomData,
|
||||
Uri? avatar,
|
||||
Icon? icon,
|
||||
}) = _Space;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
other.runtimeType == runtimeType &&
|
||||
other is Space &&
|
||||
other.title == title &&
|
||||
other.id == id &&
|
||||
other.icon == icon &&
|
||||
other.avatar == avatar;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, title, id, icon, avatar);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue