1
0
Fork 0
forked from Nexus/nexus

Remove flutter chat (#26)

Had to squash merge manually as Forgejo was erroring
This commit is contained in:
Henry Hiles 2026-05-21 16:58:22 -04:00
commit 16cf126df4
111 changed files with 3162 additions and 2366 deletions

View file

@ -12,18 +12,28 @@ Object? readTimezone(Map<dynamic, dynamic> map, _) =>
@freezed
abstract class Profile with _$Profile {
const factory Profile({
String? avatarUrl,
required String id,
String? parseError,
Uri? avatarUrl,
@JsonKey(name: "displayname") String? displayName,
@JsonKey(readValue: readTimezone) String? timezone,
@JsonKey(readValue: readTimezone, name: "m.tz") String? timezone,
@Default(IList.empty())
@JsonKey(readValue: readPronouns)
@JsonKey(readValue: readPronouns, name: "io.fsky.nyx.pronouns")
IList<Pronoun> pronouns,
}) = _Profile;
factory Profile.fromJson(Map<String, Object?> json) =>
factory Profile.fromJson(Map<String, dynamic> json) =>
_$ProfileFromJson(json);
factory Profile.fromJsonWithCatch(Map<String, dynamic> json) {
try {
return Profile.fromJson(json);
} catch (error) {
return Profile(id: json["id"], parseError: error.toString());
}
}
}
@freezed