fix some stuff (maybe?)

This commit is contained in:
Henry Hiles 2025-12-04 12:23:08 -05:00
commit 3e82faeb86
No known key found for this signature in database
10 changed files with 58 additions and 36 deletions

View file

@ -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);
}

View file

@ -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);
}