apskel-pos-flutter-v2/lib/domain/analytic/analytic.freezed.dart
2025-11-03 16:24:11 +07:00

1985 lines
63 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 'analytic.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',
);
/// @nodoc
mixin _$DashboardAnalytic {
String get organizationId => throw _privateConstructorUsedError;
String get outletId => throw _privateConstructorUsedError;
String get dateFrom => throw _privateConstructorUsedError;
String get dateTo => throw _privateConstructorUsedError;
DashboardOverview get overview => throw _privateConstructorUsedError;
List<DashboardTopProduct> get topProducts =>
throw _privateConstructorUsedError;
List<DashboardPaymentMethod> get paymentMethods =>
throw _privateConstructorUsedError;
List<DashboardRecentSale> get recentSales =>
throw _privateConstructorUsedError;
/// Create a copy of DashboardAnalytic
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$DashboardAnalyticCopyWith<DashboardAnalytic> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $DashboardAnalyticCopyWith<$Res> {
factory $DashboardAnalyticCopyWith(
DashboardAnalytic value,
$Res Function(DashboardAnalytic) then,
) = _$DashboardAnalyticCopyWithImpl<$Res, DashboardAnalytic>;
@useResult
$Res call({
String organizationId,
String outletId,
String dateFrom,
String dateTo,
DashboardOverview overview,
List<DashboardTopProduct> topProducts,
List<DashboardPaymentMethod> paymentMethods,
List<DashboardRecentSale> recentSales,
});
$DashboardOverviewCopyWith<$Res> get overview;
}
/// @nodoc
class _$DashboardAnalyticCopyWithImpl<$Res, $Val extends DashboardAnalytic>
implements $DashboardAnalyticCopyWith<$Res> {
_$DashboardAnalyticCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of DashboardAnalytic
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? organizationId = null,
Object? outletId = null,
Object? dateFrom = null,
Object? dateTo = null,
Object? overview = null,
Object? topProducts = null,
Object? paymentMethods = null,
Object? recentSales = null,
}) {
return _then(
_value.copyWith(
organizationId: null == organizationId
? _value.organizationId
: organizationId // ignore: cast_nullable_to_non_nullable
as String,
outletId: null == outletId
? _value.outletId
: outletId // ignore: cast_nullable_to_non_nullable
as String,
dateFrom: null == dateFrom
? _value.dateFrom
: dateFrom // ignore: cast_nullable_to_non_nullable
as String,
dateTo: null == dateTo
? _value.dateTo
: dateTo // ignore: cast_nullable_to_non_nullable
as String,
overview: null == overview
? _value.overview
: overview // ignore: cast_nullable_to_non_nullable
as DashboardOverview,
topProducts: null == topProducts
? _value.topProducts
: topProducts // ignore: cast_nullable_to_non_nullable
as List<DashboardTopProduct>,
paymentMethods: null == paymentMethods
? _value.paymentMethods
: paymentMethods // ignore: cast_nullable_to_non_nullable
as List<DashboardPaymentMethod>,
recentSales: null == recentSales
? _value.recentSales
: recentSales // ignore: cast_nullable_to_non_nullable
as List<DashboardRecentSale>,
)
as $Val,
);
}
/// Create a copy of DashboardAnalytic
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DashboardOverviewCopyWith<$Res> get overview {
return $DashboardOverviewCopyWith<$Res>(_value.overview, (value) {
return _then(_value.copyWith(overview: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$DashboardAnalyticImplCopyWith<$Res>
implements $DashboardAnalyticCopyWith<$Res> {
factory _$$DashboardAnalyticImplCopyWith(
_$DashboardAnalyticImpl value,
$Res Function(_$DashboardAnalyticImpl) then,
) = __$$DashboardAnalyticImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
String organizationId,
String outletId,
String dateFrom,
String dateTo,
DashboardOverview overview,
List<DashboardTopProduct> topProducts,
List<DashboardPaymentMethod> paymentMethods,
List<DashboardRecentSale> recentSales,
});
@override
$DashboardOverviewCopyWith<$Res> get overview;
}
/// @nodoc
class __$$DashboardAnalyticImplCopyWithImpl<$Res>
extends _$DashboardAnalyticCopyWithImpl<$Res, _$DashboardAnalyticImpl>
implements _$$DashboardAnalyticImplCopyWith<$Res> {
__$$DashboardAnalyticImplCopyWithImpl(
_$DashboardAnalyticImpl _value,
$Res Function(_$DashboardAnalyticImpl) _then,
) : super(_value, _then);
/// Create a copy of DashboardAnalytic
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? organizationId = null,
Object? outletId = null,
Object? dateFrom = null,
Object? dateTo = null,
Object? overview = null,
Object? topProducts = null,
Object? paymentMethods = null,
Object? recentSales = null,
}) {
return _then(
_$DashboardAnalyticImpl(
organizationId: null == organizationId
? _value.organizationId
: organizationId // ignore: cast_nullable_to_non_nullable
as String,
outletId: null == outletId
? _value.outletId
: outletId // ignore: cast_nullable_to_non_nullable
as String,
dateFrom: null == dateFrom
? _value.dateFrom
: dateFrom // ignore: cast_nullable_to_non_nullable
as String,
dateTo: null == dateTo
? _value.dateTo
: dateTo // ignore: cast_nullable_to_non_nullable
as String,
overview: null == overview
? _value.overview
: overview // ignore: cast_nullable_to_non_nullable
as DashboardOverview,
topProducts: null == topProducts
? _value._topProducts
: topProducts // ignore: cast_nullable_to_non_nullable
as List<DashboardTopProduct>,
paymentMethods: null == paymentMethods
? _value._paymentMethods
: paymentMethods // ignore: cast_nullable_to_non_nullable
as List<DashboardPaymentMethod>,
recentSales: null == recentSales
? _value._recentSales
: recentSales // ignore: cast_nullable_to_non_nullable
as List<DashboardRecentSale>,
),
);
}
}
/// @nodoc
class _$DashboardAnalyticImpl implements _DashboardAnalytic {
const _$DashboardAnalyticImpl({
required this.organizationId,
required this.outletId,
required this.dateFrom,
required this.dateTo,
required this.overview,
required final List<DashboardTopProduct> topProducts,
required final List<DashboardPaymentMethod> paymentMethods,
required final List<DashboardRecentSale> recentSales,
}) : _topProducts = topProducts,
_paymentMethods = paymentMethods,
_recentSales = recentSales;
@override
final String organizationId;
@override
final String outletId;
@override
final String dateFrom;
@override
final String dateTo;
@override
final DashboardOverview overview;
final List<DashboardTopProduct> _topProducts;
@override
List<DashboardTopProduct> get topProducts {
if (_topProducts is EqualUnmodifiableListView) return _topProducts;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_topProducts);
}
final List<DashboardPaymentMethod> _paymentMethods;
@override
List<DashboardPaymentMethod> get paymentMethods {
if (_paymentMethods is EqualUnmodifiableListView) return _paymentMethods;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_paymentMethods);
}
final List<DashboardRecentSale> _recentSales;
@override
List<DashboardRecentSale> get recentSales {
if (_recentSales is EqualUnmodifiableListView) return _recentSales;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_recentSales);
}
@override
String toString() {
return 'DashboardAnalytic(organizationId: $organizationId, outletId: $outletId, dateFrom: $dateFrom, dateTo: $dateTo, overview: $overview, topProducts: $topProducts, paymentMethods: $paymentMethods, recentSales: $recentSales)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DashboardAnalyticImpl &&
(identical(other.organizationId, organizationId) ||
other.organizationId == organizationId) &&
(identical(other.outletId, outletId) ||
other.outletId == outletId) &&
(identical(other.dateFrom, dateFrom) ||
other.dateFrom == dateFrom) &&
(identical(other.dateTo, dateTo) || other.dateTo == dateTo) &&
(identical(other.overview, overview) ||
other.overview == overview) &&
const DeepCollectionEquality().equals(
other._topProducts,
_topProducts,
) &&
const DeepCollectionEquality().equals(
other._paymentMethods,
_paymentMethods,
) &&
const DeepCollectionEquality().equals(
other._recentSales,
_recentSales,
));
}
@override
int get hashCode => Object.hash(
runtimeType,
organizationId,
outletId,
dateFrom,
dateTo,
overview,
const DeepCollectionEquality().hash(_topProducts),
const DeepCollectionEquality().hash(_paymentMethods),
const DeepCollectionEquality().hash(_recentSales),
);
/// Create a copy of DashboardAnalytic
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DashboardAnalyticImplCopyWith<_$DashboardAnalyticImpl> get copyWith =>
__$$DashboardAnalyticImplCopyWithImpl<_$DashboardAnalyticImpl>(
this,
_$identity,
);
}
abstract class _DashboardAnalytic implements DashboardAnalytic {
const factory _DashboardAnalytic({
required final String organizationId,
required final String outletId,
required final String dateFrom,
required final String dateTo,
required final DashboardOverview overview,
required final List<DashboardTopProduct> topProducts,
required final List<DashboardPaymentMethod> paymentMethods,
required final List<DashboardRecentSale> recentSales,
}) = _$DashboardAnalyticImpl;
@override
String get organizationId;
@override
String get outletId;
@override
String get dateFrom;
@override
String get dateTo;
@override
DashboardOverview get overview;
@override
List<DashboardTopProduct> get topProducts;
@override
List<DashboardPaymentMethod> get paymentMethods;
@override
List<DashboardRecentSale> get recentSales;
/// Create a copy of DashboardAnalytic
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DashboardAnalyticImplCopyWith<_$DashboardAnalyticImpl> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
mixin _$DashboardOverview {
int get totalSales => throw _privateConstructorUsedError;
int get totalOrders => throw _privateConstructorUsedError;
double get averageOrderValue => throw _privateConstructorUsedError;
int get totalCustomers => throw _privateConstructorUsedError;
int get voidedOrders => throw _privateConstructorUsedError;
int get refundedOrders => throw _privateConstructorUsedError;
/// Create a copy of DashboardOverview
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$DashboardOverviewCopyWith<DashboardOverview> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $DashboardOverviewCopyWith<$Res> {
factory $DashboardOverviewCopyWith(
DashboardOverview value,
$Res Function(DashboardOverview) then,
) = _$DashboardOverviewCopyWithImpl<$Res, DashboardOverview>;
@useResult
$Res call({
int totalSales,
int totalOrders,
double averageOrderValue,
int totalCustomers,
int voidedOrders,
int refundedOrders,
});
}
/// @nodoc
class _$DashboardOverviewCopyWithImpl<$Res, $Val extends DashboardOverview>
implements $DashboardOverviewCopyWith<$Res> {
_$DashboardOverviewCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of DashboardOverview
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? totalSales = null,
Object? totalOrders = null,
Object? averageOrderValue = null,
Object? totalCustomers = null,
Object? voidedOrders = null,
Object? refundedOrders = null,
}) {
return _then(
_value.copyWith(
totalSales: null == totalSales
? _value.totalSales
: totalSales // ignore: cast_nullable_to_non_nullable
as int,
totalOrders: null == totalOrders
? _value.totalOrders
: totalOrders // ignore: cast_nullable_to_non_nullable
as int,
averageOrderValue: null == averageOrderValue
? _value.averageOrderValue
: averageOrderValue // ignore: cast_nullable_to_non_nullable
as double,
totalCustomers: null == totalCustomers
? _value.totalCustomers
: totalCustomers // ignore: cast_nullable_to_non_nullable
as int,
voidedOrders: null == voidedOrders
? _value.voidedOrders
: voidedOrders // ignore: cast_nullable_to_non_nullable
as int,
refundedOrders: null == refundedOrders
? _value.refundedOrders
: refundedOrders // ignore: cast_nullable_to_non_nullable
as int,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$DashboardOverviewImplCopyWith<$Res>
implements $DashboardOverviewCopyWith<$Res> {
factory _$$DashboardOverviewImplCopyWith(
_$DashboardOverviewImpl value,
$Res Function(_$DashboardOverviewImpl) then,
) = __$$DashboardOverviewImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
int totalSales,
int totalOrders,
double averageOrderValue,
int totalCustomers,
int voidedOrders,
int refundedOrders,
});
}
/// @nodoc
class __$$DashboardOverviewImplCopyWithImpl<$Res>
extends _$DashboardOverviewCopyWithImpl<$Res, _$DashboardOverviewImpl>
implements _$$DashboardOverviewImplCopyWith<$Res> {
__$$DashboardOverviewImplCopyWithImpl(
_$DashboardOverviewImpl _value,
$Res Function(_$DashboardOverviewImpl) _then,
) : super(_value, _then);
/// Create a copy of DashboardOverview
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? totalSales = null,
Object? totalOrders = null,
Object? averageOrderValue = null,
Object? totalCustomers = null,
Object? voidedOrders = null,
Object? refundedOrders = null,
}) {
return _then(
_$DashboardOverviewImpl(
totalSales: null == totalSales
? _value.totalSales
: totalSales // ignore: cast_nullable_to_non_nullable
as int,
totalOrders: null == totalOrders
? _value.totalOrders
: totalOrders // ignore: cast_nullable_to_non_nullable
as int,
averageOrderValue: null == averageOrderValue
? _value.averageOrderValue
: averageOrderValue // ignore: cast_nullable_to_non_nullable
as double,
totalCustomers: null == totalCustomers
? _value.totalCustomers
: totalCustomers // ignore: cast_nullable_to_non_nullable
as int,
voidedOrders: null == voidedOrders
? _value.voidedOrders
: voidedOrders // ignore: cast_nullable_to_non_nullable
as int,
refundedOrders: null == refundedOrders
? _value.refundedOrders
: refundedOrders // ignore: cast_nullable_to_non_nullable
as int,
),
);
}
}
/// @nodoc
class _$DashboardOverviewImpl implements _DashboardOverview {
const _$DashboardOverviewImpl({
required this.totalSales,
required this.totalOrders,
required this.averageOrderValue,
required this.totalCustomers,
required this.voidedOrders,
required this.refundedOrders,
});
@override
final int totalSales;
@override
final int totalOrders;
@override
final double averageOrderValue;
@override
final int totalCustomers;
@override
final int voidedOrders;
@override
final int refundedOrders;
@override
String toString() {
return 'DashboardOverview(totalSales: $totalSales, totalOrders: $totalOrders, averageOrderValue: $averageOrderValue, totalCustomers: $totalCustomers, voidedOrders: $voidedOrders, refundedOrders: $refundedOrders)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DashboardOverviewImpl &&
(identical(other.totalSales, totalSales) ||
other.totalSales == totalSales) &&
(identical(other.totalOrders, totalOrders) ||
other.totalOrders == totalOrders) &&
(identical(other.averageOrderValue, averageOrderValue) ||
other.averageOrderValue == averageOrderValue) &&
(identical(other.totalCustomers, totalCustomers) ||
other.totalCustomers == totalCustomers) &&
(identical(other.voidedOrders, voidedOrders) ||
other.voidedOrders == voidedOrders) &&
(identical(other.refundedOrders, refundedOrders) ||
other.refundedOrders == refundedOrders));
}
@override
int get hashCode => Object.hash(
runtimeType,
totalSales,
totalOrders,
averageOrderValue,
totalCustomers,
voidedOrders,
refundedOrders,
);
/// Create a copy of DashboardOverview
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DashboardOverviewImplCopyWith<_$DashboardOverviewImpl> get copyWith =>
__$$DashboardOverviewImplCopyWithImpl<_$DashboardOverviewImpl>(
this,
_$identity,
);
}
abstract class _DashboardOverview implements DashboardOverview {
const factory _DashboardOverview({
required final int totalSales,
required final int totalOrders,
required final double averageOrderValue,
required final int totalCustomers,
required final int voidedOrders,
required final int refundedOrders,
}) = _$DashboardOverviewImpl;
@override
int get totalSales;
@override
int get totalOrders;
@override
double get averageOrderValue;
@override
int get totalCustomers;
@override
int get voidedOrders;
@override
int get refundedOrders;
/// Create a copy of DashboardOverview
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DashboardOverviewImplCopyWith<_$DashboardOverviewImpl> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
mixin _$DashboardTopProduct {
String get productId => throw _privateConstructorUsedError;
String get productName => throw _privateConstructorUsedError;
String get categoryId => throw _privateConstructorUsedError;
String get categoryName => throw _privateConstructorUsedError;
int get quantitySold => throw _privateConstructorUsedError;
int get revenue => throw _privateConstructorUsedError;
double get averagePrice => throw _privateConstructorUsedError;
int get orderCount => throw _privateConstructorUsedError;
/// Create a copy of DashboardTopProduct
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$DashboardTopProductCopyWith<DashboardTopProduct> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $DashboardTopProductCopyWith<$Res> {
factory $DashboardTopProductCopyWith(
DashboardTopProduct value,
$Res Function(DashboardTopProduct) then,
) = _$DashboardTopProductCopyWithImpl<$Res, DashboardTopProduct>;
@useResult
$Res call({
String productId,
String productName,
String categoryId,
String categoryName,
int quantitySold,
int revenue,
double averagePrice,
int orderCount,
});
}
/// @nodoc
class _$DashboardTopProductCopyWithImpl<$Res, $Val extends DashboardTopProduct>
implements $DashboardTopProductCopyWith<$Res> {
_$DashboardTopProductCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of DashboardTopProduct
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? productId = null,
Object? productName = null,
Object? categoryId = null,
Object? categoryName = null,
Object? quantitySold = null,
Object? revenue = null,
Object? averagePrice = null,
Object? orderCount = null,
}) {
return _then(
_value.copyWith(
productId: null == productId
? _value.productId
: productId // ignore: cast_nullable_to_non_nullable
as String,
productName: null == productName
? _value.productName
: productName // ignore: cast_nullable_to_non_nullable
as String,
categoryId: null == categoryId
? _value.categoryId
: categoryId // ignore: cast_nullable_to_non_nullable
as String,
categoryName: null == categoryName
? _value.categoryName
: categoryName // ignore: cast_nullable_to_non_nullable
as String,
quantitySold: null == quantitySold
? _value.quantitySold
: quantitySold // ignore: cast_nullable_to_non_nullable
as int,
revenue: null == revenue
? _value.revenue
: revenue // ignore: cast_nullable_to_non_nullable
as int,
averagePrice: null == averagePrice
? _value.averagePrice
: averagePrice // ignore: cast_nullable_to_non_nullable
as double,
orderCount: null == orderCount
? _value.orderCount
: orderCount // ignore: cast_nullable_to_non_nullable
as int,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$DashboardTopProductImplCopyWith<$Res>
implements $DashboardTopProductCopyWith<$Res> {
factory _$$DashboardTopProductImplCopyWith(
_$DashboardTopProductImpl value,
$Res Function(_$DashboardTopProductImpl) then,
) = __$$DashboardTopProductImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
String productId,
String productName,
String categoryId,
String categoryName,
int quantitySold,
int revenue,
double averagePrice,
int orderCount,
});
}
/// @nodoc
class __$$DashboardTopProductImplCopyWithImpl<$Res>
extends _$DashboardTopProductCopyWithImpl<$Res, _$DashboardTopProductImpl>
implements _$$DashboardTopProductImplCopyWith<$Res> {
__$$DashboardTopProductImplCopyWithImpl(
_$DashboardTopProductImpl _value,
$Res Function(_$DashboardTopProductImpl) _then,
) : super(_value, _then);
/// Create a copy of DashboardTopProduct
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? productId = null,
Object? productName = null,
Object? categoryId = null,
Object? categoryName = null,
Object? quantitySold = null,
Object? revenue = null,
Object? averagePrice = null,
Object? orderCount = null,
}) {
return _then(
_$DashboardTopProductImpl(
productId: null == productId
? _value.productId
: productId // ignore: cast_nullable_to_non_nullable
as String,
productName: null == productName
? _value.productName
: productName // ignore: cast_nullable_to_non_nullable
as String,
categoryId: null == categoryId
? _value.categoryId
: categoryId // ignore: cast_nullable_to_non_nullable
as String,
categoryName: null == categoryName
? _value.categoryName
: categoryName // ignore: cast_nullable_to_non_nullable
as String,
quantitySold: null == quantitySold
? _value.quantitySold
: quantitySold // ignore: cast_nullable_to_non_nullable
as int,
revenue: null == revenue
? _value.revenue
: revenue // ignore: cast_nullable_to_non_nullable
as int,
averagePrice: null == averagePrice
? _value.averagePrice
: averagePrice // ignore: cast_nullable_to_non_nullable
as double,
orderCount: null == orderCount
? _value.orderCount
: orderCount // ignore: cast_nullable_to_non_nullable
as int,
),
);
}
}
/// @nodoc
class _$DashboardTopProductImpl implements _DashboardTopProduct {
const _$DashboardTopProductImpl({
required this.productId,
required this.productName,
required this.categoryId,
required this.categoryName,
required this.quantitySold,
required this.revenue,
required this.averagePrice,
required this.orderCount,
});
@override
final String productId;
@override
final String productName;
@override
final String categoryId;
@override
final String categoryName;
@override
final int quantitySold;
@override
final int revenue;
@override
final double averagePrice;
@override
final int orderCount;
@override
String toString() {
return 'DashboardTopProduct(productId: $productId, productName: $productName, categoryId: $categoryId, categoryName: $categoryName, quantitySold: $quantitySold, revenue: $revenue, averagePrice: $averagePrice, orderCount: $orderCount)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DashboardTopProductImpl &&
(identical(other.productId, productId) ||
other.productId == productId) &&
(identical(other.productName, productName) ||
other.productName == productName) &&
(identical(other.categoryId, categoryId) ||
other.categoryId == categoryId) &&
(identical(other.categoryName, categoryName) ||
other.categoryName == categoryName) &&
(identical(other.quantitySold, quantitySold) ||
other.quantitySold == quantitySold) &&
(identical(other.revenue, revenue) || other.revenue == revenue) &&
(identical(other.averagePrice, averagePrice) ||
other.averagePrice == averagePrice) &&
(identical(other.orderCount, orderCount) ||
other.orderCount == orderCount));
}
@override
int get hashCode => Object.hash(
runtimeType,
productId,
productName,
categoryId,
categoryName,
quantitySold,
revenue,
averagePrice,
orderCount,
);
/// Create a copy of DashboardTopProduct
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DashboardTopProductImplCopyWith<_$DashboardTopProductImpl> get copyWith =>
__$$DashboardTopProductImplCopyWithImpl<_$DashboardTopProductImpl>(
this,
_$identity,
);
}
abstract class _DashboardTopProduct implements DashboardTopProduct {
const factory _DashboardTopProduct({
required final String productId,
required final String productName,
required final String categoryId,
required final String categoryName,
required final int quantitySold,
required final int revenue,
required final double averagePrice,
required final int orderCount,
}) = _$DashboardTopProductImpl;
@override
String get productId;
@override
String get productName;
@override
String get categoryId;
@override
String get categoryName;
@override
int get quantitySold;
@override
int get revenue;
@override
double get averagePrice;
@override
int get orderCount;
/// Create a copy of DashboardTopProduct
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DashboardTopProductImplCopyWith<_$DashboardTopProductImpl> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
mixin _$DashboardPaymentMethod {
String get paymentMethodId => throw _privateConstructorUsedError;
String get paymentMethodName => throw _privateConstructorUsedError;
String get paymentMethodType => throw _privateConstructorUsedError;
int get totalAmount => throw _privateConstructorUsedError;
int get orderCount => throw _privateConstructorUsedError;
int get paymentCount => throw _privateConstructorUsedError;
double get percentage => throw _privateConstructorUsedError;
/// Create a copy of DashboardPaymentMethod
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$DashboardPaymentMethodCopyWith<DashboardPaymentMethod> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $DashboardPaymentMethodCopyWith<$Res> {
factory $DashboardPaymentMethodCopyWith(
DashboardPaymentMethod value,
$Res Function(DashboardPaymentMethod) then,
) = _$DashboardPaymentMethodCopyWithImpl<$Res, DashboardPaymentMethod>;
@useResult
$Res call({
String paymentMethodId,
String paymentMethodName,
String paymentMethodType,
int totalAmount,
int orderCount,
int paymentCount,
double percentage,
});
}
/// @nodoc
class _$DashboardPaymentMethodCopyWithImpl<
$Res,
$Val extends DashboardPaymentMethod
>
implements $DashboardPaymentMethodCopyWith<$Res> {
_$DashboardPaymentMethodCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of DashboardPaymentMethod
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? paymentMethodId = null,
Object? paymentMethodName = null,
Object? paymentMethodType = null,
Object? totalAmount = null,
Object? orderCount = null,
Object? paymentCount = null,
Object? percentage = null,
}) {
return _then(
_value.copyWith(
paymentMethodId: null == paymentMethodId
? _value.paymentMethodId
: paymentMethodId // ignore: cast_nullable_to_non_nullable
as String,
paymentMethodName: null == paymentMethodName
? _value.paymentMethodName
: paymentMethodName // ignore: cast_nullable_to_non_nullable
as String,
paymentMethodType: null == paymentMethodType
? _value.paymentMethodType
: paymentMethodType // ignore: cast_nullable_to_non_nullable
as String,
totalAmount: null == totalAmount
? _value.totalAmount
: totalAmount // ignore: cast_nullable_to_non_nullable
as int,
orderCount: null == orderCount
? _value.orderCount
: orderCount // ignore: cast_nullable_to_non_nullable
as int,
paymentCount: null == paymentCount
? _value.paymentCount
: paymentCount // ignore: cast_nullable_to_non_nullable
as int,
percentage: null == percentage
? _value.percentage
: percentage // ignore: cast_nullable_to_non_nullable
as double,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$DashboardPaymentMethodImplCopyWith<$Res>
implements $DashboardPaymentMethodCopyWith<$Res> {
factory _$$DashboardPaymentMethodImplCopyWith(
_$DashboardPaymentMethodImpl value,
$Res Function(_$DashboardPaymentMethodImpl) then,
) = __$$DashboardPaymentMethodImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
String paymentMethodId,
String paymentMethodName,
String paymentMethodType,
int totalAmount,
int orderCount,
int paymentCount,
double percentage,
});
}
/// @nodoc
class __$$DashboardPaymentMethodImplCopyWithImpl<$Res>
extends
_$DashboardPaymentMethodCopyWithImpl<$Res, _$DashboardPaymentMethodImpl>
implements _$$DashboardPaymentMethodImplCopyWith<$Res> {
__$$DashboardPaymentMethodImplCopyWithImpl(
_$DashboardPaymentMethodImpl _value,
$Res Function(_$DashboardPaymentMethodImpl) _then,
) : super(_value, _then);
/// Create a copy of DashboardPaymentMethod
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? paymentMethodId = null,
Object? paymentMethodName = null,
Object? paymentMethodType = null,
Object? totalAmount = null,
Object? orderCount = null,
Object? paymentCount = null,
Object? percentage = null,
}) {
return _then(
_$DashboardPaymentMethodImpl(
paymentMethodId: null == paymentMethodId
? _value.paymentMethodId
: paymentMethodId // ignore: cast_nullable_to_non_nullable
as String,
paymentMethodName: null == paymentMethodName
? _value.paymentMethodName
: paymentMethodName // ignore: cast_nullable_to_non_nullable
as String,
paymentMethodType: null == paymentMethodType
? _value.paymentMethodType
: paymentMethodType // ignore: cast_nullable_to_non_nullable
as String,
totalAmount: null == totalAmount
? _value.totalAmount
: totalAmount // ignore: cast_nullable_to_non_nullable
as int,
orderCount: null == orderCount
? _value.orderCount
: orderCount // ignore: cast_nullable_to_non_nullable
as int,
paymentCount: null == paymentCount
? _value.paymentCount
: paymentCount // ignore: cast_nullable_to_non_nullable
as int,
percentage: null == percentage
? _value.percentage
: percentage // ignore: cast_nullable_to_non_nullable
as double,
),
);
}
}
/// @nodoc
class _$DashboardPaymentMethodImpl implements _DashboardPaymentMethod {
const _$DashboardPaymentMethodImpl({
required this.paymentMethodId,
required this.paymentMethodName,
required this.paymentMethodType,
required this.totalAmount,
required this.orderCount,
required this.paymentCount,
required this.percentage,
});
@override
final String paymentMethodId;
@override
final String paymentMethodName;
@override
final String paymentMethodType;
@override
final int totalAmount;
@override
final int orderCount;
@override
final int paymentCount;
@override
final double percentage;
@override
String toString() {
return 'DashboardPaymentMethod(paymentMethodId: $paymentMethodId, paymentMethodName: $paymentMethodName, paymentMethodType: $paymentMethodType, totalAmount: $totalAmount, orderCount: $orderCount, paymentCount: $paymentCount, percentage: $percentage)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DashboardPaymentMethodImpl &&
(identical(other.paymentMethodId, paymentMethodId) ||
other.paymentMethodId == paymentMethodId) &&
(identical(other.paymentMethodName, paymentMethodName) ||
other.paymentMethodName == paymentMethodName) &&
(identical(other.paymentMethodType, paymentMethodType) ||
other.paymentMethodType == paymentMethodType) &&
(identical(other.totalAmount, totalAmount) ||
other.totalAmount == totalAmount) &&
(identical(other.orderCount, orderCount) ||
other.orderCount == orderCount) &&
(identical(other.paymentCount, paymentCount) ||
other.paymentCount == paymentCount) &&
(identical(other.percentage, percentage) ||
other.percentage == percentage));
}
@override
int get hashCode => Object.hash(
runtimeType,
paymentMethodId,
paymentMethodName,
paymentMethodType,
totalAmount,
orderCount,
paymentCount,
percentage,
);
/// Create a copy of DashboardPaymentMethod
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DashboardPaymentMethodImplCopyWith<_$DashboardPaymentMethodImpl>
get copyWith =>
__$$DashboardPaymentMethodImplCopyWithImpl<_$DashboardPaymentMethodImpl>(
this,
_$identity,
);
}
abstract class _DashboardPaymentMethod implements DashboardPaymentMethod {
const factory _DashboardPaymentMethod({
required final String paymentMethodId,
required final String paymentMethodName,
required final String paymentMethodType,
required final int totalAmount,
required final int orderCount,
required final int paymentCount,
required final double percentage,
}) = _$DashboardPaymentMethodImpl;
@override
String get paymentMethodId;
@override
String get paymentMethodName;
@override
String get paymentMethodType;
@override
int get totalAmount;
@override
int get orderCount;
@override
int get paymentCount;
@override
double get percentage;
/// Create a copy of DashboardPaymentMethod
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DashboardPaymentMethodImplCopyWith<_$DashboardPaymentMethodImpl>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
mixin _$DashboardRecentSale {
String get date => throw _privateConstructorUsedError;
int get sales => throw _privateConstructorUsedError;
int get orders => throw _privateConstructorUsedError;
int get items => throw _privateConstructorUsedError;
int get tax => throw _privateConstructorUsedError;
int get discount => throw _privateConstructorUsedError;
int get netSales => throw _privateConstructorUsedError;
/// Create a copy of DashboardRecentSale
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$DashboardRecentSaleCopyWith<DashboardRecentSale> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $DashboardRecentSaleCopyWith<$Res> {
factory $DashboardRecentSaleCopyWith(
DashboardRecentSale value,
$Res Function(DashboardRecentSale) then,
) = _$DashboardRecentSaleCopyWithImpl<$Res, DashboardRecentSale>;
@useResult
$Res call({
String date,
int sales,
int orders,
int items,
int tax,
int discount,
int netSales,
});
}
/// @nodoc
class _$DashboardRecentSaleCopyWithImpl<$Res, $Val extends DashboardRecentSale>
implements $DashboardRecentSaleCopyWith<$Res> {
_$DashboardRecentSaleCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of DashboardRecentSale
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? date = null,
Object? sales = null,
Object? orders = null,
Object? items = null,
Object? tax = null,
Object? discount = null,
Object? netSales = null,
}) {
return _then(
_value.copyWith(
date: null == date
? _value.date
: date // ignore: cast_nullable_to_non_nullable
as String,
sales: null == sales
? _value.sales
: sales // ignore: cast_nullable_to_non_nullable
as int,
orders: null == orders
? _value.orders
: orders // ignore: cast_nullable_to_non_nullable
as int,
items: null == items
? _value.items
: items // ignore: cast_nullable_to_non_nullable
as int,
tax: null == tax
? _value.tax
: tax // ignore: cast_nullable_to_non_nullable
as int,
discount: null == discount
? _value.discount
: discount // ignore: cast_nullable_to_non_nullable
as int,
netSales: null == netSales
? _value.netSales
: netSales // ignore: cast_nullable_to_non_nullable
as int,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$DashboardRecentSaleImplCopyWith<$Res>
implements $DashboardRecentSaleCopyWith<$Res> {
factory _$$DashboardRecentSaleImplCopyWith(
_$DashboardRecentSaleImpl value,
$Res Function(_$DashboardRecentSaleImpl) then,
) = __$$DashboardRecentSaleImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
String date,
int sales,
int orders,
int items,
int tax,
int discount,
int netSales,
});
}
/// @nodoc
class __$$DashboardRecentSaleImplCopyWithImpl<$Res>
extends _$DashboardRecentSaleCopyWithImpl<$Res, _$DashboardRecentSaleImpl>
implements _$$DashboardRecentSaleImplCopyWith<$Res> {
__$$DashboardRecentSaleImplCopyWithImpl(
_$DashboardRecentSaleImpl _value,
$Res Function(_$DashboardRecentSaleImpl) _then,
) : super(_value, _then);
/// Create a copy of DashboardRecentSale
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? date = null,
Object? sales = null,
Object? orders = null,
Object? items = null,
Object? tax = null,
Object? discount = null,
Object? netSales = null,
}) {
return _then(
_$DashboardRecentSaleImpl(
date: null == date
? _value.date
: date // ignore: cast_nullable_to_non_nullable
as String,
sales: null == sales
? _value.sales
: sales // ignore: cast_nullable_to_non_nullable
as int,
orders: null == orders
? _value.orders
: orders // ignore: cast_nullable_to_non_nullable
as int,
items: null == items
? _value.items
: items // ignore: cast_nullable_to_non_nullable
as int,
tax: null == tax
? _value.tax
: tax // ignore: cast_nullable_to_non_nullable
as int,
discount: null == discount
? _value.discount
: discount // ignore: cast_nullable_to_non_nullable
as int,
netSales: null == netSales
? _value.netSales
: netSales // ignore: cast_nullable_to_non_nullable
as int,
),
);
}
}
/// @nodoc
class _$DashboardRecentSaleImpl implements _DashboardRecentSale {
const _$DashboardRecentSaleImpl({
required this.date,
required this.sales,
required this.orders,
required this.items,
required this.tax,
required this.discount,
required this.netSales,
});
@override
final String date;
@override
final int sales;
@override
final int orders;
@override
final int items;
@override
final int tax;
@override
final int discount;
@override
final int netSales;
@override
String toString() {
return 'DashboardRecentSale(date: $date, sales: $sales, orders: $orders, items: $items, tax: $tax, discount: $discount, netSales: $netSales)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DashboardRecentSaleImpl &&
(identical(other.date, date) || other.date == date) &&
(identical(other.sales, sales) || other.sales == sales) &&
(identical(other.orders, orders) || other.orders == orders) &&
(identical(other.items, items) || other.items == items) &&
(identical(other.tax, tax) || other.tax == tax) &&
(identical(other.discount, discount) ||
other.discount == discount) &&
(identical(other.netSales, netSales) ||
other.netSales == netSales));
}
@override
int get hashCode => Object.hash(
runtimeType,
date,
sales,
orders,
items,
tax,
discount,
netSales,
);
/// Create a copy of DashboardRecentSale
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DashboardRecentSaleImplCopyWith<_$DashboardRecentSaleImpl> get copyWith =>
__$$DashboardRecentSaleImplCopyWithImpl<_$DashboardRecentSaleImpl>(
this,
_$identity,
);
}
abstract class _DashboardRecentSale implements DashboardRecentSale {
const factory _DashboardRecentSale({
required final String date,
required final int sales,
required final int orders,
required final int items,
required final int tax,
required final int discount,
required final int netSales,
}) = _$DashboardRecentSaleImpl;
@override
String get date;
@override
int get sales;
@override
int get orders;
@override
int get items;
@override
int get tax;
@override
int get discount;
@override
int get netSales;
/// Create a copy of DashboardRecentSale
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DashboardRecentSaleImplCopyWith<_$DashboardRecentSaleImpl> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
mixin _$AnalyticFailure {
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(ApiFailure failure) serverError,
required TResult Function() unexpectedError,
required TResult Function(String erroMessage) dynamicErrorMessage,
}) => throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(ApiFailure failure)? serverError,
TResult? Function()? unexpectedError,
TResult? Function(String erroMessage)? dynamicErrorMessage,
}) => throw _privateConstructorUsedError;
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(ApiFailure failure)? serverError,
TResult Function()? unexpectedError,
TResult Function(String erroMessage)? dynamicErrorMessage,
required TResult orElse(),
}) => throw _privateConstructorUsedError;
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(_ServerError value) serverError,
required TResult Function(_UnexpectedError value) unexpectedError,
required TResult Function(_DynamicErrorMessage value) dynamicErrorMessage,
}) => throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(_ServerError value)? serverError,
TResult? Function(_UnexpectedError value)? unexpectedError,
TResult? Function(_DynamicErrorMessage value)? dynamicErrorMessage,
}) => throw _privateConstructorUsedError;
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(_ServerError value)? serverError,
TResult Function(_UnexpectedError value)? unexpectedError,
TResult Function(_DynamicErrorMessage value)? dynamicErrorMessage,
required TResult orElse(),
}) => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $AnalyticFailureCopyWith<$Res> {
factory $AnalyticFailureCopyWith(
AnalyticFailure value,
$Res Function(AnalyticFailure) then,
) = _$AnalyticFailureCopyWithImpl<$Res, AnalyticFailure>;
}
/// @nodoc
class _$AnalyticFailureCopyWithImpl<$Res, $Val extends AnalyticFailure>
implements $AnalyticFailureCopyWith<$Res> {
_$AnalyticFailureCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of AnalyticFailure
/// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
abstract class _$$ServerErrorImplCopyWith<$Res> {
factory _$$ServerErrorImplCopyWith(
_$ServerErrorImpl value,
$Res Function(_$ServerErrorImpl) then,
) = __$$ServerErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({ApiFailure failure});
$ApiFailureCopyWith<$Res> get failure;
}
/// @nodoc
class __$$ServerErrorImplCopyWithImpl<$Res>
extends _$AnalyticFailureCopyWithImpl<$Res, _$ServerErrorImpl>
implements _$$ServerErrorImplCopyWith<$Res> {
__$$ServerErrorImplCopyWithImpl(
_$ServerErrorImpl _value,
$Res Function(_$ServerErrorImpl) _then,
) : super(_value, _then);
/// Create a copy of AnalyticFailure
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? failure = null}) {
return _then(
_$ServerErrorImpl(
null == failure
? _value.failure
: failure // ignore: cast_nullable_to_non_nullable
as ApiFailure,
),
);
}
/// Create a copy of AnalyticFailure
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ApiFailureCopyWith<$Res> get failure {
return $ApiFailureCopyWith<$Res>(_value.failure, (value) {
return _then(_value.copyWith(failure: value));
});
}
}
/// @nodoc
class _$ServerErrorImpl implements _ServerError {
const _$ServerErrorImpl(this.failure);
@override
final ApiFailure failure;
@override
String toString() {
return 'AnalyticFailure.serverError(failure: $failure)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ServerErrorImpl &&
(identical(other.failure, failure) || other.failure == failure));
}
@override
int get hashCode => Object.hash(runtimeType, failure);
/// Create a copy of AnalyticFailure
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ServerErrorImplCopyWith<_$ServerErrorImpl> get copyWith =>
__$$ServerErrorImplCopyWithImpl<_$ServerErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(ApiFailure failure) serverError,
required TResult Function() unexpectedError,
required TResult Function(String erroMessage) dynamicErrorMessage,
}) {
return serverError(failure);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(ApiFailure failure)? serverError,
TResult? Function()? unexpectedError,
TResult? Function(String erroMessage)? dynamicErrorMessage,
}) {
return serverError?.call(failure);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(ApiFailure failure)? serverError,
TResult Function()? unexpectedError,
TResult Function(String erroMessage)? dynamicErrorMessage,
required TResult orElse(),
}) {
if (serverError != null) {
return serverError(failure);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(_ServerError value) serverError,
required TResult Function(_UnexpectedError value) unexpectedError,
required TResult Function(_DynamicErrorMessage value) dynamicErrorMessage,
}) {
return serverError(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(_ServerError value)? serverError,
TResult? Function(_UnexpectedError value)? unexpectedError,
TResult? Function(_DynamicErrorMessage value)? dynamicErrorMessage,
}) {
return serverError?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(_ServerError value)? serverError,
TResult Function(_UnexpectedError value)? unexpectedError,
TResult Function(_DynamicErrorMessage value)? dynamicErrorMessage,
required TResult orElse(),
}) {
if (serverError != null) {
return serverError(this);
}
return orElse();
}
}
abstract class _ServerError implements AnalyticFailure {
const factory _ServerError(final ApiFailure failure) = _$ServerErrorImpl;
ApiFailure get failure;
/// Create a copy of AnalyticFailure
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ServerErrorImplCopyWith<_$ServerErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$UnexpectedErrorImplCopyWith<$Res> {
factory _$$UnexpectedErrorImplCopyWith(
_$UnexpectedErrorImpl value,
$Res Function(_$UnexpectedErrorImpl) then,
) = __$$UnexpectedErrorImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$UnexpectedErrorImplCopyWithImpl<$Res>
extends _$AnalyticFailureCopyWithImpl<$Res, _$UnexpectedErrorImpl>
implements _$$UnexpectedErrorImplCopyWith<$Res> {
__$$UnexpectedErrorImplCopyWithImpl(
_$UnexpectedErrorImpl _value,
$Res Function(_$UnexpectedErrorImpl) _then,
) : super(_value, _then);
/// Create a copy of AnalyticFailure
/// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
class _$UnexpectedErrorImpl implements _UnexpectedError {
const _$UnexpectedErrorImpl();
@override
String toString() {
return 'AnalyticFailure.unexpectedError()';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$UnexpectedErrorImpl);
}
@override
int get hashCode => runtimeType.hashCode;
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(ApiFailure failure) serverError,
required TResult Function() unexpectedError,
required TResult Function(String erroMessage) dynamicErrorMessage,
}) {
return unexpectedError();
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(ApiFailure failure)? serverError,
TResult? Function()? unexpectedError,
TResult? Function(String erroMessage)? dynamicErrorMessage,
}) {
return unexpectedError?.call();
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(ApiFailure failure)? serverError,
TResult Function()? unexpectedError,
TResult Function(String erroMessage)? dynamicErrorMessage,
required TResult orElse(),
}) {
if (unexpectedError != null) {
return unexpectedError();
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(_ServerError value) serverError,
required TResult Function(_UnexpectedError value) unexpectedError,
required TResult Function(_DynamicErrorMessage value) dynamicErrorMessage,
}) {
return unexpectedError(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(_ServerError value)? serverError,
TResult? Function(_UnexpectedError value)? unexpectedError,
TResult? Function(_DynamicErrorMessage value)? dynamicErrorMessage,
}) {
return unexpectedError?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(_ServerError value)? serverError,
TResult Function(_UnexpectedError value)? unexpectedError,
TResult Function(_DynamicErrorMessage value)? dynamicErrorMessage,
required TResult orElse(),
}) {
if (unexpectedError != null) {
return unexpectedError(this);
}
return orElse();
}
}
abstract class _UnexpectedError implements AnalyticFailure {
const factory _UnexpectedError() = _$UnexpectedErrorImpl;
}
/// @nodoc
abstract class _$$DynamicErrorMessageImplCopyWith<$Res> {
factory _$$DynamicErrorMessageImplCopyWith(
_$DynamicErrorMessageImpl value,
$Res Function(_$DynamicErrorMessageImpl) then,
) = __$$DynamicErrorMessageImplCopyWithImpl<$Res>;
@useResult
$Res call({String erroMessage});
}
/// @nodoc
class __$$DynamicErrorMessageImplCopyWithImpl<$Res>
extends _$AnalyticFailureCopyWithImpl<$Res, _$DynamicErrorMessageImpl>
implements _$$DynamicErrorMessageImplCopyWith<$Res> {
__$$DynamicErrorMessageImplCopyWithImpl(
_$DynamicErrorMessageImpl _value,
$Res Function(_$DynamicErrorMessageImpl) _then,
) : super(_value, _then);
/// Create a copy of AnalyticFailure
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? erroMessage = null}) {
return _then(
_$DynamicErrorMessageImpl(
null == erroMessage
? _value.erroMessage
: erroMessage // ignore: cast_nullable_to_non_nullable
as String,
),
);
}
}
/// @nodoc
class _$DynamicErrorMessageImpl implements _DynamicErrorMessage {
const _$DynamicErrorMessageImpl(this.erroMessage);
@override
final String erroMessage;
@override
String toString() {
return 'AnalyticFailure.dynamicErrorMessage(erroMessage: $erroMessage)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DynamicErrorMessageImpl &&
(identical(other.erroMessage, erroMessage) ||
other.erroMessage == erroMessage));
}
@override
int get hashCode => Object.hash(runtimeType, erroMessage);
/// Create a copy of AnalyticFailure
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DynamicErrorMessageImplCopyWith<_$DynamicErrorMessageImpl> get copyWith =>
__$$DynamicErrorMessageImplCopyWithImpl<_$DynamicErrorMessageImpl>(
this,
_$identity,
);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(ApiFailure failure) serverError,
required TResult Function() unexpectedError,
required TResult Function(String erroMessage) dynamicErrorMessage,
}) {
return dynamicErrorMessage(erroMessage);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(ApiFailure failure)? serverError,
TResult? Function()? unexpectedError,
TResult? Function(String erroMessage)? dynamicErrorMessage,
}) {
return dynamicErrorMessage?.call(erroMessage);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(ApiFailure failure)? serverError,
TResult Function()? unexpectedError,
TResult Function(String erroMessage)? dynamicErrorMessage,
required TResult orElse(),
}) {
if (dynamicErrorMessage != null) {
return dynamicErrorMessage(erroMessage);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(_ServerError value) serverError,
required TResult Function(_UnexpectedError value) unexpectedError,
required TResult Function(_DynamicErrorMessage value) dynamicErrorMessage,
}) {
return dynamicErrorMessage(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(_ServerError value)? serverError,
TResult? Function(_UnexpectedError value)? unexpectedError,
TResult? Function(_DynamicErrorMessage value)? dynamicErrorMessage,
}) {
return dynamicErrorMessage?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(_ServerError value)? serverError,
TResult Function(_UnexpectedError value)? unexpectedError,
TResult Function(_DynamicErrorMessage value)? dynamicErrorMessage,
required TResult orElse(),
}) {
if (dynamicErrorMessage != null) {
return dynamicErrorMessage(this);
}
return orElse();
}
}
abstract class _DynamicErrorMessage implements AnalyticFailure {
const factory _DynamicErrorMessage(final String erroMessage) =
_$DynamicErrorMessageImpl;
String get erroMessage;
/// Create a copy of AnalyticFailure
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DynamicErrorMessageImplCopyWith<_$DynamicErrorMessageImpl> get copyWith =>
throw _privateConstructorUsedError;
}