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,24 +1,27 @@
import "package:fast_immutable_collections/fast_immutable_collections.dart";
import "package:freezed_annotation/freezed_annotation.dart";
part "spec_versions_response.freezed.dart";
part "spec_versions_response.g.dart";
@freezed
abstract class SpecVersionsResponse with _$SpecVersionsResponse {
const factory SpecVersionsResponse({
required IList<String> versions,
required UnstableFeatures unstableFeatures,
}) = _SpecVersionsResponse;
@Freezed(toJson: false, fromJson: false)
@JsonSerializable()
class const SpecVersionsResponse({
required final IList<String> versions,
required final UnstableFeatures unstableFeatures,
}) with _$SpecVersionsResponse {
Map<String, Object?> toJson() => _$SpecVersionsResponseToJson(this);
factory SpecVersionsResponse.fromJson(Map<String, Object?> json) =>
_$SpecVersionsResponseFromJson(json);
}
@freezed
abstract class UnstableFeatures with _$UnstableFeatures {
const factory UnstableFeatures({
@JsonKey(name: "uk.timedout.msc4494") @Default(false) bool msc4494,
}) = _UnstableFeatures;
@Freezed(toJson: false, fromJson: false)
@JsonSerializable()
class const UnstableFeatures({
@JsonKey(name: "uk.timedout.msc4494") final bool msc4494 = false,
}) with _$UnstableFeatures {
Map<String, Object?> toJson() => _$UnstableFeaturesToJson(this);
factory UnstableFeatures.fromJson(Map<String, Object?> json) =>
_$UnstableFeaturesFromJson(json);