fix freezed definitions
This commit is contained in:
parent
baad7b08a8
commit
78744135c9
51 changed files with 540 additions and 320 deletions
|
|
@ -2,6 +2,7 @@ analyzer:
|
||||||
errors:
|
errors:
|
||||||
invalid_annotation_target: ignore
|
invalid_annotation_target: ignore
|
||||||
avoid_print: ignore
|
avoid_print: ignore
|
||||||
|
annotate_overrides: ignore
|
||||||
exclude:
|
exclude:
|
||||||
- "build/**"
|
- "build/**"
|
||||||
- "**/*.g.dart"
|
- "**/*.g.dart"
|
||||||
|
|
|
||||||
|
|
@ -5,20 +5,21 @@ part "account_data.freezed.dart";
|
||||||
part "account_data.g.dart";
|
part "account_data.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const AccountData({
|
@JsonSerializable()
|
||||||
|
class const AccountData({
|
||||||
@JsonKey(name: AccountData.invitePermissionConfigKey)
|
@JsonKey(name: AccountData.invitePermissionConfigKey)
|
||||||
InvitePermissionConfig invitePermissionConfig =
|
final InvitePermissionConfig invitePermissionConfig =
|
||||||
const _InvitePermissionConfig(),
|
const _InvitePermissionConfig(),
|
||||||
|
|
||||||
@JsonKey(name: AccountData.directKey)
|
@JsonKey(name: AccountData.directKey)
|
||||||
IMap<String, IList<String>> directMessages = const IMap.empty(),
|
final IMap<String, IList<String>> directMessages = const IMap.empty(),
|
||||||
|
|
||||||
@JsonKey(
|
@JsonKey(
|
||||||
name: AccountData.recentEmojiKey,
|
name: AccountData.recentEmojiKey,
|
||||||
readValue: AccountData.readRecentEmojiValue,
|
readValue: AccountData.readRecentEmojiValue,
|
||||||
toJson: AccountData.recentEmojiToJson,
|
toJson: AccountData.recentEmojiToJson,
|
||||||
)
|
)
|
||||||
IList<RecentEmoji> recentEmoji = const IList.empty(),
|
final IList<RecentEmoji> recentEmoji = const IList.empty(),
|
||||||
}) with _$AccountData {
|
}) with _$AccountData {
|
||||||
static List<dynamic>? readRecentEmojiValue(
|
static List<dynamic>? readRecentEmojiValue(
|
||||||
Map<dynamic, dynamic> json,
|
Map<dynamic, dynamic> json,
|
||||||
|
|
@ -33,22 +34,33 @@ sealed class const AccountData({
|
||||||
static const directKey = "m.direct";
|
static const directKey = "m.direct";
|
||||||
static const recentEmojiKey = "m.recent_emoji";
|
static const recentEmojiKey = "m.recent_emoji";
|
||||||
|
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$AccountDataToJson(this);
|
||||||
|
|
||||||
factory AccountData.fromJson(Map<String, Object?> json) =>
|
factory AccountData.fromJson(Map<String, Object?> json) =>
|
||||||
_$AccountDataFromJson(json);
|
_$AccountDataFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const InvitePermissionConfig({
|
@JsonSerializable()
|
||||||
|
class const InvitePermissionConfig({
|
||||||
@JsonKey(unknownEnumValue: DefaultInviteAction.allow)
|
@JsonKey(unknownEnumValue: DefaultInviteAction.allow)
|
||||||
DefaultInviteAction defaultAction = DefaultInviteAction.allow,
|
final DefaultInviteAction defaultAction = DefaultInviteAction.allow,
|
||||||
}) with _$InvitePermissionConfig {
|
}) with _$InvitePermissionConfig {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$InvitePermissionConfigToJson(this);
|
||||||
|
|
||||||
factory InvitePermissionConfig.fromJson(Map<String, Object?> json) =>
|
factory InvitePermissionConfig.fromJson(Map<String, Object?> json) =>
|
||||||
_$InvitePermissionConfigFromJson(json);
|
_$InvitePermissionConfigFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const RecentEmoji({required String emoji, required int total})
|
@JsonSerializable()
|
||||||
|
class const RecentEmoji({required final String emoji, required final int total})
|
||||||
with _$RecentEmoji {
|
with _$RecentEmoji {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$RecentEmojiToJson(this);
|
||||||
|
|
||||||
factory RecentEmoji.fromJson(Map<String, Object?> json) =>
|
factory RecentEmoji.fromJson(Map<String, Object?> json) =>
|
||||||
_$RecentEmojiFromJson(json);
|
_$RecentEmojiFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,17 @@ part "client_state.freezed.dart";
|
||||||
part "client_state.g.dart";
|
part "client_state.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const ClientState({
|
@JsonSerializable()
|
||||||
required bool isInitialized,
|
class const ClientState({
|
||||||
required bool isLoggedIn,
|
required final bool isInitialized,
|
||||||
required bool isVerified,
|
required final bool isLoggedIn,
|
||||||
required String? userId,
|
required final bool isVerified,
|
||||||
required String? homeserverUrl,
|
required final String? userId,
|
||||||
|
required final String? homeserverUrl,
|
||||||
}) with _$ClientState {
|
}) with _$ClientState {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$ClientStateToJson(this);
|
||||||
|
|
||||||
factory ClientState.fromJson(Map<String, Object?> json) =>
|
factory ClientState.fromJson(Map<String, Object?> json) =>
|
||||||
_$ClientStateFromJson(json);
|
_$ClientStateFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,14 @@ part "members_by_status.freezed.dart";
|
||||||
part "members_by_status.g.dart";
|
part "members_by_status.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const MembersByStatusConfig({
|
@JsonSerializable()
|
||||||
required String roomId,
|
class const MembersByStatusConfig({
|
||||||
required MembershipStatus status,
|
required final String roomId,
|
||||||
|
required final MembershipStatus status,
|
||||||
}) with _$MembersByStatusConfig {
|
}) with _$MembersByStatusConfig {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$MembersByStatusConfigToJson(this);
|
||||||
|
|
||||||
factory MembersByStatusConfig.fromJson(Map<String, Object?> json) =>
|
factory MembersByStatusConfig.fromJson(Map<String, Object?> json) =>
|
||||||
_$MembersByStatusConfigFromJson(json);
|
_$MembersByStatusConfigFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,14 @@ part "reactions.freezed.dart";
|
||||||
part "reactions.g.dart";
|
part "reactions.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const ReactionsConfig({
|
@JsonSerializable()
|
||||||
required String roomId,
|
class const ReactionsConfig({
|
||||||
required int eventRowId,
|
required final String roomId,
|
||||||
|
required final int eventRowId,
|
||||||
}) with _$ReactionsConfig {
|
}) with _$ReactionsConfig {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$ReactionsConfigToJson(this);
|
||||||
|
|
||||||
factory ReactionsConfig.fromJson(Map<String, Object?> json) =>
|
factory ReactionsConfig.fromJson(Map<String, Object?> json) =>
|
||||||
_$ReactionsConfigFromJson(json);
|
_$ReactionsConfigFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,12 @@ part "user.freezed.dart";
|
||||||
part "user.g.dart";
|
part "user.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const UserConfig({String? roomId, required String userId})
|
@JsonSerializable()
|
||||||
|
class const UserConfig({final String? roomId, required final String userId})
|
||||||
with _$UserConfig {
|
with _$UserConfig {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$UserConfigToJson(this);
|
||||||
|
|
||||||
factory UserConfig.fromJson(Map<String, Object?> json) =>
|
factory UserConfig.fromJson(Map<String, Object?> json) =>
|
||||||
_$UserConfigFromJson(json);
|
_$UserConfigFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,11 @@ enum RoomType {
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const PreviousRoom({required String roomId}) with _$PreviousRoom {
|
@JsonSerializable()
|
||||||
|
class const PreviousRoom({required final String roomId}) with _$PreviousRoom {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$PreviousRoomToJson(this);
|
||||||
|
|
||||||
factory PreviousRoom.fromJson(Map<String, Object?> json) =>
|
factory PreviousRoom.fromJson(Map<String, Object?> json) =>
|
||||||
_$PreviousRoomFromJson(json);
|
_$PreviousRoomFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,14 @@ sealed class JoinRulesContent extends Content with _$JoinRulesContent {
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const AllowCondition({
|
@JsonSerializable()
|
||||||
String? roomId,
|
class const AllowCondition({
|
||||||
required AllowConditionType type,
|
final String? roomId,
|
||||||
|
required final AllowConditionType type,
|
||||||
}) with _$AllowCondition {
|
}) with _$AllowCondition {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$AllowConditionToJson(this);
|
||||||
|
|
||||||
factory AllowCondition.fromJson(Map<String, Object?> json) =>
|
factory AllowCondition.fromJson(Map<String, Object?> json) =>
|
||||||
_$AllowConditionFromJson(json);
|
_$AllowConditionFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,14 @@ sealed class PowerLevelsContent extends Content with _$PowerLevelsContent {
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const Notifications({
|
@JsonSerializable()
|
||||||
int room = 50,
|
class const Notifications({
|
||||||
IMap<String, int> other = const IMap.empty(),
|
final int room = 50,
|
||||||
|
final IMap<String, int> other = const IMap.empty(),
|
||||||
}) with _$Notifications {
|
}) with _$Notifications {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$NotificationsToJson(this);
|
||||||
|
|
||||||
factory Notifications.fromJson(Map<String, Object?> json) =>
|
factory Notifications.fromJson(Map<String, Object?> json) =>
|
||||||
_$NotificationsFromJson(json);
|
_$NotificationsFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,18 +18,26 @@ sealed class TopicContent extends Content with _$TopicContent {
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const TopicContentBlock({
|
@JsonSerializable()
|
||||||
IList<TextualRepresentation> representations = const IList.empty(),
|
class const TopicContentBlock({
|
||||||
|
final IList<TextualRepresentation> representations = const IList.empty(),
|
||||||
}) with _$TopicContentBlock {
|
}) with _$TopicContentBlock {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$TopicContentBlockToJson(this);
|
||||||
|
|
||||||
factory TopicContentBlock.fromJson(Map<String, Object?> json) =>
|
factory TopicContentBlock.fromJson(Map<String, Object?> json) =>
|
||||||
_$TopicContentBlockFromJson(json);
|
_$TopicContentBlockFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const TextualRepresentation({
|
@JsonSerializable()
|
||||||
required String body,
|
class const TextualRepresentation({
|
||||||
String mimetype = "text/plain",
|
required final String body,
|
||||||
|
final String mimetype = "text/plain",
|
||||||
}) with _$TextualRepresentation {
|
}) with _$TextualRepresentation {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$TextualRepresentationToJson(this);
|
||||||
|
|
||||||
factory TextualRepresentation.fromJson(Map<String, Object?> json) =>
|
factory TextualRepresentation.fromJson(Map<String, Object?> json) =>
|
||||||
_$TextualRepresentationFromJson(json);
|
_$TextualRepresentationFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,31 +8,35 @@ part "event.freezed.dart";
|
||||||
part "event.g.dart";
|
part "event.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const Event({
|
@JsonSerializable()
|
||||||
@JsonKey(name: "rowid") required int rowId,
|
class const Event({
|
||||||
@JsonKey(name: "timeline_rowid") required int timelineRowId,
|
@JsonKey(name: "rowid") required final int rowId,
|
||||||
required String roomId,
|
@JsonKey(name: "timeline_rowid") required final int timelineRowId,
|
||||||
required String eventId,
|
final String? stateKey,
|
||||||
required String sender,
|
required final String roomId,
|
||||||
@JsonKey(readValue: Event.typeJsonFromJson) required String type,
|
required final String eventId,
|
||||||
String? stateKey,
|
required final String sender,
|
||||||
@EpochDateTimeConverter() required DateTime timestamp,
|
@JsonKey(readValue: Event.typeJsonFromJson) required final String type,
|
||||||
IMap<String, dynamic> unsigned = const IMap.empty(),
|
@EpochDateTimeConverter() @override required final DateTime timestamp,
|
||||||
LocalContent? localContent,
|
final IMap<String, dynamic> unsigned = const IMap.empty(),
|
||||||
String? transactionId,
|
final LocalContent? localContent,
|
||||||
String? redactedBy,
|
final String? transactionId,
|
||||||
String? relatesTo,
|
final String? redactedBy,
|
||||||
String? relationType,
|
final String? relatesTo,
|
||||||
String? replyTo,
|
final String? relationType,
|
||||||
String? decryptionError,
|
final String? replyTo,
|
||||||
String? sendError,
|
final String? decryptionError,
|
||||||
IMap<String, int> reactions = const IMap.empty(),
|
final String? sendError,
|
||||||
@JsonKey(name: "last_edit_rowid") int lastEditRowId = 0,
|
final IMap<String, int> reactions = const IMap.empty(),
|
||||||
@UnreadTypeConverter() UnreadType? unreadType,
|
@JsonKey(name: "last_edit_rowid") @override final int lastEditRowId = 0,
|
||||||
Profile? pmp,
|
@UnreadTypeConverter() @override final UnreadType? unreadType,
|
||||||
required Content content,
|
final Profile? pmp,
|
||||||
required Content? previousContent,
|
required final Content content,
|
||||||
|
required final Content? previousContent,
|
||||||
}) with _$Event {
|
}) with _$Event {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$EventToJson(this);
|
||||||
|
|
||||||
static String typeJsonFromJson(Map<dynamic, dynamic> json, _) =>
|
static String typeJsonFromJson(Map<dynamic, dynamic> json, _) =>
|
||||||
json["decrypted_type"] ?? json["type"];
|
json["decrypted_type"] ?? json["type"];
|
||||||
|
|
||||||
|
|
@ -72,14 +76,19 @@ sealed class const Event({
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const LocalContent({
|
@JsonSerializable()
|
||||||
String? sanitizedHtml,
|
class const LocalContent({
|
||||||
String? editSource,
|
final String? sanitizedHtml,
|
||||||
bool? wasPlaintext,
|
final String? editSource,
|
||||||
bool? bigEmoji,
|
final bool? wasPlaintext,
|
||||||
bool? hasMath,
|
final bool? bigEmoji,
|
||||||
bool? replyFallbackRemoved,
|
final bool? hasMath,
|
||||||
|
final bool? replyFallbackRemoved,
|
||||||
}) with _$LocalContent {
|
}) with _$LocalContent {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$LocalContentToJson(this);
|
||||||
|
|
||||||
|
@override
|
||||||
factory LocalContent.fromJson(Map<String, Object?> json) =>
|
factory LocalContent.fromJson(Map<String, Object?> json) =>
|
||||||
_$LocalContentFromJson(json);
|
_$LocalContentFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ import "package:freezed_annotation/freezed_annotation.dart";
|
||||||
part "homeserver.freezed.dart";
|
part "homeserver.freezed.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const Homeserver({
|
class const Homeserver({
|
||||||
required String name,
|
@override required final String name,
|
||||||
required String description,
|
@override required final String description,
|
||||||
required Uri url,
|
@override required final Uri url,
|
||||||
required String iconUrl,
|
@override required final String iconUrl,
|
||||||
}) with _$Homeserver;
|
}) with _$Homeserver;
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,15 @@ part "audio.freezed.dart";
|
||||||
part "audio.g.dart";
|
part "audio.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const AudioInfo({
|
@JsonSerializable()
|
||||||
@MSDuration() Duration? duration,
|
class const AudioInfo({
|
||||||
@JsonKey(name: "mimetype") String? mimeType,
|
@MSDuration() final Duration? duration,
|
||||||
int? size,
|
@JsonKey(name: "mimetype") final String? mimeType,
|
||||||
|
final int? size,
|
||||||
}) with _$AudioInfo {
|
}) with _$AudioInfo {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$AudioInfoToJson(this);
|
||||||
|
|
||||||
factory AudioInfo.fromJson(Map<String, Object?> json) =>
|
factory AudioInfo.fromJson(Map<String, Object?> json) =>
|
||||||
_$AudioInfoFromJson(json);
|
_$AudioInfoFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,14 @@ part "file.freezed.dart";
|
||||||
part "file.g.dart";
|
part "file.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const FileInfo({
|
@JsonSerializable()
|
||||||
@JsonKey(name: "mimetype") String? mimeType,
|
class const FileInfo({
|
||||||
int? size,
|
@JsonKey(name: "mimetype") final String? mimeType,
|
||||||
|
final int? size,
|
||||||
}) with _$FileInfo {
|
}) with _$FileInfo {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$FileInfoToJson(this);
|
||||||
|
|
||||||
factory FileInfo.fromJson(Map<String, Object?> json) =>
|
factory FileInfo.fromJson(Map<String, Object?> json) =>
|
||||||
_$FileInfoFromJson(json);
|
_$FileInfoFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,17 @@ part "image.freezed.dart";
|
||||||
part "image.g.dart";
|
part "image.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const ImageInfo({
|
@JsonSerializable()
|
||||||
@JsonKey(name: "h") double? height,
|
class const ImageInfo({
|
||||||
@JsonKey(name: "w") double? width,
|
@JsonKey(name: "h") final double? height,
|
||||||
@JsonKey(name: "mimetype") String? mimeType,
|
@JsonKey(name: "w") final double? width,
|
||||||
@JsonKey(name: "xyz.amorgan.blurhash") String? blurHash,
|
@JsonKey(name: "mimetype") final String? mimeType,
|
||||||
int? size,
|
@JsonKey(name: "xyz.amorgan.blurhash") final String? blurHash,
|
||||||
|
final int? size,
|
||||||
}) with _$ImageInfo {
|
}) with _$ImageInfo {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$ImageInfoToJson(this);
|
||||||
|
|
||||||
factory ImageInfo.fromJson(Map<String, Object?> json) =>
|
factory ImageInfo.fromJson(Map<String, Object?> json) =>
|
||||||
_$ImageInfoFromJson(json);
|
_$ImageInfoFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,17 @@ part "video.freezed.dart";
|
||||||
part "video.g.dart";
|
part "video.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const VideoInfo({
|
@JsonSerializable()
|
||||||
@JsonKey(name: "h") int? height,
|
class const VideoInfo({
|
||||||
@JsonKey(name: "w") int? width,
|
@JsonKey(name: "h") final int? height,
|
||||||
@JsonKey(name: "mimetype") String? mimeType,
|
@JsonKey(name: "w") final int? width,
|
||||||
@MSDuration() Duration? duration,
|
@JsonKey(name: "mimetype") final String? mimeType,
|
||||||
int? size,
|
@MSDuration() final Duration? duration,
|
||||||
|
final int? size,
|
||||||
}) with _$VideoInfo {
|
}) with _$VideoInfo {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$VideoInfoToJson(this);
|
||||||
|
|
||||||
factory VideoInfo.fromJson(Map<String, Object?> json) =>
|
factory VideoInfo.fromJson(Map<String, Object?> json) =>
|
||||||
_$VideoInfoFromJson(json);
|
_$VideoInfoFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,15 @@ part "lazy_load_summary.freezed.dart";
|
||||||
part "lazy_load_summary.g.dart";
|
part "lazy_load_summary.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const LazyLoadSummary({
|
@JsonSerializable()
|
||||||
required IList<String>? heroes,
|
class const LazyLoadSummary({
|
||||||
required int? joinedMemberCount,
|
required final IList<String>? heroes,
|
||||||
required int? invitedMemberCount,
|
required final int? joinedMemberCount,
|
||||||
|
required final int? invitedMemberCount,
|
||||||
}) with _$LazyLoadSummary {
|
}) with _$LazyLoadSummary {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$LazyLoadSummaryToJson(this);
|
||||||
|
|
||||||
factory LazyLoadSummary.fromJson(Map<String, Object?> json) =>
|
factory LazyLoadSummary.fromJson(Map<String, Object?> json) =>
|
||||||
_$LazyLoadSummaryFromJson(json);
|
_$LazyLoadSummaryFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,15 @@ part "oauth_auth_code_response.freezed.dart";
|
||||||
part "oauth_auth_code_response.g.dart";
|
part "oauth_auth_code_response.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const OAuthAuthCodeResponse({
|
@JsonSerializable()
|
||||||
required String state,
|
class const OAuthAuthCodeResponse({
|
||||||
required String codeVerifier,
|
required final String state,
|
||||||
required Uri url,
|
required final String codeVerifier,
|
||||||
|
required final Uri url,
|
||||||
}) with _$OAuthAuthCodeResponse {
|
}) with _$OAuthAuthCodeResponse {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$OAuthAuthCodeResponseToJson(this);
|
||||||
|
|
||||||
factory OAuthAuthCodeResponse.fromJson(Map<String, Object?> json) =>
|
factory OAuthAuthCodeResponse.fromJson(Map<String, Object?> json) =>
|
||||||
_$OAuthAuthCodeResponseFromJson(json);
|
_$OAuthAuthCodeResponseFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,17 @@ part "open_graph_data.freezed.dart";
|
||||||
part "open_graph_data.g.dart";
|
part "open_graph_data.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const OpenGraphData({
|
@JsonSerializable()
|
||||||
@JsonKey(name: "og:title") required String? title,
|
class const OpenGraphData({
|
||||||
@JsonKey(name: "og:description") required String? description,
|
@JsonKey(name: "og:title") required final String? title,
|
||||||
@JsonKey(name: "og:image") required Uri? imageUrl,
|
@JsonKey(name: "og:description") required final String? description,
|
||||||
@JsonKey(name: "og:image:width") required double? width,
|
@JsonKey(name: "og:image") required final Uri? imageUrl,
|
||||||
@JsonKey(name: "og:image:height") required double? height,
|
@JsonKey(name: "og:image:width") required final double? width,
|
||||||
|
@JsonKey(name: "og:image:height") required final double? height,
|
||||||
}) with _$OpenGraphData {
|
}) with _$OpenGraphData {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$OpenGraphDataToJson(this);
|
||||||
|
|
||||||
factory OpenGraphData.fromJson(Map<String, dynamic> json) =>
|
factory OpenGraphData.fromJson(Map<String, dynamic> json) =>
|
||||||
_$OpenGraphDataFromJson(json);
|
_$OpenGraphDataFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,15 @@ part "paginate.freezed.dart";
|
||||||
part "paginate.g.dart";
|
part "paginate.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const Paginate({
|
@JsonSerializable()
|
||||||
required IList<Event> events,
|
class const Paginate({
|
||||||
required IList<Event> relatedEvents,
|
required final IList<Event> events,
|
||||||
required bool hasMore,
|
required final IList<Event> relatedEvents,
|
||||||
|
required final bool hasMore,
|
||||||
}) with _$Paginate {
|
}) with _$Paginate {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$PaginateToJson(this);
|
||||||
|
|
||||||
factory Paginate.fromJson(Map<String, Object?> json) =>
|
factory Paginate.fromJson(Map<String, Object?> json) =>
|
||||||
_$PaginateFromJson(json);
|
_$PaginateFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,33 +6,47 @@ part "profile_response.freezed.dart";
|
||||||
part "profile_response.g.dart";
|
part "profile_response.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const ProfileResponse({
|
@JsonSerializable()
|
||||||
@JsonKey(fromJson: Profile.fromJson) required Profile profile,
|
class const ProfileResponse({
|
||||||
required Bio? bio,
|
@JsonKey(fromJson: Profile.fromJson) required final Profile profile,
|
||||||
|
required final Bio? bio,
|
||||||
}) with _$ProfileResponse {
|
}) with _$ProfileResponse {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$ProfileResponseToJson(this);
|
||||||
|
|
||||||
factory ProfileResponse.fromJson(Map<String, Object?> json) =>
|
factory ProfileResponse.fromJson(Map<String, Object?> json) =>
|
||||||
_$ProfileResponseFromJson(json);
|
_$ProfileResponseFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const Bio({required String html, String? editSource}) with _$Bio {
|
@JsonSerializable()
|
||||||
|
class const Bio({required final String html, final String? editSource})
|
||||||
|
with _$Bio {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$BioToJson(this);
|
||||||
|
|
||||||
factory Bio.fromJson(Map<String, Object?> json) => _$BioFromJson(json);
|
factory Bio.fromJson(Map<String, Object?> json) => _$BioFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const Profile({
|
@JsonSerializable()
|
||||||
String? id,
|
class const Profile({
|
||||||
String? parseError,
|
final String? id,
|
||||||
Uri? avatarUrl,
|
final String? parseError,
|
||||||
|
final Uri? avatarUrl,
|
||||||
|
|
||||||
@JsonKey(name: "displayname", fromJson: MembershipContent.displaynameFromJson)
|
@JsonKey(name: "displayname", fromJson: MembershipContent.displaynameFromJson)
|
||||||
String? displayName,
|
final String? displayName,
|
||||||
|
|
||||||
@JsonKey(readValue: Profile.readTimezone, name: "m.tz") String? timezone,
|
@JsonKey(readValue: Profile.readTimezone, name: "m.tz")
|
||||||
|
final String? timezone,
|
||||||
|
|
||||||
@JsonKey(readValue: Profile.readPronouns, name: "m.pronouns")
|
@JsonKey(readValue: Profile.readPronouns, name: "m.pronouns")
|
||||||
IList<Pronoun> pronouns = const IList.empty(),
|
final IList<Pronoun> pronouns = const IList.empty(),
|
||||||
}) with _$Profile {
|
}) with _$Profile {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$ProfileToJson(this);
|
||||||
|
|
||||||
static Object? readPronouns(Map<dynamic, dynamic> map, String key) =>
|
static Object? readPronouns(Map<dynamic, dynamic> map, String key) =>
|
||||||
map[key] ?? map["io.fsky.nyx.pronouns"];
|
map[key] ?? map["io.fsky.nyx.pronouns"];
|
||||||
|
|
||||||
|
|
@ -52,8 +66,14 @@ sealed class const Profile({
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const Pronoun({required String language, required String summary})
|
@JsonSerializable()
|
||||||
with _$Pronoun {
|
class const Pronoun({
|
||||||
|
required final String language,
|
||||||
|
required final String summary,
|
||||||
|
}) with _$Pronoun {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$PronounToJson(this);
|
||||||
|
|
||||||
factory Pronoun.fromJson(Map<String, Object?> json) =>
|
factory Pronoun.fromJson(Map<String, Object?> json) =>
|
||||||
_$PronounFromJson(json);
|
_$PronounFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,17 @@ part "read_receipt.freezed.dart";
|
||||||
part "read_receipt.g.dart";
|
part "read_receipt.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const ReadReceipt({
|
@JsonSerializable()
|
||||||
String? roomId,
|
class const ReadReceipt({
|
||||||
required String userId,
|
final String? roomId,
|
||||||
String? threadId,
|
required final String userId,
|
||||||
required String eventId,
|
final String? threadId,
|
||||||
@EpochDateTimeConverter() required DateTime timestamp,
|
required final String eventId,
|
||||||
|
@EpochDateTimeConverter() required final DateTime timestamp,
|
||||||
}) with _$ReadReceipt {
|
}) with _$ReadReceipt {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$ReadReceiptToJson(this);
|
||||||
|
|
||||||
factory ReadReceipt.fromJson(Map<String, Object?> json) =>
|
factory ReadReceipt.fromJson(Map<String, Object?> json) =>
|
||||||
_$ReadReceiptFromJson(json);
|
_$ReadReceiptFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,16 @@ part "download_media.freezed.dart";
|
||||||
part "download_media.g.dart";
|
part "download_media.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const DownloadMediaRequest({
|
@JsonSerializable()
|
||||||
required Uri mxc,
|
class const DownloadMediaRequest({
|
||||||
bool encrypted = false,
|
required final Uri mxc,
|
||||||
bool isAvatar = false,
|
final bool encrypted = false,
|
||||||
bool thumbnailAvatar = false,
|
final bool isAvatar = false,
|
||||||
|
final bool thumbnailAvatar = false,
|
||||||
}) with _$DownloadMediaRequest {
|
}) with _$DownloadMediaRequest {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$DownloadMediaRequestToJson(this);
|
||||||
|
|
||||||
factory DownloadMediaRequest.fromJson(Map<String, Object?> json) =>
|
factory DownloadMediaRequest.fromJson(Map<String, Object?> json) =>
|
||||||
_$DownloadMediaRequestFromJson(json);
|
_$DownloadMediaRequestFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,15 @@ part "get_event.freezed.dart";
|
||||||
part "get_event.g.dart";
|
part "get_event.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const GetEventRequest({
|
@JsonSerializable()
|
||||||
required String roomId,
|
class const GetEventRequest({
|
||||||
required String eventId,
|
required final String roomId,
|
||||||
bool unredact = false,
|
required final String eventId,
|
||||||
|
final bool unredact = false,
|
||||||
}) with _$GetEventRequest {
|
}) with _$GetEventRequest {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$GetEventRequestToJson(this);
|
||||||
|
|
||||||
factory GetEventRequest.fromJson(Map<String, Object?> json) =>
|
factory GetEventRequest.fromJson(Map<String, Object?> json) =>
|
||||||
_$GetEventRequestFromJson(json);
|
_$GetEventRequestFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,15 @@ part "get_related_events.freezed.dart";
|
||||||
part "get_related_events.g.dart";
|
part "get_related_events.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const GetRelatedEventsRequest({
|
@JsonSerializable()
|
||||||
required String roomId,
|
class const GetRelatedEventsRequest({
|
||||||
required String eventId,
|
required final String roomId,
|
||||||
required String relationType,
|
required final String eventId,
|
||||||
|
required final String relationType,
|
||||||
}) with _$GetRelatedEventsRequest {
|
}) with _$GetRelatedEventsRequest {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$GetRelatedEventsRequestToJson(this);
|
||||||
|
|
||||||
factory GetRelatedEventsRequest.fromJson(Map<String, Object?> json) =>
|
factory GetRelatedEventsRequest.fromJson(Map<String, Object?> json) =>
|
||||||
_$GetRelatedEventsRequestFromJson(json);
|
_$GetRelatedEventsRequestFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,16 @@ part "get_room_state.freezed.dart";
|
||||||
part "get_room_state.g.dart";
|
part "get_room_state.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const GetRoomStateRequest({
|
@JsonSerializable()
|
||||||
required String roomId,
|
class const GetRoomStateRequest({
|
||||||
bool refetch = false,
|
required final String roomId,
|
||||||
bool fetchMembers = false,
|
final bool refetch = false,
|
||||||
bool includeMembers = false,
|
final bool fetchMembers = false,
|
||||||
|
final bool includeMembers = false,
|
||||||
}) with _$GetRoomStateRequest {
|
}) with _$GetRoomStateRequest {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$GetRoomStateRequestToJson(this);
|
||||||
|
|
||||||
factory GetRoomStateRequest.fromJson(Map<String, Object?> json) =>
|
factory GetRoomStateRequest.fromJson(Map<String, Object?> json) =>
|
||||||
_$GetRoomStateRequestFromJson(json);
|
_$GetRoomStateRequestFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,14 @@ part "join_room.freezed.dart";
|
||||||
part "join_room.g.dart";
|
part "join_room.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const JoinRoomRequest({
|
@JsonSerializable()
|
||||||
required String roomIdOrAlias,
|
class const JoinRoomRequest({
|
||||||
IList<String> via = const IList.empty(),
|
required final String roomIdOrAlias,
|
||||||
|
final IList<String> via = const IList.empty(),
|
||||||
}) with _$JoinRoomRequest {
|
}) with _$JoinRoomRequest {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$JoinRoomRequestToJson(this);
|
||||||
|
|
||||||
factory JoinRoomRequest.fromJson(Map<String, Object?> json) =>
|
factory JoinRoomRequest.fromJson(Map<String, Object?> json) =>
|
||||||
_$JoinRoomRequestFromJson(json);
|
_$JoinRoomRequestFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,17 @@ part "exchange_token.freezed.dart";
|
||||||
part "exchange_token.g.dart";
|
part "exchange_token.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const OAuthExchangeTokenRequest({
|
@JsonSerializable()
|
||||||
required Uri homeserverUrl,
|
class const OAuthExchangeTokenRequest({
|
||||||
required String codeVerifier,
|
required final Uri homeserverUrl,
|
||||||
required Uri redirectUri,
|
required final String codeVerifier,
|
||||||
required String code,
|
required final Uri redirectUri,
|
||||||
required String clientId,
|
required final String code,
|
||||||
|
required final String clientId,
|
||||||
}) with _$OAuthExchangeTokenRequest {
|
}) with _$OAuthExchangeTokenRequest {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$OAuthExchangeTokenRequestToJson(this);
|
||||||
|
|
||||||
factory OAuthExchangeTokenRequest.fromJson(Map<String, Object?> json) =>
|
factory OAuthExchangeTokenRequest.fromJson(Map<String, Object?> json) =>
|
||||||
_$OAuthExchangeTokenRequestFromJson(json);
|
_$OAuthExchangeTokenRequestFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,18 @@ part "get_auth_url.freezed.dart";
|
||||||
part "get_auth_url.g.dart";
|
part "get_auth_url.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const OAuthGetAuthUrl({
|
@JsonSerializable()
|
||||||
required ResponseMode responseMode,
|
class const OAuthGetAuthUrl({
|
||||||
required Uri homeserverUrl,
|
required final ResponseMode responseMode,
|
||||||
required Uri redirectUri,
|
required final Uri homeserverUrl,
|
||||||
required IList<String> scopes,
|
required final Uri redirectUri,
|
||||||
required String clientId,
|
required final IList<String> scopes,
|
||||||
String? userIdHint,
|
required final String clientId,
|
||||||
|
final String? userIdHint,
|
||||||
}) with _$OAuthGetAuthUrl {
|
}) with _$OAuthGetAuthUrl {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$OAuthGetAuthUrlToJson(this);
|
||||||
|
|
||||||
factory OAuthGetAuthUrl.fromJson(Map<String, Object?> json) =>
|
factory OAuthGetAuthUrl.fromJson(Map<String, Object?> json) =>
|
||||||
_$OAuthGetAuthUrlFromJson(json);
|
_$OAuthGetAuthUrlFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,21 +5,25 @@ part "register_client.freezed.dart";
|
||||||
part "register_client.g.dart";
|
part "register_client.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const OAuthRegisterClientRequest({
|
@JsonSerializable()
|
||||||
required Uri homeserverUrl,
|
class const OAuthRegisterClientRequest({
|
||||||
ApplicationType applicationType = ApplicationType.web,
|
required final Uri homeserverUrl,
|
||||||
String? clientName,
|
final ApplicationType applicationType = ApplicationType.web,
|
||||||
required Uri clientUri,
|
final String? clientName,
|
||||||
Uri? logoUri,
|
required final Uri clientUri,
|
||||||
Uri? policyUri,
|
final Uri? logoUri,
|
||||||
Uri? tosUri,
|
final Uri? policyUri,
|
||||||
IList<GrantType>? grantTypes,
|
final Uri? tosUri,
|
||||||
IList<Uri>? redirectUris,
|
final IList<GrantType>? grantTypes,
|
||||||
IList<ResponseType>? responseTypes,
|
final IList<Uri>? redirectUris,
|
||||||
|
final IList<ResponseType>? responseTypes,
|
||||||
|
|
||||||
@JsonKey(name: "token_endpoint_auth_method")
|
@JsonKey(name: "token_endpoint_auth_method")
|
||||||
AuthMethod? authMethod = AuthMethod.none,
|
final AuthMethod? authMethod = AuthMethod.none,
|
||||||
}) with _$OAuthRegisterClientRequest {
|
}) with _$OAuthRegisterClientRequest {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$OAuthRegisterClientRequestToJson(this);
|
||||||
|
|
||||||
factory OAuthRegisterClientRequest.fromJson(Map<String, Object?> json) =>
|
factory OAuthRegisterClientRequest.fromJson(Map<String, Object?> json) =>
|
||||||
_$OAuthRegisterClientRequestFromJson(json);
|
_$OAuthRegisterClientRequestFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,15 @@ part "paginate.freezed.dart";
|
||||||
part "paginate.g.dart";
|
part "paginate.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const PaginateRequest({
|
@JsonSerializable()
|
||||||
required String roomId,
|
class const PaginateRequest({
|
||||||
required int? maxTimelineId,
|
required final String roomId,
|
||||||
int limit = 20,
|
required final int? maxTimelineId,
|
||||||
|
final int limit = 20,
|
||||||
}) with _$PaginateRequest {
|
}) with _$PaginateRequest {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$PaginateRequestToJson(this);
|
||||||
|
|
||||||
factory PaginateRequest.fromJson(Map<String, Object?> json) =>
|
factory PaginateRequest.fromJson(Map<String, Object?> json) =>
|
||||||
_$PaginateRequestFromJson(json);
|
_$PaginateRequestFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,15 @@ part "report.freezed.dart";
|
||||||
part "report.g.dart";
|
part "report.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const ReportRequest({
|
@JsonSerializable()
|
||||||
required String roomId,
|
class const ReportRequest({
|
||||||
required String eventId,
|
required final String roomId,
|
||||||
String? reason,
|
required final String eventId,
|
||||||
|
final String? reason,
|
||||||
}) with _$ReportRequest {
|
}) with _$ReportRequest {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$ReportRequestToJson(this);
|
||||||
|
|
||||||
factory ReportRequest.fromJson(Map<String, Object?> json) =>
|
factory ReportRequest.fromJson(Map<String, Object?> json) =>
|
||||||
_$ReportRequestFromJson(json);
|
_$ReportRequestFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,15 +5,19 @@ part "send_event.freezed.dart";
|
||||||
part "send_event.g.dart";
|
part "send_event.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const SendEventRequest({
|
@JsonSerializable()
|
||||||
required String roomId,
|
class const SendEventRequest({
|
||||||
required String type,
|
required final String roomId,
|
||||||
required Content content,
|
required final String type,
|
||||||
String? relatesTo,
|
required final Content content,
|
||||||
String? relationType,
|
final String? relatesTo,
|
||||||
bool synchronous = false,
|
final String? relationType,
|
||||||
bool disableEncryption = false,
|
final bool synchronous = false,
|
||||||
|
final bool disableEncryption = false,
|
||||||
}) with _$SendEventRequest {
|
}) with _$SendEventRequest {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$SendEventRequestToJson(this);
|
||||||
|
|
||||||
factory SendEventRequest.fromJson(Map<String, Object?> json) =>
|
factory SendEventRequest.fromJson(Map<String, Object?> json) =>
|
||||||
_$SendEventRequestFromJson(json);
|
_$SendEventRequestFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,30 +7,38 @@ part "send_message.freezed.dart";
|
||||||
part "send_message.g.dart";
|
part "send_message.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const SendMessageRequest({
|
@JsonSerializable()
|
||||||
required String roomId,
|
class const SendMessageRequest({
|
||||||
required String text,
|
required final String roomId,
|
||||||
Content? baseContent,
|
required final String text,
|
||||||
@JsonKey(name: "mentions") Mentions mentions = const _Mentions(),
|
final Content? baseContent,
|
||||||
@JsonKey(name: "relates_to") Relation? relation,
|
@JsonKey(name: "mentions") final Mentions mentions = const _Mentions(),
|
||||||
|
@JsonKey(name: "relates_to") final Relation? relation,
|
||||||
}) with _$SendMessageRequest {
|
}) with _$SendMessageRequest {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$SendMessageRequestToJson(this);
|
||||||
|
|
||||||
factory SendMessageRequest.fromJson(Map<String, Object?> json) =>
|
factory SendMessageRequest.fromJson(Map<String, Object?> json) =>
|
||||||
_$SendMessageRequestFromJson(json);
|
_$SendMessageRequestFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const Mentions({
|
@JsonSerializable()
|
||||||
bool room = false,
|
class const Mentions({
|
||||||
IList<String> userIds = const IList.empty(),
|
final bool room = false,
|
||||||
|
final IList<String> userIds = const IList.empty(),
|
||||||
}) with _$Mentions {
|
}) with _$Mentions {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$MentionsToJson(this);
|
||||||
|
|
||||||
factory Mentions.fromJson(Map<String, Object?> json) =>
|
factory Mentions.fromJson(Map<String, Object?> json) =>
|
||||||
_$MentionsFromJson(json);
|
_$MentionsFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Freezed(toJson: false)
|
@Freezed(toJson: false)
|
||||||
sealed class const Relation({
|
class const Relation({
|
||||||
required String eventId,
|
required final String eventId,
|
||||||
required RelationType relationType,
|
required final RelationType relationType,
|
||||||
}) with _$Relation {
|
}) with _$Relation {
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
switch (relationType) {
|
switch (relationType) {
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,15 @@ part "set_account_data.freezed.dart";
|
||||||
part "set_account_data.g.dart";
|
part "set_account_data.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const SetAccountDataRequest({
|
@JsonSerializable()
|
||||||
required String type,
|
class const SetAccountDataRequest({
|
||||||
required dynamic content,
|
required final String type,
|
||||||
String? roomId,
|
required final dynamic content,
|
||||||
|
final String? roomId,
|
||||||
}) with _$SetAccountDataRequest {
|
}) with _$SetAccountDataRequest {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$SetAccountDataRequestToJson(this);
|
||||||
|
|
||||||
factory SetAccountDataRequest.fromJson(Map<String, Object?> json) =>
|
factory SetAccountDataRequest.fromJson(Map<String, Object?> json) =>
|
||||||
_$SetAccountDataRequestFromJson(json);
|
_$SetAccountDataRequestFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,17 @@ part "set_membership.freezed.dart";
|
||||||
part "set_membership.g.dart";
|
part "set_membership.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const SetMembershipRequest({
|
@JsonSerializable()
|
||||||
required String userId,
|
class const SetMembershipRequest({
|
||||||
required String roomId,
|
required final String userId,
|
||||||
String? reason,
|
required final String roomId,
|
||||||
@JsonKey(name: "action") required MembershipAction action,
|
final String? reason,
|
||||||
@JsonKey(name: "msc4293_redact_events") bool redact = false,
|
@JsonKey(name: "action") required final MembershipAction action,
|
||||||
|
@JsonKey(name: "msc4293_redact_events") final bool redact = false,
|
||||||
}) with _$SetMembershipRequest {
|
}) with _$SetMembershipRequest {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$SetMembershipRequestToJson(this);
|
||||||
|
|
||||||
factory SetMembershipRequest.fromJson(Map<String, Object?> json) =>
|
factory SetMembershipRequest.fromJson(Map<String, Object?> json) =>
|
||||||
_$SetMembershipRequestFromJson(json);
|
_$SetMembershipRequestFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,20 @@ part "set_state.freezed.dart";
|
||||||
part "set_state.g.dart";
|
part "set_state.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const SetStateRequest({
|
@JsonSerializable()
|
||||||
required String roomId,
|
class const SetStateRequest({
|
||||||
required String type,
|
required final String roomId,
|
||||||
required String stateKey,
|
required final String type,
|
||||||
required Content content,
|
required final String stateKey,
|
||||||
|
required final Content content,
|
||||||
|
|
||||||
@JsonKey(name: "delay_ms", includeIfNull: false)
|
@JsonKey(name: "delay_ms", includeIfNull: false)
|
||||||
@MSDuration()
|
@MSDuration()
|
||||||
Duration? delay,
|
final Duration? delay,
|
||||||
}) with _$SetStateRequest {
|
}) with _$SetStateRequest {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$SetStateRequestToJson(this);
|
||||||
|
|
||||||
factory SetStateRequest.fromJson(Map<String, Object?> json) =>
|
factory SetStateRequest.fromJson(Map<String, Object?> json) =>
|
||||||
_$SetStateRequestFromJson(json);
|
_$SetStateRequestFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,20 +4,25 @@ part "upload_media.freezed.dart";
|
||||||
part "upload_media.g.dart";
|
part "upload_media.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const UploadMediaRequest({
|
@JsonSerializable()
|
||||||
required String path,
|
class const UploadMediaRequest({
|
||||||
required bool encrypt,
|
required final String path,
|
||||||
String? filename,
|
required final bool encrypt,
|
||||||
@JsonKey(name: "voice_message") bool isVoiceMessage = false,
|
final String? filename,
|
||||||
bool forceFile = false,
|
@JsonKey(name: "voice_message") final bool isVoiceMessage = false,
|
||||||
|
final bool forceFile = false,
|
||||||
|
final
|
||||||
// Below params only work if encodeTo is set
|
// Below params only work if encodeTo is set
|
||||||
String? encodeTo,
|
String?
|
||||||
int? resizeWidth,
|
encodeTo,
|
||||||
int? resizeHeight,
|
final int? resizeWidth,
|
||||||
int? resizePercent,
|
final int? resizeHeight,
|
||||||
int quality = 80,
|
final int? resizePercent,
|
||||||
|
final int quality = 80,
|
||||||
}) with _$UploadMediaRequest {
|
}) with _$UploadMediaRequest {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$UploadMediaRequestToJson(this);
|
||||||
|
|
||||||
factory UploadMediaRequest.fromJson(Map<String, Object?> json) =>
|
factory UploadMediaRequest.fromJson(Map<String, Object?> json) =>
|
||||||
_$UploadMediaRequestFromJson(json);
|
_$UploadMediaRequestFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,25 +8,26 @@ part "room.freezed.dart";
|
||||||
part "room.g.dart";
|
part "room.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const Room({
|
@JsonSerializable()
|
||||||
@JsonKey(name: "meta") RoomMetadata? metadata,
|
class const Room({
|
||||||
|
@JsonKey(name: "meta") final RoomMetadata? metadata,
|
||||||
|
|
||||||
@JsonKey(fromJson: Room.timelineTupleJsonToIMap)
|
@JsonKey(fromJson: Room.timelineTupleJsonToIMap)
|
||||||
IMap<int, int?> timeline = const IMap.empty(),
|
final IMap<int, int?> timeline = const IMap.empty(),
|
||||||
|
|
||||||
ISet<int> sticky = const ISet.empty(),
|
final ISet<int> sticky = const ISet.empty(),
|
||||||
|
|
||||||
@JsonKey(fromJson: Room.eventsJsonToIMap)
|
@JsonKey(fromJson: Room.eventsJsonToIMap)
|
||||||
IMap<int, Event> events = const IMap.empty(),
|
final IMap<int, Event> events = const IMap.empty(),
|
||||||
|
|
||||||
bool reset = false,
|
final bool reset = false,
|
||||||
bool hasFetchedState = false,
|
final bool hasFetchedState = false,
|
||||||
bool hasFetchedMembers = false,
|
final bool hasFetchedMembers = false,
|
||||||
IMap<String, IMap<String, int>> state = const IMap.empty(),
|
final IMap<String, IMap<String, int>> state = const IMap.empty(),
|
||||||
|
|
||||||
IMap<String, IList<ReadReceipt>> receipts = const IMap.empty(),
|
final IMap<String, IList<ReadReceipt>> receipts = const IMap.empty(),
|
||||||
bool dismissNotifications = false,
|
final bool dismissNotifications = false,
|
||||||
bool hasMore = true,
|
final bool hasMore = true,
|
||||||
|
|
||||||
// IMap<String, AccountData> accountData,
|
// IMap<String, AccountData> accountData,
|
||||||
// IList<Notification> notifications,
|
// IList<Notification> notifications,
|
||||||
|
|
@ -52,5 +53,8 @@ sealed class const Room({
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$RoomToJson(this);
|
||||||
|
|
||||||
factory Room.fromJson(Map<String, Object?> json) => _$RoomFromJson(json);
|
factory Room.fromJson(Map<String, Object?> json) => _$RoomFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,24 +6,28 @@ part "room_metadata.freezed.dart";
|
||||||
part "room_metadata.g.dart";
|
part "room_metadata.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const RoomMetadata({
|
@JsonSerializable()
|
||||||
@JsonKey(name: "room_id") required String id,
|
class const RoomMetadata({
|
||||||
|
@JsonKey(name: "room_id") required final String id,
|
||||||
|
|
||||||
// CreateEventContent creationContent,
|
// CreateEventContent creationContent,
|
||||||
// TombstoneEventContent tombstoneEventContent,
|
// TombstoneEventContent tombstoneEventContent,
|
||||||
String? name,
|
final String? name,
|
||||||
Uri? avatar,
|
final Uri? avatar,
|
||||||
String? dmUserId,
|
final String? dmUserId,
|
||||||
String? topic,
|
final String? topic,
|
||||||
String? canonicalAlias,
|
final String? canonicalAlias,
|
||||||
LazyLoadSummary? lazyLoadSummary,
|
final LazyLoadSummary? lazyLoadSummary,
|
||||||
required bool hasMemberList,
|
required final bool hasMemberList,
|
||||||
@JsonKey(name: "preview_event_rowid") required int previewEventRowID,
|
@JsonKey(name: "preview_event_rowid") required final int previewEventRowID,
|
||||||
@EpochDateTimeConverter() required DateTime sortingTimestamp,
|
@EpochDateTimeConverter() required final DateTime sortingTimestamp,
|
||||||
required int unreadHighlights,
|
required final int unreadHighlights,
|
||||||
required int unreadNotifications,
|
required final int unreadNotifications,
|
||||||
required int unreadMessages,
|
required final int unreadMessages,
|
||||||
}) with _$RoomMetadata {
|
}) with _$RoomMetadata {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$RoomMetadataToJson(this);
|
||||||
|
|
||||||
factory RoomMetadata.fromJson(Map<String, Object?> json) =>
|
factory RoomMetadata.fromJson(Map<String, Object?> json) =>
|
||||||
_$RoomMetadataFromJson(json);
|
_$RoomMetadataFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,17 +6,21 @@ part "room_summary.freezed.dart";
|
||||||
part "room_summary.g.dart";
|
part "room_summary.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const RoomSummary({
|
@JsonSerializable()
|
||||||
required String roomId,
|
class const RoomSummary({
|
||||||
@JsonKey(name: "num_joined_members") required int joinedMembers,
|
required final String roomId,
|
||||||
JoinRule? joinRule,
|
@JsonKey(name: "num_joined_members") required final int joinedMembers,
|
||||||
String? name,
|
final JoinRule? joinRule,
|
||||||
Uri? avatarUrl,
|
final String? name,
|
||||||
String? canonicalAlias,
|
final Uri? avatarUrl,
|
||||||
String? topic,
|
final String? canonicalAlias,
|
||||||
String? roomVersion,
|
final String? topic,
|
||||||
@JsonKey(unknownEnumValue: RoomType.room) RoomType? roomType,
|
final String? roomVersion,
|
||||||
|
@JsonKey(unknownEnumValue: RoomType.room) final RoomType? roomType,
|
||||||
}) with _$RoomSummary {
|
}) with _$RoomSummary {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$RoomSummaryToJson(this);
|
||||||
|
|
||||||
factory RoomSummary.fromJson(Map<String, Object?> json) =>
|
factory RoomSummary.fromJson(Map<String, Object?> json) =>
|
||||||
_$RoomSummaryFromJson(json);
|
_$RoomSummaryFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,15 @@ part "settings.freezed.dart";
|
||||||
part "settings.g.dart";
|
part "settings.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const Settings({
|
@JsonSerializable()
|
||||||
ThemeMode theme = ThemeMode.system,
|
class const Settings({
|
||||||
bool useDynamicTheming = true,
|
final ThemeMode theme = ThemeMode.system,
|
||||||
bool linuxMobileMode = false,
|
final bool useDynamicTheming = true,
|
||||||
|
final bool linuxMobileMode = false,
|
||||||
}) with _$Settings {
|
}) with _$Settings {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$SettingsToJson(this);
|
||||||
|
|
||||||
factory Settings.fromJson(Map<String, Object?> json) =>
|
factory Settings.fromJson(Map<String, Object?> json) =>
|
||||||
_$SettingsFromJson(json);
|
_$SettingsFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ import "package:nexus/models/setting.dart";
|
||||||
part "settings_category.freezed.dart";
|
part "settings_category.freezed.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const SettingsCategory({
|
class const SettingsCategory({
|
||||||
required String title,
|
required final String title,
|
||||||
required IconData icon,
|
required final IconData icon,
|
||||||
required IList<Setting> settings,
|
required final IList<Setting> settings,
|
||||||
}) with _$SettingsCategory;
|
}) with _$SettingsCategory;
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,11 @@ import "package:nexus/models/subspace.dart";
|
||||||
part "space.freezed.dart";
|
part "space.freezed.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const Space({
|
class const Space({
|
||||||
required String id,
|
required final String id,
|
||||||
required String title,
|
required final String title,
|
||||||
IconData? icon,
|
final IconData? icon,
|
||||||
Room? room,
|
final Room? room,
|
||||||
required IList<Room> children,
|
required final IList<Room> children,
|
||||||
required IList<Subspace> subSpaces,
|
required final IList<Subspace> subSpaces,
|
||||||
}) with _$Space;
|
}) with _$Space;
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,14 @@ part "space_edge.freezed.dart";
|
||||||
part "space_edge.g.dart";
|
part "space_edge.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const SpaceEdge({required String childId, bool suggested = false})
|
@JsonSerializable()
|
||||||
with _$SpaceEdge {
|
class const SpaceEdge({
|
||||||
|
required final String childId,
|
||||||
|
final bool suggested = false,
|
||||||
|
}) with _$SpaceEdge {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$SpaceEdgeToJson(this);
|
||||||
|
|
||||||
factory SpaceEdge.fromJson(Map<String, Object?> json) =>
|
factory SpaceEdge.fromJson(Map<String, Object?> json) =>
|
||||||
_$SpaceEdgeFromJson(json);
|
_$SpaceEdgeFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,18 +5,25 @@ part "spec_versions_response.freezed.dart";
|
||||||
part "spec_versions_response.g.dart";
|
part "spec_versions_response.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const SpecVersionsResponse({
|
@JsonSerializable()
|
||||||
required IList<String> versions,
|
class const SpecVersionsResponse({
|
||||||
required UnstableFeatures unstableFeatures,
|
required final IList<String> versions,
|
||||||
|
required final UnstableFeatures unstableFeatures,
|
||||||
}) with _$SpecVersionsResponse {
|
}) with _$SpecVersionsResponse {
|
||||||
|
@override
|
||||||
|
Map<String, Object?> toJson() => _$SpecVersionsResponseToJson(this);
|
||||||
|
|
||||||
factory SpecVersionsResponse.fromJson(Map<String, Object?> json) =>
|
factory SpecVersionsResponse.fromJson(Map<String, Object?> json) =>
|
||||||
_$SpecVersionsResponseFromJson(json);
|
_$SpecVersionsResponseFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const UnstableFeatures({
|
@JsonSerializable()
|
||||||
@JsonKey(name: "uk.timedout.msc4494") bool msc4494 = false,
|
class const UnstableFeatures({
|
||||||
|
@JsonKey(name: "uk.timedout.msc4494") final bool msc4494 = false,
|
||||||
}) with _$UnstableFeatures {
|
}) with _$UnstableFeatures {
|
||||||
|
Map<String, Object?> toJson() => _$UnstableFeaturesToJson(this);
|
||||||
|
|
||||||
factory UnstableFeatures.fromJson(Map<String, Object?> json) =>
|
factory UnstableFeatures.fromJson(Map<String, Object?> json) =>
|
||||||
_$UnstableFeaturesFromJson(json);
|
_$UnstableFeaturesFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,7 @@ import "package:nexus/models/room.dart";
|
||||||
part "subspace.freezed.dart";
|
part "subspace.freezed.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const Subspace({required Room room, required IList<Room> children})
|
class const Subspace({
|
||||||
with _$Subspace;
|
required final Room room,
|
||||||
|
required final IList<Room> children,
|
||||||
|
}) with _$Subspace;
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,17 @@ part "sync_data.freezed.dart";
|
||||||
part "sync_data.g.dart";
|
part "sync_data.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const SyncData({
|
@JsonSerializable()
|
||||||
bool clearState = false,
|
class const SyncData({
|
||||||
IMap<String, IMap<String, dynamic>> accountData = const IMap.empty(),
|
final bool clearState = false,
|
||||||
IMap<String, Room> rooms = const IMap.empty(),
|
final IMap<String, IMap<String, dynamic>> accountData = const IMap.empty(),
|
||||||
ISet<String> leftRooms = const ISet.empty(),
|
final IMap<String, Room> rooms = const IMap.empty(),
|
||||||
IMap<String, IList<SpaceEdge>>? spaceEdges,
|
final ISet<String> leftRooms = const ISet.empty(),
|
||||||
IList<String>? topLevelSpaces,
|
final IMap<String, IList<SpaceEdge>>? spaceEdges,
|
||||||
|
final IList<String>? topLevelSpaces,
|
||||||
}) with _$SyncData {
|
}) with _$SyncData {
|
||||||
|
Map<String, Object?> toJson() => _$SyncDataToJson(this);
|
||||||
|
|
||||||
factory SyncData.fromJson(Map<String, Object?> json) =>
|
factory SyncData.fromJson(Map<String, Object?> json) =>
|
||||||
_$SyncDataFromJson(json);
|
_$SyncDataFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,14 @@ part "sync_status.freezed.dart";
|
||||||
part "sync_status.g.dart";
|
part "sync_status.g.dart";
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class const SyncStatus({
|
@JsonSerializable()
|
||||||
required SyncStatusType type,
|
class const SyncStatus({
|
||||||
required String? error,
|
required final SyncStatusType type,
|
||||||
required int errorCount,
|
required final String? error,
|
||||||
|
required final int errorCount,
|
||||||
}) with _$SyncStatus {
|
}) with _$SyncStatus {
|
||||||
|
Map<String, Object?> toJson() => _$SyncStatusToJson(this);
|
||||||
|
|
||||||
factory SyncStatus.fromJson(Map<String, Object?> json) =>
|
factory SyncStatus.fromJson(Map<String, Object?> json) =>
|
||||||
_$SyncStatusFromJson(json);
|
_$SyncStatusFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
36
pubspec.lock
36
pubspec.lock
|
|
@ -77,10 +77,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: archive
|
name: archive
|
||||||
sha256: a96e8b390886ee8abb49b7bd3ac8df6f451c621619f52a26e815fdcf568959ff
|
sha256: be169cf6ac481e052c4538715d88841d567150dfe1df38aaec76461a4e7b39f2
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.9"
|
version: "4.1.0"
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -293,10 +293,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: dbus
|
name: dbus
|
||||||
sha256: "792974a4007974fbc5c1b5433eb2330a9db3e368c3f906253af4c007d0f49a91"
|
sha256: a48d5da28e89bd02196e80d81ed8d7954923d00a0f4a68cc20b575038f023383
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.13"
|
version: "0.7.15"
|
||||||
dynamic_color:
|
dynamic_color:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -570,10 +570,10 @@ packages:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: freezed
|
name: freezed
|
||||||
sha256: "9ec135696554923c59339d46dd50adbaf81099be06ffda0fb9c06f410aea9137"
|
sha256: "27585a6c2b9ac28ffb7b45d87fd1502332af1eb90e1c9f5eb1acb24c71d26e17"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.0-dev.3"
|
version: "4.0.0"
|
||||||
freezed_annotation:
|
freezed_annotation:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -626,10 +626,10 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: hooks
|
name: hooks
|
||||||
sha256: "03a564c3704524ee0f7fc56fc621e8796cc2eb8c24d1f1a33b34979815b285c4"
|
sha256: eaac480a35ec0814146c2c48d96aaa829e0e44a7662c88ae84c9edf4bc35651f
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.2.0"
|
||||||
hooks_riverpod:
|
hooks_riverpod:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -682,10 +682,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: image
|
name: image
|
||||||
sha256: "6300175e00616bbc832e2fc91bfa4d776af5402c81c7151bee6905bb08473c52"
|
sha256: "1976370a4df3091bb0f72409c187ad1f9132a818bc6b95ca59c0bae1c75c688e"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.9.1"
|
version: "4.9.2"
|
||||||
image_picker:
|
image_picker:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -891,10 +891,10 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: material_ui
|
name: material_ui
|
||||||
sha256: d9b4f6c69b80bc83d0a14357c86e4c14c8076e807ae73cf2960c8560f623995f
|
sha256: "4f3f38b9953df0a87d6bf5f21880029f77c47048487d5339410c39936be4683b"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.1"
|
||||||
measure_size:
|
measure_size:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -1188,10 +1188,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: record_use
|
name: record_use
|
||||||
sha256: "3b4ab682aff40175afca6ff090cc5aa7ce9dafe8dfbae1537a6c678e6678baee"
|
sha256: "1cb8564af8d43b464294411db9217f5ec04891c6f22ee2c32d73ae05e88a6bd2"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.1"
|
||||||
riverpod:
|
riverpod:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -1393,10 +1393,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_maps
|
name: source_maps
|
||||||
sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812"
|
sha256: "14c2945847669b44089bb1222f66873d7ff7103c58911917f2a63c5a62327898"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.10.13"
|
version: "0.10.14"
|
||||||
source_span:
|
source_span:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -1633,10 +1633,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vm_service
|
name: vm_service
|
||||||
sha256: "0016aef94fc66495ac78af5859181e3f3bf2026bd8eecc72b9565601e19ab360"
|
sha256: "5f37239c4851efcef929cea7824e76df7f2f0970aef85d66bbc430afa40e72f0"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "15.2.0"
|
version: "15.3.0"
|
||||||
wakelock_plus:
|
wakelock_plus:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
10
pubspec.yaml
10
pubspec.yaml
|
|
@ -1,5 +1,5 @@
|
||||||
name: nexus
|
name: nexus
|
||||||
description: "Yet another Matrix client"
|
description: "A simple and user-friendly Matrix client"
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
publish_to: none
|
publish_to: none
|
||||||
|
|
||||||
|
|
@ -15,7 +15,7 @@ flutter:
|
||||||
- assets/
|
- assets/
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: "3.13.0"
|
sdk: 3.13.0
|
||||||
|
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
path_provider_android: 2.2.23 # Pinned to avoid JNI
|
path_provider_android: 2.2.23 # Pinned to avoid JNI
|
||||||
|
|
@ -50,7 +50,7 @@ dependencies:
|
||||||
dynamic_polls: 0.0.8
|
dynamic_polls: 0.0.8
|
||||||
flutter_hooks: 0.21.3+1
|
flutter_hooks: 0.21.3+1
|
||||||
ffi: 2.2.0
|
ffi: 2.2.0
|
||||||
hooks: 2.1.0
|
hooks: ^2.2.0
|
||||||
code_assets: 1.2.1
|
code_assets: 1.2.1
|
||||||
ffigen: 21.0.0
|
ffigen: 21.0.0
|
||||||
timeago: 3.7.1
|
timeago: 3.7.1
|
||||||
|
|
@ -76,12 +76,12 @@ dependencies:
|
||||||
package_info_plus: 10.2.1
|
package_info_plus: 10.2.1
|
||||||
app_links: 7.2.1
|
app_links: 7.2.1
|
||||||
file_selector: 1.1.0
|
file_selector: 1.1.0
|
||||||
material_ui: 1.0.0
|
material_ui: 1.0.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
build_runner: 2.16.0
|
build_runner: 2.16.0
|
||||||
flutter_lints: 6.0.0
|
flutter_lints: 6.0.0
|
||||||
freezed: 4.0.0-dev.3
|
freezed: 4.0.0
|
||||||
riverpod_lint: 3.1.8
|
riverpod_lint: 3.1.8
|
||||||
flutter_launcher_icons: 0.14.4
|
flutter_launcher_icons: 0.14.4
|
||||||
json_serializable: 6.14.1
|
json_serializable: 6.14.1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue