final treewide fixes
This commit is contained in:
parent
78744135c9
commit
05682dd0de
48 changed files with 78 additions and 110 deletions
|
|
@ -102,7 +102,6 @@ class const App({super.key}) extends StatelessWidget {
|
||||||
builder: (context, ref, child) => MaterialApp(
|
builder: (context, ref, child) => MaterialApp(
|
||||||
navigatorKey: navigatorKey,
|
navigatorKey: navigatorKey,
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
// Use indigo to work around bugs in theme generation
|
|
||||||
theme:
|
theme:
|
||||||
(ref
|
(ref
|
||||||
.watch(SettingsController.provider)
|
.watch(SettingsController.provider)
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,12 @@ import "package:freezed_annotation/freezed_annotation.dart";
|
||||||
part "account_data.freezed.dart";
|
part "account_data.freezed.dart";
|
||||||
part "account_data.g.dart";
|
part "account_data.g.dart";
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const AccountData({
|
class const AccountData({
|
||||||
@JsonKey(name: AccountData.invitePermissionConfigKey)
|
@JsonKey(name: AccountData.invitePermissionConfigKey)
|
||||||
final InvitePermissionConfig invitePermissionConfig =
|
final InvitePermissionConfig invitePermissionConfig =
|
||||||
const _InvitePermissionConfig(),
|
const InvitePermissionConfig(),
|
||||||
|
|
||||||
@JsonKey(name: AccountData.directKey)
|
@JsonKey(name: AccountData.directKey)
|
||||||
final IMap<String, IList<String>> directMessages = const IMap.empty(),
|
final IMap<String, IList<String>> directMessages = const IMap.empty(),
|
||||||
|
|
@ -34,31 +34,28 @@ 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);
|
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(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const InvitePermissionConfig({
|
class const InvitePermissionConfig({
|
||||||
@JsonKey(unknownEnumValue: DefaultInviteAction.allow)
|
@JsonKey(unknownEnumValue: DefaultInviteAction.allow)
|
||||||
final DefaultInviteAction defaultAction = DefaultInviteAction.allow,
|
final DefaultInviteAction defaultAction = DefaultInviteAction.allow,
|
||||||
}) with _$InvitePermissionConfig {
|
}) with _$InvitePermissionConfig {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$InvitePermissionConfigToJson(this);
|
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(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const RecentEmoji({required final String emoji, required final int total})
|
class const RecentEmoji({required final String emoji, required final int total})
|
||||||
with _$RecentEmoji {
|
with _$RecentEmoji {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$RecentEmojiToJson(this);
|
Map<String, Object?> toJson() => _$RecentEmojiToJson(this);
|
||||||
|
|
||||||
factory RecentEmoji.fromJson(Map<String, Object?> json) =>
|
factory RecentEmoji.fromJson(Map<String, Object?> json) =>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import "package:freezed_annotation/freezed_annotation.dart";
|
||||||
part "client_state.freezed.dart";
|
part "client_state.freezed.dart";
|
||||||
part "client_state.g.dart";
|
part "client_state.g.dart";
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const ClientState({
|
class const ClientState({
|
||||||
required final bool isInitialized,
|
required final bool isInitialized,
|
||||||
|
|
@ -12,7 +12,6 @@ class const ClientState({
|
||||||
required final String? userId,
|
required final String? userId,
|
||||||
required final String? homeserverUrl,
|
required final String? homeserverUrl,
|
||||||
}) with _$ClientState {
|
}) with _$ClientState {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$ClientStateToJson(this);
|
Map<String, Object?> toJson() => _$ClientStateToJson(this);
|
||||||
|
|
||||||
factory ClientState.fromJson(Map<String, Object?> json) =>
|
factory ClientState.fromJson(Map<String, Object?> json) =>
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,12 @@ import "package:nexus/models/membership_status.dart";
|
||||||
part "members_by_status.freezed.dart";
|
part "members_by_status.freezed.dart";
|
||||||
part "members_by_status.g.dart";
|
part "members_by_status.g.dart";
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const MembersByStatusConfig({
|
class const MembersByStatusConfig({
|
||||||
required final String roomId,
|
required final String roomId,
|
||||||
required final MembershipStatus status,
|
required final MembershipStatus status,
|
||||||
}) with _$MembersByStatusConfig {
|
}) with _$MembersByStatusConfig {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$MembersByStatusConfigToJson(this);
|
Map<String, Object?> toJson() => _$MembersByStatusConfigToJson(this);
|
||||||
|
|
||||||
factory MembersByStatusConfig.fromJson(Map<String, Object?> json) =>
|
factory MembersByStatusConfig.fromJson(Map<String, Object?> json) =>
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,12 @@ import "package:freezed_annotation/freezed_annotation.dart";
|
||||||
part "reactions.freezed.dart";
|
part "reactions.freezed.dart";
|
||||||
part "reactions.g.dart";
|
part "reactions.g.dart";
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const ReactionsConfig({
|
class const ReactionsConfig({
|
||||||
required final String roomId,
|
required final String roomId,
|
||||||
required final int eventRowId,
|
required final int eventRowId,
|
||||||
}) with _$ReactionsConfig {
|
}) with _$ReactionsConfig {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$ReactionsConfigToJson(this);
|
Map<String, Object?> toJson() => _$ReactionsConfigToJson(this);
|
||||||
|
|
||||||
factory ReactionsConfig.fromJson(Map<String, Object?> json) =>
|
factory ReactionsConfig.fromJson(Map<String, Object?> json) =>
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,10 @@ import "package:freezed_annotation/freezed_annotation.dart";
|
||||||
part "user.freezed.dart";
|
part "user.freezed.dart";
|
||||||
part "user.g.dart";
|
part "user.g.dart";
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const UserConfig({final String? roomId, required final String userId})
|
class const UserConfig({final String? roomId, required final String userId})
|
||||||
with _$UserConfig {
|
with _$UserConfig {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$UserConfigToJson(this);
|
Map<String, Object?> toJson() => _$UserConfigToJson(this);
|
||||||
|
|
||||||
factory UserConfig.fromJson(Map<String, Object?> json) =>
|
factory UserConfig.fromJson(Map<String, Object?> json) =>
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,9 @@ enum RoomType {
|
||||||
space,
|
space,
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const PreviousRoom({required final String roomId}) with _$PreviousRoom {
|
class const PreviousRoom({required final String roomId}) with _$PreviousRoom {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$PreviousRoomToJson(this);
|
Map<String, Object?> toJson() => _$PreviousRoomToJson(this);
|
||||||
|
|
||||||
factory PreviousRoom.fromJson(Map<String, Object?> json) =>
|
factory PreviousRoom.fromJson(Map<String, Object?> json) =>
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,12 @@ sealed class JoinRulesContent extends Content with _$JoinRulesContent {
|
||||||
_$JoinRulesContentFromJson(json);
|
_$JoinRulesContentFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const AllowCondition({
|
class const AllowCondition({
|
||||||
final String? roomId,
|
final String? roomId,
|
||||||
required final AllowConditionType type,
|
required final AllowConditionType type,
|
||||||
}) with _$AllowCondition {
|
}) with _$AllowCondition {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$AllowConditionToJson(this);
|
Map<String, Object?> toJson() => _$AllowConditionToJson(this);
|
||||||
|
|
||||||
factory AllowCondition.fromJson(Map<String, Object?> json) =>
|
factory AllowCondition.fromJson(Map<String, Object?> json) =>
|
||||||
|
|
|
||||||
|
|
@ -24,13 +24,12 @@ sealed class PowerLevelsContent extends Content with _$PowerLevelsContent {
|
||||||
_$PowerLevelsContentFromJson(json);
|
_$PowerLevelsContentFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const Notifications({
|
class const Notifications({
|
||||||
final int room = 50,
|
final int room = 50,
|
||||||
final IMap<String, int> other = const IMap.empty(),
|
final IMap<String, int> other = const IMap.empty(),
|
||||||
}) with _$Notifications {
|
}) with _$Notifications {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$NotificationsToJson(this);
|
Map<String, Object?> toJson() => _$NotificationsToJson(this);
|
||||||
|
|
||||||
factory Notifications.fromJson(Map<String, Object?> json) =>
|
factory Notifications.fromJson(Map<String, Object?> json) =>
|
||||||
|
|
|
||||||
|
|
@ -17,25 +17,23 @@ sealed class TopicContent extends Content with _$TopicContent {
|
||||||
_$TopicContentFromJson(json);
|
_$TopicContentFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const TopicContentBlock({
|
class const TopicContentBlock({
|
||||||
final IList<TextualRepresentation> representations = const IList.empty(),
|
final IList<TextualRepresentation> representations = const IList.empty(),
|
||||||
}) with _$TopicContentBlock {
|
}) with _$TopicContentBlock {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$TopicContentBlockToJson(this);
|
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(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const TextualRepresentation({
|
class const TextualRepresentation({
|
||||||
required final String body,
|
required final String body,
|
||||||
final String mimetype = "text/plain",
|
final String mimetype = "text/plain",
|
||||||
}) with _$TextualRepresentation {
|
}) with _$TextualRepresentation {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$TextualRepresentationToJson(this);
|
Map<String, Object?> toJson() => _$TextualRepresentationToJson(this);
|
||||||
|
|
||||||
factory TextualRepresentation.fromJson(Map<String, Object?> json) =>
|
factory TextualRepresentation.fromJson(Map<String, Object?> json) =>
|
||||||
|
|
|
||||||
18
lib/models/emoji.dart
Normal file
18
lib/models/emoji.dart
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||||
|
import "package:freezed_annotation/freezed_annotation.dart";
|
||||||
|
part "emoji.freezed.dart";
|
||||||
|
part "emoji.g.dart";
|
||||||
|
|
||||||
|
@Freezed(toJson: false, fromJson: false)
|
||||||
|
@JsonSerializable()
|
||||||
|
class Emoji({
|
||||||
|
required final String emoji,
|
||||||
|
required final String category,
|
||||||
|
required final IList<String> aliases,
|
||||||
|
required final String description,
|
||||||
|
required final IList<String> tags,
|
||||||
|
}) with _$Emoji {
|
||||||
|
Map<String, Object?> toJson() => _$EmojiToJson(this);
|
||||||
|
|
||||||
|
factory Emoji.fromJson(Map<String, Object?> json) => _$EmojiFromJson(json);
|
||||||
|
}
|
||||||
|
|
@ -7,7 +7,7 @@ import "package:nexus/models/profile_response.dart";
|
||||||
part "event.freezed.dart";
|
part "event.freezed.dart";
|
||||||
part "event.g.dart";
|
part "event.g.dart";
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const Event({
|
class const Event({
|
||||||
@JsonKey(name: "rowid") required final int rowId,
|
@JsonKey(name: "rowid") required final int rowId,
|
||||||
|
|
@ -34,7 +34,6 @@ class const Event({
|
||||||
required final Content content,
|
required final Content content,
|
||||||
required final Content? previousContent,
|
required final Content? previousContent,
|
||||||
}) with _$Event {
|
}) with _$Event {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$EventToJson(this);
|
Map<String, Object?> toJson() => _$EventToJson(this);
|
||||||
|
|
||||||
static String typeJsonFromJson(Map<dynamic, dynamic> json, _) =>
|
static String typeJsonFromJson(Map<dynamic, dynamic> json, _) =>
|
||||||
|
|
@ -75,7 +74,7 @@ class const Event({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const LocalContent({
|
class const LocalContent({
|
||||||
final String? sanitizedHtml,
|
final String? sanitizedHtml,
|
||||||
|
|
@ -85,7 +84,6 @@ class const LocalContent({
|
||||||
final bool? hasMath,
|
final bool? hasMath,
|
||||||
final bool? replyFallbackRemoved,
|
final bool? replyFallbackRemoved,
|
||||||
}) with _$LocalContent {
|
}) with _$LocalContent {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$LocalContentToJson(this);
|
Map<String, Object?> toJson() => _$LocalContentToJson(this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,13 @@ import "package:nexus/models/ms_duration.dart";
|
||||||
part "audio.freezed.dart";
|
part "audio.freezed.dart";
|
||||||
part "audio.g.dart";
|
part "audio.g.dart";
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const AudioInfo({
|
class const AudioInfo({
|
||||||
@MSDuration() final Duration? duration,
|
@MSDuration() final Duration? duration,
|
||||||
@JsonKey(name: "mimetype") final String? mimeType,
|
@JsonKey(name: "mimetype") final String? mimeType,
|
||||||
final int? size,
|
final int? size,
|
||||||
}) with _$AudioInfo {
|
}) with _$AudioInfo {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$AudioInfoToJson(this);
|
Map<String, Object?> toJson() => _$AudioInfoToJson(this);
|
||||||
|
|
||||||
factory AudioInfo.fromJson(Map<String, Object?> json) =>
|
factory AudioInfo.fromJson(Map<String, Object?> json) =>
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,12 @@ import "package:freezed_annotation/freezed_annotation.dart";
|
||||||
part "file.freezed.dart";
|
part "file.freezed.dart";
|
||||||
part "file.g.dart";
|
part "file.g.dart";
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const FileInfo({
|
class const FileInfo({
|
||||||
@JsonKey(name: "mimetype") final String? mimeType,
|
@JsonKey(name: "mimetype") final String? mimeType,
|
||||||
final int? size,
|
final int? size,
|
||||||
}) with _$FileInfo {
|
}) with _$FileInfo {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$FileInfoToJson(this);
|
Map<String, Object?> toJson() => _$FileInfoToJson(this);
|
||||||
|
|
||||||
factory FileInfo.fromJson(Map<String, Object?> json) =>
|
factory FileInfo.fromJson(Map<String, Object?> json) =>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import "package:freezed_annotation/freezed_annotation.dart";
|
||||||
part "image.freezed.dart";
|
part "image.freezed.dart";
|
||||||
part "image.g.dart";
|
part "image.g.dart";
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const ImageInfo({
|
class const ImageInfo({
|
||||||
@JsonKey(name: "h") final double? height,
|
@JsonKey(name: "h") final double? height,
|
||||||
|
|
@ -12,7 +12,6 @@ class const ImageInfo({
|
||||||
@JsonKey(name: "xyz.amorgan.blurhash") final String? blurHash,
|
@JsonKey(name: "xyz.amorgan.blurhash") final String? blurHash,
|
||||||
final int? size,
|
final int? size,
|
||||||
}) with _$ImageInfo {
|
}) with _$ImageInfo {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$ImageInfoToJson(this);
|
Map<String, Object?> toJson() => _$ImageInfoToJson(this);
|
||||||
|
|
||||||
factory ImageInfo.fromJson(Map<String, Object?> json) =>
|
factory ImageInfo.fromJson(Map<String, Object?> json) =>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import "package:nexus/models/ms_duration.dart";
|
||||||
part "video.freezed.dart";
|
part "video.freezed.dart";
|
||||||
part "video.g.dart";
|
part "video.g.dart";
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const VideoInfo({
|
class const VideoInfo({
|
||||||
@JsonKey(name: "h") final int? height,
|
@JsonKey(name: "h") final int? height,
|
||||||
|
|
@ -13,7 +13,6 @@ class const VideoInfo({
|
||||||
@MSDuration() final Duration? duration,
|
@MSDuration() final Duration? duration,
|
||||||
final int? size,
|
final int? size,
|
||||||
}) with _$VideoInfo {
|
}) with _$VideoInfo {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$VideoInfoToJson(this);
|
Map<String, Object?> toJson() => _$VideoInfoToJson(this);
|
||||||
|
|
||||||
factory VideoInfo.fromJson(Map<String, Object?> json) =>
|
factory VideoInfo.fromJson(Map<String, Object?> json) =>
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,13 @@ import "package:freezed_annotation/freezed_annotation.dart";
|
||||||
part "lazy_load_summary.freezed.dart";
|
part "lazy_load_summary.freezed.dart";
|
||||||
part "lazy_load_summary.g.dart";
|
part "lazy_load_summary.g.dart";
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const LazyLoadSummary({
|
class const LazyLoadSummary({
|
||||||
required final IList<String>? heroes,
|
required final IList<String>? heroes,
|
||||||
required final int? joinedMemberCount,
|
required final int? joinedMemberCount,
|
||||||
required final int? invitedMemberCount,
|
required final int? invitedMemberCount,
|
||||||
}) with _$LazyLoadSummary {
|
}) with _$LazyLoadSummary {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$LazyLoadSummaryToJson(this);
|
Map<String, Object?> toJson() => _$LazyLoadSummaryToJson(this);
|
||||||
|
|
||||||
factory LazyLoadSummary.fromJson(Map<String, Object?> json) =>
|
factory LazyLoadSummary.fromJson(Map<String, Object?> json) =>
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,13 @@ import "package:freezed_annotation/freezed_annotation.dart";
|
||||||
part "oauth_auth_code_response.freezed.dart";
|
part "oauth_auth_code_response.freezed.dart";
|
||||||
part "oauth_auth_code_response.g.dart";
|
part "oauth_auth_code_response.g.dart";
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const OAuthAuthCodeResponse({
|
class const OAuthAuthCodeResponse({
|
||||||
required final String state,
|
required final String state,
|
||||||
required final String codeVerifier,
|
required final String codeVerifier,
|
||||||
required final Uri url,
|
required final Uri url,
|
||||||
}) with _$OAuthAuthCodeResponse {
|
}) with _$OAuthAuthCodeResponse {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$OAuthAuthCodeResponseToJson(this);
|
Map<String, Object?> toJson() => _$OAuthAuthCodeResponseToJson(this);
|
||||||
|
|
||||||
factory OAuthAuthCodeResponse.fromJson(Map<String, Object?> json) =>
|
factory OAuthAuthCodeResponse.fromJson(Map<String, Object?> json) =>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import "package:freezed_annotation/freezed_annotation.dart";
|
||||||
part "open_graph_data.freezed.dart";
|
part "open_graph_data.freezed.dart";
|
||||||
part "open_graph_data.g.dart";
|
part "open_graph_data.g.dart";
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const OpenGraphData({
|
class const OpenGraphData({
|
||||||
@JsonKey(name: "og:title") required final String? title,
|
@JsonKey(name: "og:title") required final String? title,
|
||||||
|
|
@ -12,7 +12,6 @@ class const OpenGraphData({
|
||||||
@JsonKey(name: "og:image:width") required final double? width,
|
@JsonKey(name: "og:image:width") required final double? width,
|
||||||
@JsonKey(name: "og:image:height") required final double? height,
|
@JsonKey(name: "og:image:height") required final double? height,
|
||||||
}) with _$OpenGraphData {
|
}) with _$OpenGraphData {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$OpenGraphDataToJson(this);
|
Map<String, Object?> toJson() => _$OpenGraphDataToJson(this);
|
||||||
|
|
||||||
factory OpenGraphData.fromJson(Map<String, dynamic> json) =>
|
factory OpenGraphData.fromJson(Map<String, dynamic> json) =>
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,13 @@ import "package:nexus/models/event.dart";
|
||||||
part "paginate.freezed.dart";
|
part "paginate.freezed.dart";
|
||||||
part "paginate.g.dart";
|
part "paginate.g.dart";
|
||||||
|
|
||||||
@freezed
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const Paginate({
|
class const Paginate({
|
||||||
required final IList<Event> events,
|
required final IList<Event> events,
|
||||||
required final IList<Event> relatedEvents,
|
required final IList<Event> relatedEvents,
|
||||||
required final bool hasMore,
|
required final bool hasMore,
|
||||||
}) with _$Paginate {
|
}) with _$Paginate {
|
||||||
@override
|
|
||||||
Map<String, Object?> toJson() => _$PaginateToJson(this);
|
Map<String, Object?> toJson() => _$PaginateToJson(this);
|
||||||
|
|
||||||
factory Paginate.fromJson(Map<String, Object?> json) =>
|
factory Paginate.fromJson(Map<String, Object?> json) =>
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue