report sales
This commit is contained in:
@@ -1493,6 +1493,862 @@ abstract class _DashboardRecentSale implements DashboardRecentSale {
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SalesAnalytic {
|
||||
String get organizationId => throw _privateConstructorUsedError;
|
||||
String get outletId => throw _privateConstructorUsedError;
|
||||
DateTime get dateFrom => throw _privateConstructorUsedError;
|
||||
DateTime get dateTo => throw _privateConstructorUsedError;
|
||||
String get groupBy => throw _privateConstructorUsedError;
|
||||
SalesSummary get summary => throw _privateConstructorUsedError;
|
||||
List<SalesAnalyticItem> get data => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of SalesAnalytic
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$SalesAnalyticCopyWith<SalesAnalytic> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $SalesAnalyticCopyWith<$Res> {
|
||||
factory $SalesAnalyticCopyWith(
|
||||
SalesAnalytic value,
|
||||
$Res Function(SalesAnalytic) then,
|
||||
) = _$SalesAnalyticCopyWithImpl<$Res, SalesAnalytic>;
|
||||
@useResult
|
||||
$Res call({
|
||||
String organizationId,
|
||||
String outletId,
|
||||
DateTime dateFrom,
|
||||
DateTime dateTo,
|
||||
String groupBy,
|
||||
SalesSummary summary,
|
||||
List<SalesAnalyticItem> data,
|
||||
});
|
||||
|
||||
$SalesSummaryCopyWith<$Res> get summary;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$SalesAnalyticCopyWithImpl<$Res, $Val extends SalesAnalytic>
|
||||
implements $SalesAnalyticCopyWith<$Res> {
|
||||
_$SalesAnalyticCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of SalesAnalytic
|
||||
/// 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? groupBy = null,
|
||||
Object? summary = null,
|
||||
Object? data = 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 DateTime,
|
||||
dateTo: null == dateTo
|
||||
? _value.dateTo
|
||||
: dateTo // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
groupBy: null == groupBy
|
||||
? _value.groupBy
|
||||
: groupBy // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
summary: null == summary
|
||||
? _value.summary
|
||||
: summary // ignore: cast_nullable_to_non_nullable
|
||||
as SalesSummary,
|
||||
data: null == data
|
||||
? _value.data
|
||||
: data // ignore: cast_nullable_to_non_nullable
|
||||
as List<SalesAnalyticItem>,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a copy of SalesAnalytic
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SalesSummaryCopyWith<$Res> get summary {
|
||||
return $SalesSummaryCopyWith<$Res>(_value.summary, (value) {
|
||||
return _then(_value.copyWith(summary: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$SalesAnalyticImplCopyWith<$Res>
|
||||
implements $SalesAnalyticCopyWith<$Res> {
|
||||
factory _$$SalesAnalyticImplCopyWith(
|
||||
_$SalesAnalyticImpl value,
|
||||
$Res Function(_$SalesAnalyticImpl) then,
|
||||
) = __$$SalesAnalyticImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
String organizationId,
|
||||
String outletId,
|
||||
DateTime dateFrom,
|
||||
DateTime dateTo,
|
||||
String groupBy,
|
||||
SalesSummary summary,
|
||||
List<SalesAnalyticItem> data,
|
||||
});
|
||||
|
||||
@override
|
||||
$SalesSummaryCopyWith<$Res> get summary;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SalesAnalyticImplCopyWithImpl<$Res>
|
||||
extends _$SalesAnalyticCopyWithImpl<$Res, _$SalesAnalyticImpl>
|
||||
implements _$$SalesAnalyticImplCopyWith<$Res> {
|
||||
__$$SalesAnalyticImplCopyWithImpl(
|
||||
_$SalesAnalyticImpl _value,
|
||||
$Res Function(_$SalesAnalyticImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of SalesAnalytic
|
||||
/// 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? groupBy = null,
|
||||
Object? summary = null,
|
||||
Object? data = null,
|
||||
}) {
|
||||
return _then(
|
||||
_$SalesAnalyticImpl(
|
||||
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 DateTime,
|
||||
dateTo: null == dateTo
|
||||
? _value.dateTo
|
||||
: dateTo // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
groupBy: null == groupBy
|
||||
? _value.groupBy
|
||||
: groupBy // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
summary: null == summary
|
||||
? _value.summary
|
||||
: summary // ignore: cast_nullable_to_non_nullable
|
||||
as SalesSummary,
|
||||
data: null == data
|
||||
? _value._data
|
||||
: data // ignore: cast_nullable_to_non_nullable
|
||||
as List<SalesAnalyticItem>,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$SalesAnalyticImpl extends _SalesAnalytic {
|
||||
const _$SalesAnalyticImpl({
|
||||
required this.organizationId,
|
||||
required this.outletId,
|
||||
required this.dateFrom,
|
||||
required this.dateTo,
|
||||
required this.groupBy,
|
||||
required this.summary,
|
||||
required final List<SalesAnalyticItem> data,
|
||||
}) : _data = data,
|
||||
super._();
|
||||
|
||||
@override
|
||||
final String organizationId;
|
||||
@override
|
||||
final String outletId;
|
||||
@override
|
||||
final DateTime dateFrom;
|
||||
@override
|
||||
final DateTime dateTo;
|
||||
@override
|
||||
final String groupBy;
|
||||
@override
|
||||
final SalesSummary summary;
|
||||
final List<SalesAnalyticItem> _data;
|
||||
@override
|
||||
List<SalesAnalyticItem> get data {
|
||||
if (_data is EqualUnmodifiableListView) return _data;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_data);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SalesAnalytic(organizationId: $organizationId, outletId: $outletId, dateFrom: $dateFrom, dateTo: $dateTo, groupBy: $groupBy, summary: $summary, data: $data)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$SalesAnalyticImpl &&
|
||||
(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.groupBy, groupBy) || other.groupBy == groupBy) &&
|
||||
(identical(other.summary, summary) || other.summary == summary) &&
|
||||
const DeepCollectionEquality().equals(other._data, _data));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
organizationId,
|
||||
outletId,
|
||||
dateFrom,
|
||||
dateTo,
|
||||
groupBy,
|
||||
summary,
|
||||
const DeepCollectionEquality().hash(_data),
|
||||
);
|
||||
|
||||
/// Create a copy of SalesAnalytic
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$SalesAnalyticImplCopyWith<_$SalesAnalyticImpl> get copyWith =>
|
||||
__$$SalesAnalyticImplCopyWithImpl<_$SalesAnalyticImpl>(this, _$identity);
|
||||
}
|
||||
|
||||
abstract class _SalesAnalytic extends SalesAnalytic {
|
||||
const factory _SalesAnalytic({
|
||||
required final String organizationId,
|
||||
required final String outletId,
|
||||
required final DateTime dateFrom,
|
||||
required final DateTime dateTo,
|
||||
required final String groupBy,
|
||||
required final SalesSummary summary,
|
||||
required final List<SalesAnalyticItem> data,
|
||||
}) = _$SalesAnalyticImpl;
|
||||
const _SalesAnalytic._() : super._();
|
||||
|
||||
@override
|
||||
String get organizationId;
|
||||
@override
|
||||
String get outletId;
|
||||
@override
|
||||
DateTime get dateFrom;
|
||||
@override
|
||||
DateTime get dateTo;
|
||||
@override
|
||||
String get groupBy;
|
||||
@override
|
||||
SalesSummary get summary;
|
||||
@override
|
||||
List<SalesAnalyticItem> get data;
|
||||
|
||||
/// Create a copy of SalesAnalytic
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$SalesAnalyticImplCopyWith<_$SalesAnalyticImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SalesSummary {
|
||||
int get totalSales => throw _privateConstructorUsedError;
|
||||
int get totalOrders => throw _privateConstructorUsedError;
|
||||
int get totalItems => throw _privateConstructorUsedError;
|
||||
double get averageOrderValue => throw _privateConstructorUsedError;
|
||||
int get totalTax => throw _privateConstructorUsedError;
|
||||
int get totalDiscount => throw _privateConstructorUsedError;
|
||||
int get netSales => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of SalesSummary
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$SalesSummaryCopyWith<SalesSummary> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $SalesSummaryCopyWith<$Res> {
|
||||
factory $SalesSummaryCopyWith(
|
||||
SalesSummary value,
|
||||
$Res Function(SalesSummary) then,
|
||||
) = _$SalesSummaryCopyWithImpl<$Res, SalesSummary>;
|
||||
@useResult
|
||||
$Res call({
|
||||
int totalSales,
|
||||
int totalOrders,
|
||||
int totalItems,
|
||||
double averageOrderValue,
|
||||
int totalTax,
|
||||
int totalDiscount,
|
||||
int netSales,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$SalesSummaryCopyWithImpl<$Res, $Val extends SalesSummary>
|
||||
implements $SalesSummaryCopyWith<$Res> {
|
||||
_$SalesSummaryCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of SalesSummary
|
||||
/// 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? totalItems = null,
|
||||
Object? averageOrderValue = null,
|
||||
Object? totalTax = null,
|
||||
Object? totalDiscount = null,
|
||||
Object? netSales = 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,
|
||||
totalItems: null == totalItems
|
||||
? _value.totalItems
|
||||
: totalItems // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
averageOrderValue: null == averageOrderValue
|
||||
? _value.averageOrderValue
|
||||
: averageOrderValue // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
totalTax: null == totalTax
|
||||
? _value.totalTax
|
||||
: totalTax // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalDiscount: null == totalDiscount
|
||||
? _value.totalDiscount
|
||||
: totalDiscount // 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 _$$SalesSummaryImplCopyWith<$Res>
|
||||
implements $SalesSummaryCopyWith<$Res> {
|
||||
factory _$$SalesSummaryImplCopyWith(
|
||||
_$SalesSummaryImpl value,
|
||||
$Res Function(_$SalesSummaryImpl) then,
|
||||
) = __$$SalesSummaryImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
int totalSales,
|
||||
int totalOrders,
|
||||
int totalItems,
|
||||
double averageOrderValue,
|
||||
int totalTax,
|
||||
int totalDiscount,
|
||||
int netSales,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SalesSummaryImplCopyWithImpl<$Res>
|
||||
extends _$SalesSummaryCopyWithImpl<$Res, _$SalesSummaryImpl>
|
||||
implements _$$SalesSummaryImplCopyWith<$Res> {
|
||||
__$$SalesSummaryImplCopyWithImpl(
|
||||
_$SalesSummaryImpl _value,
|
||||
$Res Function(_$SalesSummaryImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of SalesSummary
|
||||
/// 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? totalItems = null,
|
||||
Object? averageOrderValue = null,
|
||||
Object? totalTax = null,
|
||||
Object? totalDiscount = null,
|
||||
Object? netSales = null,
|
||||
}) {
|
||||
return _then(
|
||||
_$SalesSummaryImpl(
|
||||
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,
|
||||
totalItems: null == totalItems
|
||||
? _value.totalItems
|
||||
: totalItems // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
averageOrderValue: null == averageOrderValue
|
||||
? _value.averageOrderValue
|
||||
: averageOrderValue // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
totalTax: null == totalTax
|
||||
? _value.totalTax
|
||||
: totalTax // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalDiscount: null == totalDiscount
|
||||
? _value.totalDiscount
|
||||
: totalDiscount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
netSales: null == netSales
|
||||
? _value.netSales
|
||||
: netSales // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$SalesSummaryImpl implements _SalesSummary {
|
||||
const _$SalesSummaryImpl({
|
||||
required this.totalSales,
|
||||
required this.totalOrders,
|
||||
required this.totalItems,
|
||||
required this.averageOrderValue,
|
||||
required this.totalTax,
|
||||
required this.totalDiscount,
|
||||
required this.netSales,
|
||||
});
|
||||
|
||||
@override
|
||||
final int totalSales;
|
||||
@override
|
||||
final int totalOrders;
|
||||
@override
|
||||
final int totalItems;
|
||||
@override
|
||||
final double averageOrderValue;
|
||||
@override
|
||||
final int totalTax;
|
||||
@override
|
||||
final int totalDiscount;
|
||||
@override
|
||||
final int netSales;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SalesSummary(totalSales: $totalSales, totalOrders: $totalOrders, totalItems: $totalItems, averageOrderValue: $averageOrderValue, totalTax: $totalTax, totalDiscount: $totalDiscount, netSales: $netSales)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$SalesSummaryImpl &&
|
||||
(identical(other.totalSales, totalSales) ||
|
||||
other.totalSales == totalSales) &&
|
||||
(identical(other.totalOrders, totalOrders) ||
|
||||
other.totalOrders == totalOrders) &&
|
||||
(identical(other.totalItems, totalItems) ||
|
||||
other.totalItems == totalItems) &&
|
||||
(identical(other.averageOrderValue, averageOrderValue) ||
|
||||
other.averageOrderValue == averageOrderValue) &&
|
||||
(identical(other.totalTax, totalTax) ||
|
||||
other.totalTax == totalTax) &&
|
||||
(identical(other.totalDiscount, totalDiscount) ||
|
||||
other.totalDiscount == totalDiscount) &&
|
||||
(identical(other.netSales, netSales) ||
|
||||
other.netSales == netSales));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
totalSales,
|
||||
totalOrders,
|
||||
totalItems,
|
||||
averageOrderValue,
|
||||
totalTax,
|
||||
totalDiscount,
|
||||
netSales,
|
||||
);
|
||||
|
||||
/// Create a copy of SalesSummary
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$SalesSummaryImplCopyWith<_$SalesSummaryImpl> get copyWith =>
|
||||
__$$SalesSummaryImplCopyWithImpl<_$SalesSummaryImpl>(this, _$identity);
|
||||
}
|
||||
|
||||
abstract class _SalesSummary implements SalesSummary {
|
||||
const factory _SalesSummary({
|
||||
required final int totalSales,
|
||||
required final int totalOrders,
|
||||
required final int totalItems,
|
||||
required final double averageOrderValue,
|
||||
required final int totalTax,
|
||||
required final int totalDiscount,
|
||||
required final int netSales,
|
||||
}) = _$SalesSummaryImpl;
|
||||
|
||||
@override
|
||||
int get totalSales;
|
||||
@override
|
||||
int get totalOrders;
|
||||
@override
|
||||
int get totalItems;
|
||||
@override
|
||||
double get averageOrderValue;
|
||||
@override
|
||||
int get totalTax;
|
||||
@override
|
||||
int get totalDiscount;
|
||||
@override
|
||||
int get netSales;
|
||||
|
||||
/// Create a copy of SalesSummary
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$SalesSummaryImplCopyWith<_$SalesSummaryImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SalesAnalyticItem {
|
||||
DateTime 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 SalesAnalyticItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$SalesAnalyticItemCopyWith<SalesAnalyticItem> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $SalesAnalyticItemCopyWith<$Res> {
|
||||
factory $SalesAnalyticItemCopyWith(
|
||||
SalesAnalyticItem value,
|
||||
$Res Function(SalesAnalyticItem) then,
|
||||
) = _$SalesAnalyticItemCopyWithImpl<$Res, SalesAnalyticItem>;
|
||||
@useResult
|
||||
$Res call({
|
||||
DateTime date,
|
||||
int sales,
|
||||
int orders,
|
||||
int items,
|
||||
int tax,
|
||||
int discount,
|
||||
int netSales,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$SalesAnalyticItemCopyWithImpl<$Res, $Val extends SalesAnalyticItem>
|
||||
implements $SalesAnalyticItemCopyWith<$Res> {
|
||||
_$SalesAnalyticItemCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of SalesAnalyticItem
|
||||
/// 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 DateTime,
|
||||
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 _$$SalesAnalyticItemImplCopyWith<$Res>
|
||||
implements $SalesAnalyticItemCopyWith<$Res> {
|
||||
factory _$$SalesAnalyticItemImplCopyWith(
|
||||
_$SalesAnalyticItemImpl value,
|
||||
$Res Function(_$SalesAnalyticItemImpl) then,
|
||||
) = __$$SalesAnalyticItemImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
DateTime date,
|
||||
int sales,
|
||||
int orders,
|
||||
int items,
|
||||
int tax,
|
||||
int discount,
|
||||
int netSales,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SalesAnalyticItemImplCopyWithImpl<$Res>
|
||||
extends _$SalesAnalyticItemCopyWithImpl<$Res, _$SalesAnalyticItemImpl>
|
||||
implements _$$SalesAnalyticItemImplCopyWith<$Res> {
|
||||
__$$SalesAnalyticItemImplCopyWithImpl(
|
||||
_$SalesAnalyticItemImpl _value,
|
||||
$Res Function(_$SalesAnalyticItemImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of SalesAnalyticItem
|
||||
/// 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(
|
||||
_$SalesAnalyticItemImpl(
|
||||
date: null == date
|
||||
? _value.date
|
||||
: date // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
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 _$SalesAnalyticItemImpl implements _SalesAnalyticItem {
|
||||
const _$SalesAnalyticItemImpl({
|
||||
required this.date,
|
||||
required this.sales,
|
||||
required this.orders,
|
||||
required this.items,
|
||||
required this.tax,
|
||||
required this.discount,
|
||||
required this.netSales,
|
||||
});
|
||||
|
||||
@override
|
||||
final DateTime 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 'SalesAnalyticItem(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 _$SalesAnalyticItemImpl &&
|
||||
(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 SalesAnalyticItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$SalesAnalyticItemImplCopyWith<_$SalesAnalyticItemImpl> get copyWith =>
|
||||
__$$SalesAnalyticItemImplCopyWithImpl<_$SalesAnalyticItemImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
}
|
||||
|
||||
abstract class _SalesAnalyticItem implements SalesAnalyticItem {
|
||||
const factory _SalesAnalyticItem({
|
||||
required final DateTime 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,
|
||||
}) = _$SalesAnalyticItemImpl;
|
||||
|
||||
@override
|
||||
DateTime 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 SalesAnalyticItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$SalesAnalyticItemImplCopyWith<_$SalesAnalyticItemImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$AnalyticFailure {
|
||||
@optionalTypeArgs
|
||||
|
||||
Reference in New Issue
Block a user