1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'alfred_cache.dart';
// **************************************************************************
// CopyWithGenerator
// **************************************************************************
abstract class _$AlfredCacheCWProxy<T> {
AlfredCache<T> fromEncodable(T Function(Map<String, dynamic>) fromEncodable);
AlfredCache<T> path(String? path);
AlfredCache<T> maxEntries(int maxEntries);
AlfredCache<T> name(String name);
AlfredCache<T> evictionPolicy(EvictionPolicy evictionPolicy);
AlfredCache<T> expiryPolicy(ExpiryPolicy expiryPolicy);
AlfredCache<T> verbose(bool verbose);
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `AlfredCache<T>(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
///
/// Usage
/// ```dart
/// AlfredCache<T>(...).copyWith(id: 12, name: "My name")
/// ````
AlfredCache<T> call({
T Function(Map<String, dynamic>) fromEncodable,
String? path,
int maxEntries,
String name,
EvictionPolicy evictionPolicy,
ExpiryPolicy expiryPolicy,
bool verbose,
});
}
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfAlfredCache.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfAlfredCache.copyWith.fieldName(...)`
class _$AlfredCacheCWProxyImpl<T> implements _$AlfredCacheCWProxy<T> {
const _$AlfredCacheCWProxyImpl(this._value);
final AlfredCache<T> _value;
@override
AlfredCache<T> fromEncodable(
T Function(Map<String, dynamic>) fromEncodable) =>
this(fromEncodable: fromEncodable);
@override
AlfredCache<T> path(String? path) => this(path: path);
@override
AlfredCache<T> maxEntries(int maxEntries) => this(maxEntries: maxEntries);
@override
AlfredCache<T> name(String name) => this(name: name);
@override
AlfredCache<T> evictionPolicy(EvictionPolicy evictionPolicy) =>
this(evictionPolicy: evictionPolicy);
@override
AlfredCache<T> expiryPolicy(ExpiryPolicy expiryPolicy) =>
this(expiryPolicy: expiryPolicy);
@override
AlfredCache<T> verbose(bool verbose) => this(verbose: verbose);
@override
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `AlfredCache<T>(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
///
/// Usage
/// ```dart
/// AlfredCache<T>(...).copyWith(id: 12, name: "My name")
/// ````
AlfredCache<T> call({
Object? fromEncodable = const $CopyWithPlaceholder(),
Object? path = const $CopyWithPlaceholder(),
Object? maxEntries = const $CopyWithPlaceholder(),
Object? name = const $CopyWithPlaceholder(),
Object? evictionPolicy = const $CopyWithPlaceholder(),
Object? expiryPolicy = const $CopyWithPlaceholder(),
Object? verbose = const $CopyWithPlaceholder(),
}) {
return AlfredCache<T>(
fromEncodable: fromEncodable == const $CopyWithPlaceholder()
? _value.fromEncodable
// ignore: cast_nullable_to_non_nullable
: fromEncodable as T Function(Map<String, dynamic>),
path: path == const $CopyWithPlaceholder()
? _value.path
// ignore: cast_nullable_to_non_nullable
: path as String?,
maxEntries: maxEntries == const $CopyWithPlaceholder()
? _value.maxEntries
// ignore: cast_nullable_to_non_nullable
: maxEntries as int,
name: name == const $CopyWithPlaceholder()
? _value.name
// ignore: cast_nullable_to_non_nullable
: name as String,
evictionPolicy: evictionPolicy == const $CopyWithPlaceholder()
? _value.evictionPolicy
// ignore: cast_nullable_to_non_nullable
: evictionPolicy as EvictionPolicy,
expiryPolicy: expiryPolicy == const $CopyWithPlaceholder()
? _value.expiryPolicy
// ignore: cast_nullable_to_non_nullable
: expiryPolicy as ExpiryPolicy,
verbose: verbose == const $CopyWithPlaceholder()
? _value.verbose
// ignore: cast_nullable_to_non_nullable
: verbose as bool,
);
}
}
extension $AlfredCacheCopyWith<T> on AlfredCache<T> {
/// Returns a callable class that can be used as follows: `instanceOfAlfredCache.copyWith(...)` or like so:`instanceOfAlfredCache.copyWith.fieldName(...)`.
// ignore: library_private_types_in_public_api
_$AlfredCacheCWProxy<T> get copyWith => _$AlfredCacheCWProxyImpl<T>(this);
}
// **************************************************************************
// EquatableGenerator
// **************************************************************************
extension _$AlfredCacheEquatableAnnotations on AlfredCache {
List<Object?> get _$props => [
fromEncodable,
path,
maxEntries,
name,
evictionPolicy,
expiryPolicy,
verbose,
];
}