Site constructor

  1. @ForceUtcDateTime()
  2. @ForceUtcDateTimeNullable()
  3. @JsonSerializable(fieldRename: FieldRename.snake)
const Site({
  1. required int id,
  2. required String name,
  3. String? sidebar,
  4. String? description,
  5. required DateTime published,
  6. DateTime? updated,
  7. required bool enableDownvotes,
  8. required bool openRegistration,
  9. required bool enableNsfw,
  10. required bool communityCreationAdminOnly,
  11. String? icon,
  12. String? banner,
  13. required bool requireEmailVerification,
  14. required bool requireApplication,
  15. String? applicationQuestion,
  16. required bool privateInstance,
  17. required String defaultTheme,
  18. required String actorId,
  19. required String lastRefreshedAt,
  20. required String inboxUrl,
  21. required String publicKey,
  22. required String instanceHost,
})

Implementation

@ForceUtcDateTime()
@ForceUtcDateTimeNullable()
@JsonSerializable(fieldRename: FieldRename.snake)
const factory Site({
  required int id,
  required String name,
  String? sidebar,
  String? description,
  required DateTime published,
  DateTime? updated,
  required bool enableDownvotes,
  required bool openRegistration,
  required bool enableNsfw,
  required bool communityCreationAdminOnly,
  String? icon,
  String? banner,
  required bool requireEmailVerification,
  required bool requireApplication,
  String? applicationQuestion,
  required bool privateInstance,
  required String defaultTheme,
  required String actorId,
  required String lastRefreshedAt,
  required String inboxUrl,
  required String publicKey,
  required String instanceHost,
}) = _Site;