✨ Joindable chat, detailed realms, discovery mixed into explore
🐛 bunch of bugs fixes
This commit is contained in:
@ -13,8 +13,8 @@ sealed class SnChatRoom with _$SnChatRoom {
|
||||
required String? name,
|
||||
required String? description,
|
||||
required int type,
|
||||
required bool isPublic,
|
||||
required bool isCommunity,
|
||||
@Default(false) bool isPublic,
|
||||
@Default(false) bool isCommunity,
|
||||
required SnCloudFile? picture,
|
||||
required SnCloudFile? background,
|
||||
required String? realmId,
|
||||
|
@ -129,15 +129,15 @@ $SnRealmCopyWith<$Res>? get realm {
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnChatRoom implements SnChatRoom {
|
||||
const _SnChatRoom({required this.id, required this.name, required this.description, required this.type, required this.isPublic, required this.isCommunity, required this.picture, required this.background, required this.realmId, required this.realm, required this.createdAt, required this.updatedAt, required this.deletedAt, required final List<SnChatMember>? members}): _members = members;
|
||||
const _SnChatRoom({required this.id, required this.name, required this.description, required this.type, this.isPublic = false, this.isCommunity = false, required this.picture, required this.background, required this.realmId, required this.realm, required this.createdAt, required this.updatedAt, required this.deletedAt, required final List<SnChatMember>? members}): _members = members;
|
||||
factory _SnChatRoom.fromJson(Map<String, dynamic> json) => _$SnChatRoomFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String? name;
|
||||
@override final String? description;
|
||||
@override final int type;
|
||||
@override final bool isPublic;
|
||||
@override final bool isCommunity;
|
||||
@override@JsonKey() final bool isPublic;
|
||||
@override@JsonKey() final bool isCommunity;
|
||||
@override final SnCloudFile? picture;
|
||||
@override final SnCloudFile? background;
|
||||
@override final String? realmId;
|
||||
|
@ -11,8 +11,8 @@ _SnChatRoom _$SnChatRoomFromJson(Map<String, dynamic> json) => _SnChatRoom(
|
||||
name: json['name'] as String?,
|
||||
description: json['description'] as String?,
|
||||
type: (json['type'] as num).toInt(),
|
||||
isPublic: json['is_public'] as bool,
|
||||
isCommunity: json['is_community'] as bool,
|
||||
isPublic: json['is_public'] as bool? ?? false,
|
||||
isCommunity: json['is_community'] as bool? ?? false,
|
||||
picture:
|
||||
json['picture'] == null
|
||||
? null
|
||||
|
@ -10,7 +10,7 @@ sealed class SnRealm with _$SnRealm {
|
||||
const factory SnRealm({
|
||||
required String id,
|
||||
required String slug,
|
||||
required String name,
|
||||
@Default('') String name,
|
||||
@Default('') String description,
|
||||
required String? verifiedAs,
|
||||
required DateTime? verifiedAt,
|
||||
|
@ -117,12 +117,12 @@ $SnCloudFileCopyWith<$Res>? get background {
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnRealm implements SnRealm {
|
||||
const _SnRealm({required this.id, required this.slug, required this.name, this.description = '', required this.verifiedAs, required this.verifiedAt, required this.isCommunity, required this.isPublic, required this.picture, required this.background, required this.accountId, required this.createdAt, required this.updatedAt, required this.deletedAt});
|
||||
const _SnRealm({required this.id, required this.slug, this.name = '', this.description = '', required this.verifiedAs, required this.verifiedAt, required this.isCommunity, required this.isPublic, required this.picture, required this.background, required this.accountId, required this.createdAt, required this.updatedAt, required this.deletedAt});
|
||||
factory _SnRealm.fromJson(Map<String, dynamic> json) => _$SnRealmFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String slug;
|
||||
@override final String name;
|
||||
@override@JsonKey() final String name;
|
||||
@override@JsonKey() final String description;
|
||||
@override final String? verifiedAs;
|
||||
@override final DateTime? verifiedAt;
|
||||
|
@ -9,7 +9,7 @@ part of 'realm.dart';
|
||||
_SnRealm _$SnRealmFromJson(Map<String, dynamic> json) => _SnRealm(
|
||||
id: json['id'] as String,
|
||||
slug: json['slug'] as String,
|
||||
name: json['name'] as String,
|
||||
name: json['name'] as String? ?? '',
|
||||
description: json['description'] as String? ?? '',
|
||||
verifiedAs: json['verified_as'] as String?,
|
||||
verifiedAt:
|
||||
|
Reference in New Issue
Block a user