migrate Content classes to primary constructors

The Riverpod bug preventing us from doing this has been fixed.
This commit is contained in:
Henry Hiles 2026-10-23 20:44:29 -04:00
commit dd01ad9d74
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -4,15 +4,13 @@ import "package:nexus/models/content/content.dart";
part "server_acl.freezed.dart";
part "server_acl.g.dart";
@freezed
sealed class ServerACLContent extends Content with _$ServerACLContent {
ServerACLContent._();
factory ServerACLContent({
@Default(IList.empty()) IList<String> allow,
@Default(IList.empty()) IList<String> deny,
@Default(true) allowIpLiterals,
}) = _ServerACLContent;
@Freezed(toJson: false, fromJson: false)
@JsonSerializable()
class const ServerACLContent({
final IList<String> allow = const .empty(),
final IList<String> deny = const .empty(),
final bool allowIpLiterals = true,
}) extends Content with _$ServerACLContent {
factory ServerACLContent.fromJson(Map<String, Object?> json) =>
_$ServerACLContentFromJson(json);
}