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,18 @@
import "package:freezed_annotation/freezed_annotation.dart";
part "open_graph_data.freezed.dart";
part "open_graph_data.g.dart";
@freezed
abstract class OpenGraphData with _$OpenGraphData {
const factory OpenGraphData({
@JsonKey(name: "og:title") required String? title,
@JsonKey(name: "og:description") required String? description,
@JsonKey(name: "og:image") required Uri? imageUrl,
@JsonKey(name: "og:image:width") required double? width,
@JsonKey(name: "og:image:height") required double? height,
}) = _OpenGraphData;
@Freezed(toJson: false, fromJson: false)
@JsonSerializable()
class const OpenGraphData({
@JsonKey(name: "og:title") required final String? title,
@JsonKey(name: "og:description") required final String? description,
@JsonKey(name: "og:image") required final Uri? imageUrl,
@JsonKey(name: "og:image:width") required final double? width,
@JsonKey(name: "og:image:height") required final double? height,
}) with _$OpenGraphData {
Map<String, Object?> toJson() => _$OpenGraphDataToJson(this);
factory OpenGraphData.fromJson(Map<String, dynamic> json) =>
_$OpenGraphDataFromJson(json);