Move to Flutter 3.47, use the improvements that come with this (#64)

Reviewed-on: #64
This commit is contained in:
Henry Hiles 2026-08-22 13:04:33 -04:00 committed by Henry Hiles
commit 077044ec19
157 changed files with 1366 additions and 1457 deletions

View file

@ -1,18 +1,19 @@
import "package:freezed_annotation/freezed_annotation.dart";
import "package:nexus/models/membership_action.dart";
part "set_membership.freezed.dart";
part "set_membership.g.dart";
@freezed
abstract class SetMembershipRequest with _$SetMembershipRequest {
const factory SetMembershipRequest({
required String userId,
required String roomId,
String? reason,
@JsonKey(name: "action") required MembershipAction action,
@Default(false) @JsonKey(name: "msc4293_redact_events") bool redact,
}) = _SetMembershipRequest;
@Freezed(toJson: false, fromJson: false)
@JsonSerializable()
class const SetMembershipRequest({
required final String userId,
required final String roomId,
final String? reason,
@JsonKey(name: "action") required final MembershipAction action,
@JsonKey(name: "msc4293_redact_events") final bool redact = false,
}) with _$SetMembershipRequest {
Map<String, Object?> toJson() => _$SetMembershipRequestToJson(this);
factory SetMembershipRequest.fromJson(Map<String, Object?> json) =>
_$SetMembershipRequestFromJson(json);