olshab
1a863ee7f7
added navigation bar renamed "like" to "favourite" made cards list into separate widget
71 lines
2.8 KiB
Dart
71 lines
2.8 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'favourites_state.dart';
|
|
|
|
// **************************************************************************
|
|
// CopyWithGenerator
|
|
// **************************************************************************
|
|
|
|
abstract class _$FavouritesStateCWProxy {
|
|
FavouritesState likedIds(List<String>? likedIds);
|
|
|
|
FavouritesState hasFavouritesLoaded(bool hasFavouritesLoaded);
|
|
|
|
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `FavouritesState(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
|
///
|
|
/// Usage
|
|
/// ```dart
|
|
/// FavouritesState(...).copyWith(id: 12, name: "My name")
|
|
/// ````
|
|
FavouritesState call({
|
|
List<String>? likedIds,
|
|
bool? hasFavouritesLoaded,
|
|
});
|
|
}
|
|
|
|
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfFavouritesState.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfFavouritesState.copyWith.fieldName(...)`
|
|
class _$FavouritesStateCWProxyImpl implements _$FavouritesStateCWProxy {
|
|
const _$FavouritesStateCWProxyImpl(this._value);
|
|
|
|
final FavouritesState _value;
|
|
|
|
@override
|
|
FavouritesState likedIds(List<String>? likedIds) => this(likedIds: likedIds);
|
|
|
|
@override
|
|
FavouritesState hasFavouritesLoaded(bool hasFavouritesLoaded) =>
|
|
this(hasFavouritesLoaded: hasFavouritesLoaded);
|
|
|
|
@override
|
|
|
|
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `FavouritesState(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
|
///
|
|
/// Usage
|
|
/// ```dart
|
|
/// FavouritesState(...).copyWith(id: 12, name: "My name")
|
|
/// ````
|
|
FavouritesState call({
|
|
Object? likedIds = const $CopyWithPlaceholder(),
|
|
Object? hasFavouritesLoaded = const $CopyWithPlaceholder(),
|
|
}) {
|
|
return FavouritesState(
|
|
favouritesIds: likedIds == const $CopyWithPlaceholder()
|
|
? _value.favouritesIds
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: likedIds as List<String>?,
|
|
hasFavouritesLoaded:
|
|
hasFavouritesLoaded == const $CopyWithPlaceholder() ||
|
|
hasFavouritesLoaded == null
|
|
? _value.hasFavouritesLoaded
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: hasFavouritesLoaded as bool,
|
|
);
|
|
}
|
|
}
|
|
|
|
extension $FavouritesStateCopyWith on FavouritesState {
|
|
/// Returns a callable class that can be used as follows: `instanceOfFavouritesState.copyWith(...)` or like so:`instanceOfFavouritesState.copyWith.fieldName(...)`.
|
|
// ignore: library_private_types_in_public_api
|
|
_$FavouritesStateCWProxy get copyWith => _$FavouritesStateCWProxyImpl(this);
|
|
}
|