refactor(media): migrate media item to freezed

This commit is contained in:
edde746
2026-05-11 07:01:46 +02:00
parent 4252bd88e9
commit f9615491b3
44 changed files with 4753 additions and 2866 deletions
+22 -20
View File
@@ -6,24 +6,26 @@ part of 'livetv_channel.dart';
// JsonSerializableGenerator
// **************************************************************************
LiveTvChannel _$LiveTvChannelFromJson(Map<String, dynamic> json) => LiveTvChannel(
key: _readChannelKey(json, 'key') as String,
identifier: _readChannelIdentifier(json, 'identifier') as String?,
callSign: json['callSign'] as String?,
title: _readChannelTitle(json, 'title') as String?,
thumb: json['thumb'] as String?,
art: json['art'] as String?,
number: _readChannelNumber(json, 'number') as String?,
hd: json['hd'] == null ? false : flexibleBool(json['hd']),
lineup: json['lineup'] as String?,
slug: json['slug'] as String?,
drm: flexibleBool(json['drm']),
);
LiveTvChannel _$LiveTvChannelFromJson(Map<String, dynamic> json) =>
LiveTvChannel(
key: _readChannelKey(json, 'key') as String,
identifier: _readChannelIdentifier(json, 'identifier') as String?,
callSign: json['callSign'] as String?,
title: _readChannelTitle(json, 'title') as String?,
thumb: json['thumb'] as String?,
art: json['art'] as String?,
number: _readChannelNumber(json, 'number') as String?,
hd: json['hd'] == null ? false : flexibleBool(json['hd']),
lineup: json['lineup'] as String?,
slug: json['slug'] as String?,
drm: flexibleBool(json['drm']),
);
FavoriteChannel _$FavoriteChannelFromJson(Map<String, dynamic> json) => FavoriteChannel(
source: json['source'] as String? ?? '',
id: _readFavoriteChannelId(json, 'id') as String,
title: json['title'] as String?,
thumb: json['thumb'] as String?,
vcn: json['vcn'] as String?,
);
FavoriteChannel _$FavoriteChannelFromJson(Map<String, dynamic> json) =>
FavoriteChannel(
source: json['source'] as String? ?? '',
id: _readFavoriteChannelId(json, 'id') as String,
title: json['title'] as String?,
thumb: json['thumb'] as String?,
vcn: json['vcn'] as String?,
);