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,16 +1,17 @@
import "package:freezed_annotation/freezed_annotation.dart";
import "package:nexus/models/ms_duration.dart";
part "audio.freezed.dart";
part "audio.g.dart";
@freezed
abstract class AudioInfo with _$AudioInfo {
/// Information for images, [size] is in bytes.
const factory AudioInfo({
@MSDuration() Duration? duration,
@JsonKey(name: "mimetype") String? mimeType,
int? size,
}) = _AudioInfo;
@Freezed(toJson: false, fromJson: false)
@JsonSerializable()
class const AudioInfo({
@MSDuration() final Duration? duration,
@JsonKey(name: "mimetype") final String? mimeType,
final int? size,
}) with _$AudioInfo {
Map<String, Object?> toJson() => _$AudioInfoToJson(this);
factory AudioInfo.fromJson(Map<String, Object?> json) =>
_$AudioInfoFromJson(json);

View file

@ -1,14 +1,15 @@
import "package:freezed_annotation/freezed_annotation.dart";
part "file.freezed.dart";
part "file.g.dart";
@freezed
abstract class FileInfo with _$FileInfo {
/// Information for images, [size] is in bytes.
const factory FileInfo({
@JsonKey(name: "mimetype") String? mimeType,
int? size,
}) = _FileInfo;
@Freezed(toJson: false, fromJson: false)
@JsonSerializable()
class const FileInfo({
@JsonKey(name: "mimetype") final String? mimeType,
final int? size,
}) with _$FileInfo {
Map<String, Object?> toJson() => _$FileInfoToJson(this);
factory FileInfo.fromJson(Map<String, Object?> json) =>
_$FileInfoFromJson(json);

View file

@ -1,17 +1,18 @@
import "package:freezed_annotation/freezed_annotation.dart";
part "image.freezed.dart";
part "image.g.dart";
@freezed
abstract class ImageInfo with _$ImageInfo {
/// Information for images, [size] is in bytes.
const factory ImageInfo({
@JsonKey(name: "h") double? height,
@JsonKey(name: "w") double? width,
@JsonKey(name: "mimetype") String? mimeType,
@JsonKey(name: "xyz.amorgan.blurhash") String? blurHash,
int? size,
}) = _ImageInfo;
@Freezed(toJson: false, fromJson: false)
@JsonSerializable()
class const ImageInfo({
@JsonKey(name: "h") final double? height,
@JsonKey(name: "w") final double? width,
@JsonKey(name: "mimetype") final String? mimeType,
@JsonKey(name: "xyz.amorgan.blurhash") final String? blurHash,
final int? size,
}) with _$ImageInfo {
Map<String, Object?> toJson() => _$ImageInfoToJson(this);
factory ImageInfo.fromJson(Map<String, Object?> json) =>
_$ImageInfoFromJson(json);

View file

@ -1,18 +1,19 @@
import "package:freezed_annotation/freezed_annotation.dart";
import "package:nexus/models/ms_duration.dart";
part "video.freezed.dart";
part "video.g.dart";
@freezed
abstract class VideoInfo with _$VideoInfo {
/// Information for images, [size] is in bytes.
const factory VideoInfo({
@JsonKey(name: "h") int? height,
@JsonKey(name: "w") int? width,
@JsonKey(name: "mimetype") String? mimeType,
@MSDuration() Duration? duration,
int? size,
}) = _VideoInfo;
@Freezed(toJson: false, fromJson: false)
@JsonSerializable()
class const VideoInfo({
@JsonKey(name: "h") final int? height,
@JsonKey(name: "w") final int? width,
@JsonKey(name: "mimetype") final String? mimeType,
@MSDuration() final Duration? duration,
final int? size,
}) with _$VideoInfo {
Map<String, Object?> toJson() => _$VideoInfoToJson(this);
factory VideoInfo.fromJson(Map<String, Object?> json) =>
_$VideoInfoFromJson(json);