worldhopper/lib/models/opds_feed.freezed.dart
Felipe M. 64eee6b81b
feat: implement internet connectivity tracking with offline indicators
Adds real-time connectivity monitoring and visual feedback across the app. Offline icon appears in all app bars when disconnected, cached content shows download badges, and access control prevents browsing servers or opening uncached content without internet connection.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-28 20:13:21 +01:00

466 lines
14 KiB
Dart

// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'opds_feed.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
OPDSFeed _$OPDSFeedFromJson(Map<String, dynamic> json) {
return _OPDSFeed.fromJson(json);
}
/// @nodoc
mixin _$OPDSFeed {
/// Feed ID
String get id => throw _privateConstructorUsedError;
/// Feed title
String get title => throw _privateConstructorUsedError;
/// Feed subtitle
String? get subtitle => throw _privateConstructorUsedError;
/// Feed icon URL
String? get icon => throw _privateConstructorUsedError;
/// Last update timestamp
DateTime? get updated => throw _privateConstructorUsedError;
/// Feed author
String? get author => throw _privateConstructorUsedError;
/// All links in the feed
List<OPDSLink> get links => throw _privateConstructorUsedError;
/// All entries in the feed
List<OPDSEntry> get entries => throw _privateConstructorUsedError;
/// Total results (for paginated feeds)
int? get totalResults => throw _privateConstructorUsedError;
/// Items per page (for paginated feeds)
int? get itemsPerPage => throw _privateConstructorUsedError;
/// Start index (for paginated feeds)
int? get startIndex => throw _privateConstructorUsedError;
/// Serializes this OPDSFeed to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of OPDSFeed
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$OPDSFeedCopyWith<OPDSFeed> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $OPDSFeedCopyWith<$Res> {
factory $OPDSFeedCopyWith(OPDSFeed value, $Res Function(OPDSFeed) then) =
_$OPDSFeedCopyWithImpl<$Res, OPDSFeed>;
@useResult
$Res call(
{String id,
String title,
String? subtitle,
String? icon,
DateTime? updated,
String? author,
List<OPDSLink> links,
List<OPDSEntry> entries,
int? totalResults,
int? itemsPerPage,
int? startIndex});
}
/// @nodoc
class _$OPDSFeedCopyWithImpl<$Res, $Val extends OPDSFeed>
implements $OPDSFeedCopyWith<$Res> {
_$OPDSFeedCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of OPDSFeed
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? title = null,
Object? subtitle = freezed,
Object? icon = freezed,
Object? updated = freezed,
Object? author = freezed,
Object? links = null,
Object? entries = null,
Object? totalResults = freezed,
Object? itemsPerPage = freezed,
Object? startIndex = freezed,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
subtitle: freezed == subtitle
? _value.subtitle
: subtitle // ignore: cast_nullable_to_non_nullable
as String?,
icon: freezed == icon
? _value.icon
: icon // ignore: cast_nullable_to_non_nullable
as String?,
updated: freezed == updated
? _value.updated
: updated // ignore: cast_nullable_to_non_nullable
as DateTime?,
author: freezed == author
? _value.author
: author // ignore: cast_nullable_to_non_nullable
as String?,
links: null == links
? _value.links
: links // ignore: cast_nullable_to_non_nullable
as List<OPDSLink>,
entries: null == entries
? _value.entries
: entries // ignore: cast_nullable_to_non_nullable
as List<OPDSEntry>,
totalResults: freezed == totalResults
? _value.totalResults
: totalResults // ignore: cast_nullable_to_non_nullable
as int?,
itemsPerPage: freezed == itemsPerPage
? _value.itemsPerPage
: itemsPerPage // ignore: cast_nullable_to_non_nullable
as int?,
startIndex: freezed == startIndex
? _value.startIndex
: startIndex // ignore: cast_nullable_to_non_nullable
as int?,
) as $Val);
}
}
/// @nodoc
abstract class _$$OPDSFeedImplCopyWith<$Res>
implements $OPDSFeedCopyWith<$Res> {
factory _$$OPDSFeedImplCopyWith(
_$OPDSFeedImpl value, $Res Function(_$OPDSFeedImpl) then) =
__$$OPDSFeedImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{String id,
String title,
String? subtitle,
String? icon,
DateTime? updated,
String? author,
List<OPDSLink> links,
List<OPDSEntry> entries,
int? totalResults,
int? itemsPerPage,
int? startIndex});
}
/// @nodoc
class __$$OPDSFeedImplCopyWithImpl<$Res>
extends _$OPDSFeedCopyWithImpl<$Res, _$OPDSFeedImpl>
implements _$$OPDSFeedImplCopyWith<$Res> {
__$$OPDSFeedImplCopyWithImpl(
_$OPDSFeedImpl _value, $Res Function(_$OPDSFeedImpl) _then)
: super(_value, _then);
/// Create a copy of OPDSFeed
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? title = null,
Object? subtitle = freezed,
Object? icon = freezed,
Object? updated = freezed,
Object? author = freezed,
Object? links = null,
Object? entries = null,
Object? totalResults = freezed,
Object? itemsPerPage = freezed,
Object? startIndex = freezed,
}) {
return _then(_$OPDSFeedImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
subtitle: freezed == subtitle
? _value.subtitle
: subtitle // ignore: cast_nullable_to_non_nullable
as String?,
icon: freezed == icon
? _value.icon
: icon // ignore: cast_nullable_to_non_nullable
as String?,
updated: freezed == updated
? _value.updated
: updated // ignore: cast_nullable_to_non_nullable
as DateTime?,
author: freezed == author
? _value.author
: author // ignore: cast_nullable_to_non_nullable
as String?,
links: null == links
? _value._links
: links // ignore: cast_nullable_to_non_nullable
as List<OPDSLink>,
entries: null == entries
? _value._entries
: entries // ignore: cast_nullable_to_non_nullable
as List<OPDSEntry>,
totalResults: freezed == totalResults
? _value.totalResults
: totalResults // ignore: cast_nullable_to_non_nullable
as int?,
itemsPerPage: freezed == itemsPerPage
? _value.itemsPerPage
: itemsPerPage // ignore: cast_nullable_to_non_nullable
as int?,
startIndex: freezed == startIndex
? _value.startIndex
: startIndex // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$OPDSFeedImpl extends _OPDSFeed {
const _$OPDSFeedImpl(
{required this.id,
required this.title,
this.subtitle,
this.icon,
this.updated,
this.author,
final List<OPDSLink> links = const [],
final List<OPDSEntry> entries = const [],
this.totalResults,
this.itemsPerPage,
this.startIndex})
: _links = links,
_entries = entries,
super._();
factory _$OPDSFeedImpl.fromJson(Map<String, dynamic> json) =>
_$$OPDSFeedImplFromJson(json);
/// Feed ID
@override
final String id;
/// Feed title
@override
final String title;
/// Feed subtitle
@override
final String? subtitle;
/// Feed icon URL
@override
final String? icon;
/// Last update timestamp
@override
final DateTime? updated;
/// Feed author
@override
final String? author;
/// All links in the feed
final List<OPDSLink> _links;
/// All links in the feed
@override
@JsonKey()
List<OPDSLink> get links {
if (_links is EqualUnmodifiableListView) return _links;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_links);
}
/// All entries in the feed
final List<OPDSEntry> _entries;
/// All entries in the feed
@override
@JsonKey()
List<OPDSEntry> get entries {
if (_entries is EqualUnmodifiableListView) return _entries;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_entries);
}
/// Total results (for paginated feeds)
@override
final int? totalResults;
/// Items per page (for paginated feeds)
@override
final int? itemsPerPage;
/// Start index (for paginated feeds)
@override
final int? startIndex;
@override
String toString() {
return 'OPDSFeed(id: $id, title: $title, subtitle: $subtitle, icon: $icon, updated: $updated, author: $author, links: $links, entries: $entries, totalResults: $totalResults, itemsPerPage: $itemsPerPage, startIndex: $startIndex)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$OPDSFeedImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.subtitle, subtitle) ||
other.subtitle == subtitle) &&
(identical(other.icon, icon) || other.icon == icon) &&
(identical(other.updated, updated) || other.updated == updated) &&
(identical(other.author, author) || other.author == author) &&
const DeepCollectionEquality().equals(other._links, _links) &&
const DeepCollectionEquality().equals(other._entries, _entries) &&
(identical(other.totalResults, totalResults) ||
other.totalResults == totalResults) &&
(identical(other.itemsPerPage, itemsPerPage) ||
other.itemsPerPage == itemsPerPage) &&
(identical(other.startIndex, startIndex) ||
other.startIndex == startIndex));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
title,
subtitle,
icon,
updated,
author,
const DeepCollectionEquality().hash(_links),
const DeepCollectionEquality().hash(_entries),
totalResults,
itemsPerPage,
startIndex);
/// Create a copy of OPDSFeed
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$OPDSFeedImplCopyWith<_$OPDSFeedImpl> get copyWith =>
__$$OPDSFeedImplCopyWithImpl<_$OPDSFeedImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$OPDSFeedImplToJson(
this,
);
}
}
abstract class _OPDSFeed extends OPDSFeed {
const factory _OPDSFeed(
{required final String id,
required final String title,
final String? subtitle,
final String? icon,
final DateTime? updated,
final String? author,
final List<OPDSLink> links,
final List<OPDSEntry> entries,
final int? totalResults,
final int? itemsPerPage,
final int? startIndex}) = _$OPDSFeedImpl;
const _OPDSFeed._() : super._();
factory _OPDSFeed.fromJson(Map<String, dynamic> json) =
_$OPDSFeedImpl.fromJson;
/// Feed ID
@override
String get id;
/// Feed title
@override
String get title;
/// Feed subtitle
@override
String? get subtitle;
/// Feed icon URL
@override
String? get icon;
/// Last update timestamp
@override
DateTime? get updated;
/// Feed author
@override
String? get author;
/// All links in the feed
@override
List<OPDSLink> get links;
/// All entries in the feed
@override
List<OPDSEntry> get entries;
/// Total results (for paginated feeds)
@override
int? get totalResults;
/// Items per page (for paginated feeds)
@override
int? get itemsPerPage;
/// Start index (for paginated feeds)
@override
int? get startIndex;
/// Create a copy of OPDSFeed
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$OPDSFeedImplCopyWith<_$OPDSFeedImpl> get copyWith =>
throw _privateConstructorUsedError;
}