2025-08-17 10:10:31 +07:00
// 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. \n Please check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models ' ,
) ;
/// @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 ;
SalesAnalyticSummary get summary = > throw _privateConstructorUsedError ;
List < SalesAnalyticData > 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 ,
SalesAnalyticSummary summary ,
List < SalesAnalyticData > data ,
} ) ;
$SalesAnalyticSummaryCopyWith < $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 SalesAnalyticSummary ,
data: null = = data
? _value . data
: data // ignore: cast_nullable_to_non_nullable
as List < SalesAnalyticData > ,
)
as $Val ,
) ;
}
/// Create a copy of SalesAnalytic
/// with the given fields replaced by the non-null parameter values.
@ override
@ pragma ( ' vm:prefer-inline ' )
$SalesAnalyticSummaryCopyWith < $Res > get summary {
return $SalesAnalyticSummaryCopyWith < $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 ,
SalesAnalyticSummary summary ,
List < SalesAnalyticData > data ,
} ) ;
@ override
$SalesAnalyticSummaryCopyWith < $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 SalesAnalyticSummary ,
data: null = = data
? _value . _data
: data // ignore: cast_nullable_to_non_nullable
as List < SalesAnalyticData > ,
) ,
) ;
}
}
/// @nodoc
class _ $SalesAnalyticImpl implements _SalesAnalytic {
const _ $SalesAnalyticImpl ( {
required this . organizationId ,
required this . outletId ,
required this . dateFrom ,
required this . dateTo ,
required this . groupBy ,
required this . summary ,
required final List < SalesAnalyticData > data ,
} ) : _data = data ;
@ override
final String organizationId ;
@ override
final String outletId ;
@ override
final DateTime dateFrom ;
@ override
final DateTime dateTo ;
@ override
final String groupBy ;
@ override
final SalesAnalyticSummary summary ;
final List < SalesAnalyticData > _data ;
@ override
List < SalesAnalyticData > 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 implements 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 SalesAnalyticSummary summary ,
required final List < SalesAnalyticData > data ,
} ) = _ $SalesAnalyticImpl ;
@ override
String get organizationId ;
@ override
String get outletId ;
@ override
DateTime get dateFrom ;
@ override
DateTime get dateTo ;
@ override
String get groupBy ;
@ override
SalesAnalyticSummary get summary ;
@ override
List < SalesAnalyticData > 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 _ $SalesAnalyticSummary {
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 SalesAnalyticSummary
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
$SalesAnalyticSummaryCopyWith < SalesAnalyticSummary > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $SalesAnalyticSummaryCopyWith < $Res > {
factory $SalesAnalyticSummaryCopyWith (
SalesAnalyticSummary value ,
$Res Function ( SalesAnalyticSummary ) then ,
) = _ $SalesAnalyticSummaryCopyWithImpl < $Res , SalesAnalyticSummary > ;
@ useResult
$Res call ( {
int totalSales ,
int totalOrders ,
int totalItems ,
double averageOrderValue ,
int totalTax ,
int totalDiscount ,
int netSales ,
} ) ;
}
/// @nodoc
class _ $SalesAnalyticSummaryCopyWithImpl <
$Res ,
$Val extends SalesAnalyticSummary
>
implements $SalesAnalyticSummaryCopyWith < $Res > {
_ $SalesAnalyticSummaryCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of SalesAnalyticSummary
/// 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 _ $ $SalesAnalyticSummaryImplCopyWith < $Res >
implements $SalesAnalyticSummaryCopyWith < $Res > {
factory _ $ $SalesAnalyticSummaryImplCopyWith (
_ $SalesAnalyticSummaryImpl value ,
$Res Function ( _ $SalesAnalyticSummaryImpl ) then ,
) = __ $ $SalesAnalyticSummaryImplCopyWithImpl < $Res > ;
@ override
@ useResult
$Res call ( {
int totalSales ,
int totalOrders ,
int totalItems ,
double averageOrderValue ,
int totalTax ,
int totalDiscount ,
int netSales ,
} ) ;
}
/// @nodoc
class __ $ $SalesAnalyticSummaryImplCopyWithImpl < $Res >
extends _ $SalesAnalyticSummaryCopyWithImpl < $Res , _ $SalesAnalyticSummaryImpl >
implements _ $ $SalesAnalyticSummaryImplCopyWith < $Res > {
__ $ $SalesAnalyticSummaryImplCopyWithImpl (
_ $SalesAnalyticSummaryImpl _value ,
$Res Function ( _ $SalesAnalyticSummaryImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of SalesAnalyticSummary
/// 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 (
_ $SalesAnalyticSummaryImpl (
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 _ $SalesAnalyticSummaryImpl implements _SalesAnalyticSummary {
const _ $SalesAnalyticSummaryImpl ( {
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 ' SalesAnalyticSummary(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 _ $SalesAnalyticSummaryImpl & &
( 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 SalesAnalyticSummary
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $SalesAnalyticSummaryImplCopyWith < _ $SalesAnalyticSummaryImpl >
get copyWith = >
__ $ $SalesAnalyticSummaryImplCopyWithImpl < _ $SalesAnalyticSummaryImpl > (
this ,
_ $identity ,
) ;
}
abstract class _SalesAnalyticSummary implements SalesAnalyticSummary {
const factory _SalesAnalyticSummary ( {
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 ,
} ) = _ $SalesAnalyticSummaryImpl ;
@ 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 SalesAnalyticSummary
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $SalesAnalyticSummaryImplCopyWith < _ $SalesAnalyticSummaryImpl >
get copyWith = > throw _privateConstructorUsedError ;
}
/// @nodoc
mixin _ $SalesAnalyticData {
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 SalesAnalyticData
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
$SalesAnalyticDataCopyWith < SalesAnalyticData > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $SalesAnalyticDataCopyWith < $Res > {
factory $SalesAnalyticDataCopyWith (
SalesAnalyticData value ,
$Res Function ( SalesAnalyticData ) then ,
) = _ $SalesAnalyticDataCopyWithImpl < $Res , SalesAnalyticData > ;
@ useResult
$Res call ( {
DateTime date ,
int sales ,
int orders ,
int items ,
int tax ,
int discount ,
int netSales ,
} ) ;
}
/// @nodoc
class _ $SalesAnalyticDataCopyWithImpl < $Res , $Val extends SalesAnalyticData >
implements $SalesAnalyticDataCopyWith < $Res > {
_ $SalesAnalyticDataCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of SalesAnalyticData
/// 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 _ $ $SalesAnalyticDataImplCopyWith < $Res >
implements $SalesAnalyticDataCopyWith < $Res > {
factory _ $ $SalesAnalyticDataImplCopyWith (
_ $SalesAnalyticDataImpl value ,
$Res Function ( _ $SalesAnalyticDataImpl ) then ,
) = __ $ $SalesAnalyticDataImplCopyWithImpl < $Res > ;
@ override
@ useResult
$Res call ( {
DateTime date ,
int sales ,
int orders ,
int items ,
int tax ,
int discount ,
int netSales ,
} ) ;
}
/// @nodoc
class __ $ $SalesAnalyticDataImplCopyWithImpl < $Res >
extends _ $SalesAnalyticDataCopyWithImpl < $Res , _ $SalesAnalyticDataImpl >
implements _ $ $SalesAnalyticDataImplCopyWith < $Res > {
__ $ $SalesAnalyticDataImplCopyWithImpl (
_ $SalesAnalyticDataImpl _value ,
$Res Function ( _ $SalesAnalyticDataImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of SalesAnalyticData
/// 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 (
_ $SalesAnalyticDataImpl (
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 _ $SalesAnalyticDataImpl implements _SalesAnalyticData {
const _ $SalesAnalyticDataImpl ( {
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 ' SalesAnalyticData(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 _ $SalesAnalyticDataImpl & &
( 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 SalesAnalyticData
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $SalesAnalyticDataImplCopyWith < _ $SalesAnalyticDataImpl > get copyWith = >
__ $ $SalesAnalyticDataImplCopyWithImpl < _ $SalesAnalyticDataImpl > (
this ,
_ $identity ,
) ;
}
abstract class _SalesAnalyticData implements SalesAnalyticData {
const factory _SalesAnalyticData ( {
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 ,
} ) = _ $SalesAnalyticDataImpl ;
@ 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 SalesAnalyticData
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $SalesAnalyticDataImplCopyWith < _ $SalesAnalyticDataImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
2025-08-17 22:46:25 +07:00
mixin _ $ProfitLossAnalytic {
String get organizationId = > throw _privateConstructorUsedError ;
String get dateFrom = > throw _privateConstructorUsedError ;
String get dateTo = > throw _privateConstructorUsedError ;
String get groupBy = > throw _privateConstructorUsedError ;
ProfitLossSummary get summary = > throw _privateConstructorUsedError ;
List < ProfitLossDailyData > get data = > throw _privateConstructorUsedError ;
List < ProfitLossProductData > get productData = >
throw _privateConstructorUsedError ;
/// Create a copy of ProfitLossAnalytic
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
$ProfitLossAnalyticCopyWith < ProfitLossAnalytic > get copyWith = >
throw _privateConstructorUsedError ;
2025-08-17 10:10:31 +07:00
}
/// @nodoc
2025-08-17 22:46:25 +07:00
abstract class $ProfitLossAnalyticCopyWith < $Res > {
factory $ProfitLossAnalyticCopyWith (
ProfitLossAnalytic value ,
$Res Function ( ProfitLossAnalytic ) then ,
) = _ $ProfitLossAnalyticCopyWithImpl < $Res , ProfitLossAnalytic > ;
@ useResult
$Res call ( {
String organizationId ,
String dateFrom ,
String dateTo ,
String groupBy ,
ProfitLossSummary summary ,
List < ProfitLossDailyData > data ,
List < ProfitLossProductData > productData ,
} ) ;
$ProfitLossSummaryCopyWith < $Res > get summary ;
2025-08-17 10:10:31 +07:00
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class _ $ProfitLossAnalyticCopyWithImpl < $Res , $Val extends ProfitLossAnalytic >
implements $ProfitLossAnalyticCopyWith < $Res > {
_ $ProfitLossAnalyticCopyWithImpl ( this . _value , this . _then ) ;
2025-08-17 10:10:31 +07:00
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossAnalytic
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? organizationId = null ,
Object ? dateFrom = null ,
Object ? dateTo = null ,
Object ? groupBy = null ,
Object ? summary = null ,
Object ? data = null ,
Object ? productData = null ,
} ) {
return _then (
_value . copyWith (
organizationId: null = = organizationId
? _value . organizationId
: organizationId // 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 ,
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 ProfitLossSummary ,
data: null = = data
? _value . data
: data // ignore: cast_nullable_to_non_nullable
as List < ProfitLossDailyData > ,
productData: null = = productData
? _value . productData
: productData // ignore: cast_nullable_to_non_nullable
as List < ProfitLossProductData > ,
)
as $Val ,
) ;
}
/// Create a copy of ProfitLossAnalytic
2025-08-17 10:10:31 +07:00
/// with the given fields replaced by the non-null parameter values.
2025-08-17 22:46:25 +07:00
@ override
@ pragma ( ' vm:prefer-inline ' )
$ProfitLossSummaryCopyWith < $Res > get summary {
return $ProfitLossSummaryCopyWith < $Res > ( _value . summary , ( value ) {
return _then ( _value . copyWith ( summary: value ) as $Val ) ;
} ) ;
}
2025-08-17 10:10:31 +07:00
}
/// @nodoc
2025-08-17 22:46:25 +07:00
abstract class _ $ $ProfitLossAnalyticImplCopyWith < $Res >
implements $ProfitLossAnalyticCopyWith < $Res > {
factory _ $ $ProfitLossAnalyticImplCopyWith (
_ $ProfitLossAnalyticImpl value ,
$Res Function ( _ $ProfitLossAnalyticImpl ) then ,
) = __ $ $ProfitLossAnalyticImplCopyWithImpl < $Res > ;
@ override
2025-08-17 10:10:31 +07:00
@ useResult
2025-08-17 22:46:25 +07:00
$Res call ( {
String organizationId ,
String dateFrom ,
String dateTo ,
String groupBy ,
ProfitLossSummary summary ,
List < ProfitLossDailyData > data ,
List < ProfitLossProductData > productData ,
} ) ;
2025-08-17 10:10:31 +07:00
2025-08-17 22:46:25 +07:00
@ override
$ProfitLossSummaryCopyWith < $Res > get summary ;
2025-08-17 10:10:31 +07:00
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class __ $ $ProfitLossAnalyticImplCopyWithImpl < $Res >
extends _ $ProfitLossAnalyticCopyWithImpl < $Res , _ $ProfitLossAnalyticImpl >
implements _ $ $ProfitLossAnalyticImplCopyWith < $Res > {
__ $ $ProfitLossAnalyticImplCopyWithImpl (
_ $ProfitLossAnalyticImpl _value ,
$Res Function ( _ $ProfitLossAnalyticImpl ) _then ,
2025-08-17 10:10:31 +07:00
) : super ( _value , _then ) ;
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossAnalytic
2025-08-17 10:10:31 +07:00
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
2025-08-17 22:46:25 +07:00
$Res call ( {
Object ? organizationId = null ,
Object ? dateFrom = null ,
Object ? dateTo = null ,
Object ? groupBy = null ,
Object ? summary = null ,
Object ? data = null ,
Object ? productData = null ,
} ) {
2025-08-17 10:10:31 +07:00
return _then (
2025-08-17 22:46:25 +07:00
_ $ProfitLossAnalyticImpl (
organizationId: null = = organizationId
? _value . organizationId
: organizationId // 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 ,
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 ProfitLossSummary ,
data: null = = data
? _value . _data
: data // ignore: cast_nullable_to_non_nullable
as List < ProfitLossDailyData > ,
productData: null = = productData
? _value . _productData
: productData // ignore: cast_nullable_to_non_nullable
as List < ProfitLossProductData > ,
2025-08-17 10:10:31 +07:00
) ,
) ;
}
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class _ $ProfitLossAnalyticImpl implements _ProfitLossAnalytic {
const _ $ProfitLossAnalyticImpl ( {
required this . organizationId ,
required this . dateFrom ,
required this . dateTo ,
required this . groupBy ,
required this . summary ,
required final List < ProfitLossDailyData > data ,
required final List < ProfitLossProductData > productData ,
} ) : _data = data ,
_productData = productData ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
final String organizationId ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
final String dateFrom ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
final String dateTo ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
final String groupBy ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
final ProfitLossSummary summary ;
final List < ProfitLossDailyData > _data ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
List < ProfitLossDailyData > get data {
if ( _data is EqualUnmodifiableListView ) return _data ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _data ) ;
2025-08-17 10:10:31 +07:00
}
2025-08-17 22:46:25 +07:00
final List < ProfitLossProductData > _productData ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
List < ProfitLossProductData > get productData {
if ( _productData is EqualUnmodifiableListView ) return _productData ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _productData ) ;
2025-08-17 10:10:31 +07:00
}
@ override
2025-08-17 22:46:25 +07:00
String toString ( ) {
return ' ProfitLossAnalytic(organizationId: $ organizationId , dateFrom: $ dateFrom , dateTo: $ dateTo , groupBy: $ groupBy , summary: $ summary , data: $ data , productData: $ productData ) ' ;
2025-08-17 10:10:31 +07:00
}
@ override
2025-08-17 22:46:25 +07:00
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $ProfitLossAnalyticImpl & &
( identical ( other . organizationId , organizationId ) | |
other . organizationId = = organizationId ) & &
( 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 ) & &
const DeepCollectionEquality ( ) . equals (
other . _productData ,
_productData ,
) ) ;
2025-08-17 10:10:31 +07:00
}
@ override
2025-08-17 22:46:25 +07:00
int get hashCode = > Object . hash (
runtimeType ,
organizationId ,
dateFrom ,
dateTo ,
groupBy ,
summary ,
const DeepCollectionEquality ( ) . hash ( _data ) ,
const DeepCollectionEquality ( ) . hash ( _productData ) ,
) ;
2025-08-17 10:10:31 +07:00
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossAnalytic
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
@ pragma ( ' vm:prefer-inline ' )
_ $ $ProfitLossAnalyticImplCopyWith < _ $ProfitLossAnalyticImpl > get copyWith = >
__ $ $ProfitLossAnalyticImplCopyWithImpl < _ $ProfitLossAnalyticImpl > (
this ,
_ $identity ,
) ;
2025-08-17 10:10:31 +07:00
}
2025-08-17 22:46:25 +07:00
abstract class _ProfitLossAnalytic implements ProfitLossAnalytic {
const factory _ProfitLossAnalytic ( {
required final String organizationId ,
required final String dateFrom ,
required final String dateTo ,
required final String groupBy ,
required final ProfitLossSummary summary ,
required final List < ProfitLossDailyData > data ,
required final List < ProfitLossProductData > productData ,
} ) = _ $ProfitLossAnalyticImpl ;
2025-08-17 10:10:31 +07:00
2025-08-17 22:46:25 +07:00
@ override
String get organizationId ;
@ override
String get dateFrom ;
@ override
String get dateTo ;
@ override
String get groupBy ;
@ override
ProfitLossSummary get summary ;
@ override
List < ProfitLossDailyData > get data ;
@ override
List < ProfitLossProductData > get productData ;
2025-08-17 10:10:31 +07:00
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossAnalytic
2025-08-17 10:10:31 +07:00
/// with the given fields replaced by the non-null parameter values.
2025-08-17 22:46:25 +07:00
@ override
2025-08-17 10:10:31 +07:00
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-08-17 22:46:25 +07:00
_ $ $ProfitLossAnalyticImplCopyWith < _ $ProfitLossAnalyticImpl > get copyWith = >
2025-08-17 10:10:31 +07:00
throw _privateConstructorUsedError ;
}
/// @nodoc
2025-08-17 22:46:25 +07:00
mixin _ $ProfitLossSummary {
int get totalRevenue = > throw _privateConstructorUsedError ;
int get totalCost = > throw _privateConstructorUsedError ;
int get grossProfit = > throw _privateConstructorUsedError ;
double get grossProfitMargin = > throw _privateConstructorUsedError ;
int get totalTax = > throw _privateConstructorUsedError ;
int get totalDiscount = > throw _privateConstructorUsedError ;
int get netProfit = > throw _privateConstructorUsedError ;
double get netProfitMargin = > throw _privateConstructorUsedError ;
int get totalOrders = > throw _privateConstructorUsedError ;
double get averageProfit = > throw _privateConstructorUsedError ;
double get profitabilityRatio = > throw _privateConstructorUsedError ;
2025-08-17 10:10:31 +07:00
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossSummary
2025-08-17 10:10:31 +07:00
/// with the given fields replaced by the non-null parameter values.
2025-08-17 22:46:25 +07:00
@ JsonKey ( includeFromJson: false , includeToJson: false )
$ProfitLossSummaryCopyWith < ProfitLossSummary > get copyWith = >
throw _privateConstructorUsedError ;
2025-08-17 10:10:31 +07:00
}
/// @nodoc
2025-08-17 22:46:25 +07:00
abstract class $ProfitLossSummaryCopyWith < $Res > {
factory $ProfitLossSummaryCopyWith (
ProfitLossSummary value ,
$Res Function ( ProfitLossSummary ) then ,
) = _ $ProfitLossSummaryCopyWithImpl < $Res , ProfitLossSummary > ;
@ useResult
$Res call ( {
int totalRevenue ,
int totalCost ,
int grossProfit ,
double grossProfitMargin ,
int totalTax ,
int totalDiscount ,
int netProfit ,
double netProfitMargin ,
int totalOrders ,
double averageProfit ,
double profitabilityRatio ,
} ) ;
}
2025-08-17 10:10:31 +07:00
2025-08-17 22:46:25 +07:00
/// @nodoc
class _ $ProfitLossSummaryCopyWithImpl < $Res , $Val extends ProfitLossSummary >
implements $ProfitLossSummaryCopyWith < $Res > {
_ $ProfitLossSummaryCopyWithImpl ( this . _value , this . _then ) ;
2025-08-17 10:10:31 +07:00
2025-08-17 22:46:25 +07:00
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
2025-08-17 10:10:31 +07:00
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossSummary
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
$Res call ( {
Object ? totalRevenue = null ,
Object ? totalCost = null ,
Object ? grossProfit = null ,
Object ? grossProfitMargin = null ,
Object ? totalTax = null ,
Object ? totalDiscount = null ,
Object ? netProfit = null ,
Object ? netProfitMargin = null ,
Object ? totalOrders = null ,
Object ? averageProfit = null ,
Object ? profitabilityRatio = null ,
2025-08-17 10:10:31 +07:00
} ) {
2025-08-17 22:46:25 +07:00
return _then (
_value . copyWith (
totalRevenue: null = = totalRevenue
? _value . totalRevenue
: totalRevenue // ignore: cast_nullable_to_non_nullable
as int ,
totalCost: null = = totalCost
? _value . totalCost
: totalCost // ignore: cast_nullable_to_non_nullable
as int ,
grossProfit: null = = grossProfit
? _value . grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as int ,
grossProfitMargin: null = = grossProfitMargin
? _value . grossProfitMargin
: grossProfitMargin // 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 ,
netProfit: null = = netProfit
? _value . netProfit
: netProfit // ignore: cast_nullable_to_non_nullable
as int ,
netProfitMargin: null = = netProfitMargin
? _value . netProfitMargin
: netProfitMargin // ignore: cast_nullable_to_non_nullable
as double ,
totalOrders: null = = totalOrders
? _value . totalOrders
: totalOrders // ignore: cast_nullable_to_non_nullable
as int ,
averageProfit: null = = averageProfit
? _value . averageProfit
: averageProfit // ignore: cast_nullable_to_non_nullable
as double ,
profitabilityRatio: null = = profitabilityRatio
? _value . profitabilityRatio
: profitabilityRatio // ignore: cast_nullable_to_non_nullable
as double ,
)
as $Val ,
) ;
2025-08-17 10:10:31 +07:00
}
}
/// @nodoc
2025-08-17 22:46:25 +07:00
abstract class _ $ $ProfitLossSummaryImplCopyWith < $Res >
implements $ProfitLossSummaryCopyWith < $Res > {
factory _ $ $ProfitLossSummaryImplCopyWith (
_ $ProfitLossSummaryImpl value ,
$Res Function ( _ $ProfitLossSummaryImpl ) then ,
) = __ $ $ProfitLossSummaryImplCopyWithImpl < $Res > ;
@ override
@ useResult
$Res call ( {
int totalRevenue ,
int totalCost ,
int grossProfit ,
double grossProfitMargin ,
int totalTax ,
int totalDiscount ,
int netProfit ,
double netProfitMargin ,
int totalOrders ,
double averageProfit ,
double profitabilityRatio ,
} ) ;
2025-08-17 10:10:31 +07:00
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class __ $ $ProfitLossSummaryImplCopyWithImpl < $Res >
extends _ $ProfitLossSummaryCopyWithImpl < $Res , _ $ProfitLossSummaryImpl >
implements _ $ $ProfitLossSummaryImplCopyWith < $Res > {
__ $ $ProfitLossSummaryImplCopyWithImpl (
_ $ProfitLossSummaryImpl _value ,
$Res Function ( _ $ProfitLossSummaryImpl ) _then ,
2025-08-17 10:10:31 +07:00
) : super ( _value , _then ) ;
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossSummary
2025-08-17 10:10:31 +07:00
/// with the given fields replaced by the non-null parameter values.
2025-08-17 22:46:25 +07:00
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? totalRevenue = null ,
Object ? totalCost = null ,
Object ? grossProfit = null ,
Object ? grossProfitMargin = null ,
Object ? totalTax = null ,
Object ? totalDiscount = null ,
Object ? netProfit = null ,
Object ? netProfitMargin = null ,
Object ? totalOrders = null ,
Object ? averageProfit = null ,
Object ? profitabilityRatio = null ,
} ) {
return _then (
_ $ProfitLossSummaryImpl (
totalRevenue: null = = totalRevenue
? _value . totalRevenue
: totalRevenue // ignore: cast_nullable_to_non_nullable
as int ,
totalCost: null = = totalCost
? _value . totalCost
: totalCost // ignore: cast_nullable_to_non_nullable
as int ,
grossProfit: null = = grossProfit
? _value . grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as int ,
grossProfitMargin: null = = grossProfitMargin
? _value . grossProfitMargin
: grossProfitMargin // 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 ,
netProfit: null = = netProfit
? _value . netProfit
: netProfit // ignore: cast_nullable_to_non_nullable
as int ,
netProfitMargin: null = = netProfitMargin
? _value . netProfitMargin
: netProfitMargin // ignore: cast_nullable_to_non_nullable
as double ,
totalOrders: null = = totalOrders
? _value . totalOrders
: totalOrders // ignore: cast_nullable_to_non_nullable
as int ,
averageProfit: null = = averageProfit
? _value . averageProfit
: averageProfit // ignore: cast_nullable_to_non_nullable
as double ,
profitabilityRatio: null = = profitabilityRatio
? _value . profitabilityRatio
: profitabilityRatio // ignore: cast_nullable_to_non_nullable
as double ,
) ,
) ;
}
2025-08-17 10:10:31 +07:00
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class _ $ProfitLossSummaryImpl implements _ProfitLossSummary {
const _ $ProfitLossSummaryImpl ( {
required this . totalRevenue ,
required this . totalCost ,
required this . grossProfit ,
required this . grossProfitMargin ,
required this . totalTax ,
required this . totalDiscount ,
required this . netProfit ,
required this . netProfitMargin ,
required this . totalOrders ,
required this . averageProfit ,
required this . profitabilityRatio ,
} ) ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int totalRevenue ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int totalCost ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int grossProfit ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
final double grossProfitMargin ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int totalTax ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int totalDiscount ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int netProfit ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
final double netProfitMargin ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int totalOrders ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
final double averageProfit ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
final double profitabilityRatio ;
2025-08-17 10:10:31 +07:00
@ override
String toString ( ) {
2025-08-17 22:46:25 +07:00
return ' ProfitLossSummary(totalRevenue: $ totalRevenue , totalCost: $ totalCost , grossProfit: $ grossProfit , grossProfitMargin: $ grossProfitMargin , totalTax: $ totalTax , totalDiscount: $ totalDiscount , netProfit: $ netProfit , netProfitMargin: $ netProfitMargin , totalOrders: $ totalOrders , averageProfit: $ averageProfit , profitabilityRatio: $ profitabilityRatio ) ' ;
2025-08-17 10:10:31 +07:00
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
2025-08-17 22:46:25 +07:00
other is _ $ProfitLossSummaryImpl & &
( identical ( other . totalRevenue , totalRevenue ) | |
other . totalRevenue = = totalRevenue ) & &
( identical ( other . totalCost , totalCost ) | |
other . totalCost = = totalCost ) & &
( identical ( other . grossProfit , grossProfit ) | |
other . grossProfit = = grossProfit ) & &
( identical ( other . grossProfitMargin , grossProfitMargin ) | |
other . grossProfitMargin = = grossProfitMargin ) & &
( identical ( other . totalTax , totalTax ) | |
other . totalTax = = totalTax ) & &
( identical ( other . totalDiscount , totalDiscount ) | |
other . totalDiscount = = totalDiscount ) & &
( identical ( other . netProfit , netProfit ) | |
other . netProfit = = netProfit ) & &
( identical ( other . netProfitMargin , netProfitMargin ) | |
other . netProfitMargin = = netProfitMargin ) & &
( identical ( other . totalOrders , totalOrders ) | |
other . totalOrders = = totalOrders ) & &
( identical ( other . averageProfit , averageProfit ) | |
other . averageProfit = = averageProfit ) & &
( identical ( other . profitabilityRatio , profitabilityRatio ) | |
other . profitabilityRatio = = profitabilityRatio ) ) ;
2025-08-17 10:10:31 +07:00
}
@ override
2025-08-17 22:46:25 +07:00
int get hashCode = > Object . hash (
runtimeType ,
totalRevenue ,
totalCost ,
grossProfit ,
grossProfitMargin ,
totalTax ,
totalDiscount ,
netProfit ,
netProfitMargin ,
totalOrders ,
averageProfit ,
profitabilityRatio ,
) ;
2025-08-17 10:10:31 +07:00
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossSummary
2025-08-17 10:10:31 +07:00
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
2025-08-17 22:46:25 +07:00
_ $ $ProfitLossSummaryImplCopyWith < _ $ProfitLossSummaryImpl > get copyWith = >
__ $ $ProfitLossSummaryImplCopyWithImpl < _ $ProfitLossSummaryImpl > (
2025-08-17 10:10:31 +07:00
this ,
_ $identity ,
) ;
2025-08-17 22:46:25 +07:00
}
2025-08-17 10:10:31 +07:00
2025-08-17 22:46:25 +07:00
abstract class _ProfitLossSummary implements ProfitLossSummary {
const factory _ProfitLossSummary ( {
required final int totalRevenue ,
required final int totalCost ,
required final int grossProfit ,
required final double grossProfitMargin ,
required final int totalTax ,
required final int totalDiscount ,
required final int netProfit ,
required final double netProfitMargin ,
required final int totalOrders ,
required final double averageProfit ,
required final double profitabilityRatio ,
} ) = _ $ProfitLossSummaryImpl ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
int get totalRevenue ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
int get totalCost ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
int get grossProfit ;
2025-08-17 10:10:31 +07:00
@ override
2025-08-17 22:46:25 +07:00
double get grossProfitMargin ;
@ override
int get totalTax ;
@ override
int get totalDiscount ;
@ override
int get netProfit ;
@ override
double get netProfitMargin ;
@ override
int get totalOrders ;
@ override
double get averageProfit ;
@ override
double get profitabilityRatio ;
2025-08-17 10:10:31 +07:00
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossSummary
/// with the given fields replaced by the non-null parameter values.
2025-08-17 10:10:31 +07:00
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-08-17 22:46:25 +07:00
_ $ $ProfitLossSummaryImplCopyWith < _ $ProfitLossSummaryImpl > get copyWith = >
2025-08-17 10:10:31 +07:00
throw _privateConstructorUsedError ;
}
2025-08-17 22:36:46 +07:00
/// @nodoc
2025-08-17 22:46:25 +07:00
mixin _ $ProfitLossDailyData {
String get date = > throw _privateConstructorUsedError ;
int get revenue = > throw _privateConstructorUsedError ;
int get cost = > throw _privateConstructorUsedError ;
int get grossProfit = > throw _privateConstructorUsedError ;
double get grossProfitMargin = > throw _privateConstructorUsedError ;
int get tax = > throw _privateConstructorUsedError ;
int get discount = > throw _privateConstructorUsedError ;
int get netProfit = > throw _privateConstructorUsedError ;
double get netProfitMargin = > throw _privateConstructorUsedError ;
int get orders = > throw _privateConstructorUsedError ;
2025-08-17 22:36:46 +07:00
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossDailyData
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-08-17 22:46:25 +07:00
$ProfitLossDailyDataCopyWith < ProfitLossDailyData > get copyWith = >
2025-08-17 22:36:46 +07:00
throw _privateConstructorUsedError ;
}
/// @nodoc
2025-08-17 22:46:25 +07:00
abstract class $ProfitLossDailyDataCopyWith < $Res > {
factory $ProfitLossDailyDataCopyWith (
ProfitLossDailyData value ,
$Res Function ( ProfitLossDailyData ) then ,
) = _ $ProfitLossDailyDataCopyWithImpl < $Res , ProfitLossDailyData > ;
2025-08-17 22:36:46 +07:00
@ useResult
$Res call ( {
2025-08-17 22:46:25 +07:00
String date ,
int revenue ,
int cost ,
int grossProfit ,
double grossProfitMargin ,
int tax ,
int discount ,
int netProfit ,
double netProfitMargin ,
int orders ,
2025-08-17 22:36:46 +07:00
} ) ;
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class _ $ProfitLossDailyDataCopyWithImpl < $Res , $Val extends ProfitLossDailyData >
implements $ProfitLossDailyDataCopyWith < $Res > {
_ $ProfitLossDailyDataCopyWithImpl ( this . _value , this . _then ) ;
2025-08-17 22:36:46 +07:00
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossDailyData
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
2025-08-17 22:46:25 +07:00
Object ? date = null ,
Object ? revenue = null ,
Object ? cost = null ,
Object ? grossProfit = null ,
Object ? grossProfitMargin = null ,
Object ? tax = null ,
Object ? discount = null ,
Object ? netProfit = null ,
Object ? netProfitMargin = null ,
Object ? orders = null ,
2025-08-17 22:36:46 +07:00
} ) {
return _then (
_value . copyWith (
2025-08-17 22:46:25 +07:00
date: null = = date
? _value . date
: date // ignore: cast_nullable_to_non_nullable
2025-08-17 22:36:46 +07:00
as String ,
2025-08-17 22:46:25 +07:00
revenue: null = = revenue
? _value . revenue
: revenue // ignore: cast_nullable_to_non_nullable
as int ,
cost: null = = cost
? _value . cost
: cost // ignore: cast_nullable_to_non_nullable
as int ,
grossProfit: null = = grossProfit
? _value . grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as int ,
grossProfitMargin: null = = grossProfitMargin
? _value . grossProfitMargin
: grossProfitMargin // ignore: cast_nullable_to_non_nullable
as double ,
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 ,
netProfit: null = = netProfit
? _value . netProfit
: netProfit // ignore: cast_nullable_to_non_nullable
as int ,
netProfitMargin: null = = netProfitMargin
? _value . netProfitMargin
: netProfitMargin // ignore: cast_nullable_to_non_nullable
as double ,
orders: null = = orders
? _value . orders
: orders // ignore: cast_nullable_to_non_nullable
as int ,
2025-08-17 22:36:46 +07:00
)
as $Val ,
) ;
}
}
/// @nodoc
2025-08-17 22:46:25 +07:00
abstract class _ $ $ProfitLossDailyDataImplCopyWith < $Res >
implements $ProfitLossDailyDataCopyWith < $Res > {
factory _ $ $ProfitLossDailyDataImplCopyWith (
_ $ProfitLossDailyDataImpl value ,
$Res Function ( _ $ProfitLossDailyDataImpl ) then ,
) = __ $ $ProfitLossDailyDataImplCopyWithImpl < $Res > ;
2025-08-17 22:36:46 +07:00
@ override
@ useResult
$Res call ( {
2025-08-17 22:46:25 +07:00
String date ,
int revenue ,
int cost ,
int grossProfit ,
double grossProfitMargin ,
int tax ,
int discount ,
int netProfit ,
double netProfitMargin ,
int orders ,
2025-08-17 22:36:46 +07:00
} ) ;
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class __ $ $ProfitLossDailyDataImplCopyWithImpl < $Res >
extends _ $ProfitLossDailyDataCopyWithImpl < $Res , _ $ProfitLossDailyDataImpl >
implements _ $ $ProfitLossDailyDataImplCopyWith < $Res > {
__ $ $ProfitLossDailyDataImplCopyWithImpl (
_ $ProfitLossDailyDataImpl _value ,
$Res Function ( _ $ProfitLossDailyDataImpl ) _then ,
2025-08-17 22:36:46 +07:00
) : super ( _value , _then ) ;
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossDailyData
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
2025-08-17 22:46:25 +07:00
Object ? date = null ,
Object ? revenue = null ,
Object ? cost = null ,
Object ? grossProfit = null ,
Object ? grossProfitMargin = null ,
Object ? tax = null ,
Object ? discount = null ,
Object ? netProfit = null ,
Object ? netProfitMargin = null ,
Object ? orders = null ,
2025-08-17 22:36:46 +07:00
} ) {
return _then (
2025-08-17 22:46:25 +07:00
_ $ProfitLossDailyDataImpl (
date: null = = date
? _value . date
: date // ignore: cast_nullable_to_non_nullable
2025-08-17 22:36:46 +07:00
as String ,
2025-08-17 22:46:25 +07:00
revenue: null = = revenue
? _value . revenue
: revenue // ignore: cast_nullable_to_non_nullable
as int ,
cost: null = = cost
? _value . cost
: cost // ignore: cast_nullable_to_non_nullable
as int ,
grossProfit: null = = grossProfit
? _value . grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as int ,
grossProfitMargin: null = = grossProfitMargin
? _value . grossProfitMargin
: grossProfitMargin // ignore: cast_nullable_to_non_nullable
as double ,
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 ,
netProfit: null = = netProfit
? _value . netProfit
: netProfit // ignore: cast_nullable_to_non_nullable
as int ,
netProfitMargin: null = = netProfitMargin
? _value . netProfitMargin
: netProfitMargin // ignore: cast_nullable_to_non_nullable
as double ,
orders: null = = orders
? _value . orders
: orders // ignore: cast_nullable_to_non_nullable
as int ,
2025-08-17 22:36:46 +07:00
) ,
) ;
}
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class _ $ProfitLossDailyDataImpl implements _ProfitLossDailyData {
const _ $ProfitLossDailyDataImpl ( {
required this . date ,
required this . revenue ,
required this . cost ,
required this . grossProfit ,
required this . grossProfitMargin ,
required this . tax ,
required this . discount ,
required this . netProfit ,
required this . netProfitMargin ,
required this . orders ,
} ) ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final String date ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int revenue ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int cost ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int grossProfit ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final double grossProfitMargin ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int tax ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int discount ;
@ override
final int netProfit ;
@ override
final double netProfitMargin ;
@ override
final int orders ;
2025-08-17 22:36:46 +07:00
@ override
String toString ( ) {
2025-08-17 22:46:25 +07:00
return ' ProfitLossDailyData(date: $ date , revenue: $ revenue , cost: $ cost , grossProfit: $ grossProfit , grossProfitMargin: $ grossProfitMargin , tax: $ tax , discount: $ discount , netProfit: $ netProfit , netProfitMargin: $ netProfitMargin , orders: $ orders ) ' ;
2025-08-17 22:36:46 +07:00
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
2025-08-17 22:46:25 +07:00
other is _ $ProfitLossDailyDataImpl & &
( identical ( other . date , date ) | | other . date = = date ) & &
( identical ( other . revenue , revenue ) | | other . revenue = = revenue ) & &
( identical ( other . cost , cost ) | | other . cost = = cost ) & &
( identical ( other . grossProfit , grossProfit ) | |
other . grossProfit = = grossProfit ) & &
( identical ( other . grossProfitMargin , grossProfitMargin ) | |
other . grossProfitMargin = = grossProfitMargin ) & &
( identical ( other . tax , tax ) | | other . tax = = tax ) & &
( identical ( other . discount , discount ) | |
other . discount = = discount ) & &
( identical ( other . netProfit , netProfit ) | |
other . netProfit = = netProfit ) & &
( identical ( other . netProfitMargin , netProfitMargin ) | |
other . netProfitMargin = = netProfitMargin ) & &
( identical ( other . orders , orders ) | | other . orders = = orders ) ) ;
2025-08-17 22:36:46 +07:00
}
@ override
int get hashCode = > Object . hash (
runtimeType ,
2025-08-17 22:46:25 +07:00
date ,
revenue ,
cost ,
grossProfit ,
grossProfitMargin ,
tax ,
discount ,
netProfit ,
netProfitMargin ,
orders ,
2025-08-17 22:36:46 +07:00
) ;
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossDailyData
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
2025-08-17 22:46:25 +07:00
_ $ $ProfitLossDailyDataImplCopyWith < _ $ProfitLossDailyDataImpl > get copyWith = >
__ $ $ProfitLossDailyDataImplCopyWithImpl < _ $ProfitLossDailyDataImpl > (
2025-08-17 22:36:46 +07:00
this ,
_ $identity ,
) ;
}
2025-08-17 22:46:25 +07:00
abstract class _ProfitLossDailyData implements ProfitLossDailyData {
const factory _ProfitLossDailyData ( {
required final String date ,
required final int revenue ,
required final int cost ,
required final int grossProfit ,
required final double grossProfitMargin ,
required final int tax ,
required final int discount ,
required final int netProfit ,
required final double netProfitMargin ,
required final int orders ,
} ) = _ $ProfitLossDailyDataImpl ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
String get date ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
int get revenue ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
int get cost ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
int get grossProfit ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
double get grossProfitMargin ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
int get tax ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
int get discount ;
@ override
int get netProfit ;
@ override
double get netProfitMargin ;
@ override
int get orders ;
2025-08-17 22:36:46 +07:00
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossDailyData
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-08-17 22:46:25 +07:00
_ $ $ProfitLossDailyDataImplCopyWith < _ $ProfitLossDailyDataImpl > get copyWith = >
2025-08-17 22:36:46 +07:00
throw _privateConstructorUsedError ;
}
/// @nodoc
2025-08-17 22:46:25 +07:00
mixin _ $ProfitLossProductData {
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 ;
int get cost = > throw _privateConstructorUsedError ;
2025-08-17 22:36:46 +07:00
int get grossProfit = > throw _privateConstructorUsedError ;
double get grossProfitMargin = > throw _privateConstructorUsedError ;
2025-08-17 22:46:25 +07:00
int get averagePrice = > throw _privateConstructorUsedError ;
int get averageCost = > throw _privateConstructorUsedError ;
int get profitPerUnit = > throw _privateConstructorUsedError ;
2025-08-17 22:36:46 +07:00
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossProductData
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-08-17 22:46:25 +07:00
$ProfitLossProductDataCopyWith < ProfitLossProductData > get copyWith = >
2025-08-17 22:36:46 +07:00
throw _privateConstructorUsedError ;
}
/// @nodoc
2025-08-17 22:46:25 +07:00
abstract class $ProfitLossProductDataCopyWith < $Res > {
factory $ProfitLossProductDataCopyWith (
ProfitLossProductData value ,
$Res Function ( ProfitLossProductData ) then ,
) = _ $ProfitLossProductDataCopyWithImpl < $Res , ProfitLossProductData > ;
2025-08-17 22:36:46 +07:00
@ useResult
$Res call ( {
2025-08-17 22:46:25 +07:00
String productId ,
String productName ,
String categoryId ,
String categoryName ,
int quantitySold ,
int revenue ,
int cost ,
2025-08-17 22:36:46 +07:00
int grossProfit ,
double grossProfitMargin ,
2025-08-17 22:46:25 +07:00
int averagePrice ,
int averageCost ,
int profitPerUnit ,
2025-08-17 22:36:46 +07:00
} ) ;
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class _ $ProfitLossProductDataCopyWithImpl <
$Res ,
$Val extends ProfitLossProductData
>
implements $ProfitLossProductDataCopyWith < $Res > {
_ $ProfitLossProductDataCopyWithImpl ( this . _value , this . _then ) ;
2025-08-17 22:36:46 +07:00
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossProductData
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
2025-08-17 22:46:25 +07:00
Object ? productId = null ,
Object ? productName = null ,
Object ? categoryId = null ,
Object ? categoryName = null ,
Object ? quantitySold = null ,
Object ? revenue = null ,
Object ? cost = null ,
2025-08-17 22:36:46 +07:00
Object ? grossProfit = null ,
Object ? grossProfitMargin = null ,
2025-08-17 22:46:25 +07:00
Object ? averagePrice = null ,
Object ? averageCost = null ,
Object ? profitPerUnit = null ,
2025-08-17 22:36:46 +07:00
} ) {
return _then (
_value . copyWith (
2025-08-17 22:46:25 +07:00
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
2025-08-17 22:36:46 +07:00
as int ,
2025-08-17 22:46:25 +07:00
revenue: null = = revenue
? _value . revenue
: revenue // ignore: cast_nullable_to_non_nullable
as int ,
cost: null = = cost
? _value . cost
: cost // ignore: cast_nullable_to_non_nullable
2025-08-17 22:36:46 +07:00
as int ,
grossProfit: null = = grossProfit
? _value . grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as int ,
grossProfitMargin: null = = grossProfitMargin
? _value . grossProfitMargin
: grossProfitMargin // ignore: cast_nullable_to_non_nullable
as double ,
2025-08-17 22:46:25 +07:00
averagePrice: null = = averagePrice
? _value . averagePrice
: averagePrice // ignore: cast_nullable_to_non_nullable
2025-08-17 22:36:46 +07:00
as int ,
2025-08-17 22:46:25 +07:00
averageCost: null = = averageCost
? _value . averageCost
: averageCost // ignore: cast_nullable_to_non_nullable
2025-08-17 22:36:46 +07:00
as int ,
2025-08-17 22:46:25 +07:00
profitPerUnit: null = = profitPerUnit
? _value . profitPerUnit
: profitPerUnit // ignore: cast_nullable_to_non_nullable
2025-08-17 22:36:46 +07:00
as int ,
)
as $Val ,
) ;
}
}
/// @nodoc
2025-08-17 22:46:25 +07:00
abstract class _ $ $ProfitLossProductDataImplCopyWith < $Res >
implements $ProfitLossProductDataCopyWith < $Res > {
factory _ $ $ProfitLossProductDataImplCopyWith (
_ $ProfitLossProductDataImpl value ,
$Res Function ( _ $ProfitLossProductDataImpl ) then ,
) = __ $ $ProfitLossProductDataImplCopyWithImpl < $Res > ;
2025-08-17 22:36:46 +07:00
@ override
@ useResult
$Res call ( {
2025-08-17 22:46:25 +07:00
String productId ,
String productName ,
String categoryId ,
String categoryName ,
int quantitySold ,
int revenue ,
int cost ,
2025-08-17 22:36:46 +07:00
int grossProfit ,
double grossProfitMargin ,
2025-08-17 22:46:25 +07:00
int averagePrice ,
int averageCost ,
int profitPerUnit ,
2025-08-17 22:36:46 +07:00
} ) ;
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class __ $ $ProfitLossProductDataImplCopyWithImpl < $Res >
extends
_ $ProfitLossProductDataCopyWithImpl < $Res , _ $ProfitLossProductDataImpl >
implements _ $ $ProfitLossProductDataImplCopyWith < $Res > {
__ $ $ProfitLossProductDataImplCopyWithImpl (
_ $ProfitLossProductDataImpl _value ,
$Res Function ( _ $ProfitLossProductDataImpl ) _then ,
2025-08-17 22:36:46 +07:00
) : super ( _value , _then ) ;
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossProductData
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
2025-08-17 22:46:25 +07:00
Object ? productId = null ,
Object ? productName = null ,
Object ? categoryId = null ,
Object ? categoryName = null ,
Object ? quantitySold = null ,
Object ? revenue = null ,
Object ? cost = null ,
2025-08-17 22:36:46 +07:00
Object ? grossProfit = null ,
Object ? grossProfitMargin = null ,
2025-08-17 22:46:25 +07:00
Object ? averagePrice = null ,
Object ? averageCost = null ,
Object ? profitPerUnit = null ,
2025-08-17 22:36:46 +07:00
} ) {
return _then (
2025-08-17 22:46:25 +07:00
_ $ProfitLossProductDataImpl (
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
2025-08-17 22:36:46 +07:00
as int ,
2025-08-17 22:46:25 +07:00
revenue: null = = revenue
? _value . revenue
: revenue // ignore: cast_nullable_to_non_nullable
as int ,
cost: null = = cost
? _value . cost
: cost // ignore: cast_nullable_to_non_nullable
2025-08-17 22:36:46 +07:00
as int ,
grossProfit: null = = grossProfit
? _value . grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as int ,
grossProfitMargin: null = = grossProfitMargin
? _value . grossProfitMargin
: grossProfitMargin // ignore: cast_nullable_to_non_nullable
as double ,
2025-08-17 22:46:25 +07:00
averagePrice: null = = averagePrice
? _value . averagePrice
: averagePrice // ignore: cast_nullable_to_non_nullable
2025-08-17 22:36:46 +07:00
as int ,
2025-08-17 22:46:25 +07:00
averageCost: null = = averageCost
? _value . averageCost
: averageCost // ignore: cast_nullable_to_non_nullable
2025-08-17 22:36:46 +07:00
as int ,
2025-08-17 22:46:25 +07:00
profitPerUnit: null = = profitPerUnit
? _value . profitPerUnit
: profitPerUnit // ignore: cast_nullable_to_non_nullable
2025-08-17 22:36:46 +07:00
as int ,
) ,
) ;
}
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class _ $ProfitLossProductDataImpl implements _ProfitLossProductData {
const _ $ProfitLossProductDataImpl ( {
required this . productId ,
required this . productName ,
required this . categoryId ,
required this . categoryName ,
required this . quantitySold ,
required this . revenue ,
required this . cost ,
2025-08-17 22:36:46 +07:00
required this . grossProfit ,
required this . grossProfitMargin ,
2025-08-17 22:46:25 +07:00
required this . averagePrice ,
required this . averageCost ,
required this . profitPerUnit ,
2025-08-17 22:36:46 +07:00
} ) ;
@ override
2025-08-17 22:46:25 +07:00
final String productId ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final String productName ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final String categoryId ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final String categoryName ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int quantitySold ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int revenue ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int cost ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int grossProfit ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final double grossProfitMargin ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int averagePrice ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final int averageCost ;
@ override
final int profitPerUnit ;
2025-08-17 22:36:46 +07:00
@ override
String toString ( ) {
2025-08-17 22:46:25 +07:00
return ' ProfitLossProductData(productId: $ productId , productName: $ productName , categoryId: $ categoryId , categoryName: $ categoryName , quantitySold: $ quantitySold , revenue: $ revenue , cost: $ cost , grossProfit: $ grossProfit , grossProfitMargin: $ grossProfitMargin , averagePrice: $ averagePrice , averageCost: $ averageCost , profitPerUnit: $ profitPerUnit ) ' ;
2025-08-17 22:36:46 +07:00
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
2025-08-17 22:46:25 +07:00
other is _ $ProfitLossProductDataImpl & &
( 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 . cost , cost ) | | other . cost = = cost ) & &
2025-08-17 22:36:46 +07:00
( identical ( other . grossProfit , grossProfit ) | |
other . grossProfit = = grossProfit ) & &
( identical ( other . grossProfitMargin , grossProfitMargin ) | |
other . grossProfitMargin = = grossProfitMargin ) & &
2025-08-17 22:46:25 +07:00
( identical ( other . averagePrice , averagePrice ) | |
other . averagePrice = = averagePrice ) & &
( identical ( other . averageCost , averageCost ) | |
other . averageCost = = averageCost ) & &
( identical ( other . profitPerUnit , profitPerUnit ) | |
other . profitPerUnit = = profitPerUnit ) ) ;
2025-08-17 22:36:46 +07:00
}
@ override
int get hashCode = > Object . hash (
runtimeType ,
2025-08-17 22:46:25 +07:00
productId ,
productName ,
categoryId ,
categoryName ,
quantitySold ,
revenue ,
cost ,
2025-08-17 22:36:46 +07:00
grossProfit ,
grossProfitMargin ,
2025-08-17 22:46:25 +07:00
averagePrice ,
averageCost ,
profitPerUnit ,
2025-08-17 22:36:46 +07:00
) ;
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossProductData
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
2025-08-17 22:46:25 +07:00
_ $ $ProfitLossProductDataImplCopyWith < _ $ProfitLossProductDataImpl >
get copyWith = >
__ $ $ProfitLossProductDataImplCopyWithImpl < _ $ProfitLossProductDataImpl > (
2025-08-17 22:36:46 +07:00
this ,
_ $identity ,
) ;
}
2025-08-17 22:46:25 +07:00
abstract class _ProfitLossProductData implements ProfitLossProductData {
const factory _ProfitLossProductData ( {
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 int cost ,
2025-08-17 22:36:46 +07:00
required final int grossProfit ,
required final double grossProfitMargin ,
2025-08-17 22:46:25 +07:00
required final int averagePrice ,
required final int averageCost ,
required final int profitPerUnit ,
} ) = _ $ProfitLossProductDataImpl ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
String get productId ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
String get productName ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
String get categoryId ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
String get categoryName ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
int get quantitySold ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
int get revenue ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
int get cost ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
int get grossProfit ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
double get grossProfitMargin ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
int get averagePrice ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
int get averageCost ;
@ override
int get profitPerUnit ;
2025-08-17 22:36:46 +07:00
2025-08-17 22:46:25 +07:00
/// Create a copy of ProfitLossProductData
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-08-17 22:46:25 +07:00
_ $ $ProfitLossProductDataImplCopyWith < _ $ProfitLossProductDataImpl >
get copyWith = > throw _privateConstructorUsedError ;
2025-08-17 22:36:46 +07:00
}
/// @nodoc
2025-08-17 22:46:25 +07:00
mixin _ $CategoryAnalytic {
String get organizationId = > throw _privateConstructorUsedError ;
String get outletId = > throw _privateConstructorUsedError ;
String get dateFrom = > throw _privateConstructorUsedError ;
String get dateTo = > throw _privateConstructorUsedError ;
List < CategoryAnalyticItem > get data = > throw _privateConstructorUsedError ;
2025-08-17 22:36:46 +07:00
2025-08-17 22:46:25 +07:00
/// Create a copy of CategoryAnalytic
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-08-17 22:46:25 +07:00
$CategoryAnalyticCopyWith < CategoryAnalytic > get copyWith = >
2025-08-17 22:36:46 +07:00
throw _privateConstructorUsedError ;
}
/// @nodoc
2025-08-17 22:46:25 +07:00
abstract class $CategoryAnalyticCopyWith < $Res > {
factory $CategoryAnalyticCopyWith (
CategoryAnalytic value ,
$Res Function ( CategoryAnalytic ) then ,
) = _ $CategoryAnalyticCopyWithImpl < $Res , CategoryAnalytic > ;
2025-08-17 22:36:46 +07:00
@ useResult
$Res call ( {
2025-08-17 22:46:25 +07:00
String organizationId ,
String outletId ,
String dateFrom ,
String dateTo ,
List < CategoryAnalyticItem > data ,
2025-08-17 22:36:46 +07:00
} ) ;
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class _ $CategoryAnalyticCopyWithImpl < $Res , $Val extends CategoryAnalytic >
implements $CategoryAnalyticCopyWith < $Res > {
_ $CategoryAnalyticCopyWithImpl ( this . _value , this . _then ) ;
2025-08-17 22:36:46 +07:00
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
2025-08-17 22:46:25 +07:00
/// Create a copy of CategoryAnalytic
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
2025-08-17 22:46:25 +07:00
Object ? organizationId = null ,
Object ? outletId = null ,
Object ? dateFrom = null ,
Object ? dateTo = null ,
Object ? data = null ,
2025-08-17 22:36:46 +07:00
} ) {
return _then (
_value . copyWith (
2025-08-17 22:46:25 +07:00
organizationId: null = = organizationId
? _value . organizationId
: organizationId // ignore: cast_nullable_to_non_nullable
2025-08-17 22:36:46 +07:00
as String ,
2025-08-17 22:46:25 +07:00
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 ,
data: null = = data
? _value . data
: data // ignore: cast_nullable_to_non_nullable
as List < CategoryAnalyticItem > ,
)
as $Val ,
) ;
}
}
/// @nodoc
abstract class _ $ $CategoryAnalyticImplCopyWith < $Res >
implements $CategoryAnalyticCopyWith < $Res > {
factory _ $ $CategoryAnalyticImplCopyWith (
_ $CategoryAnalyticImpl value ,
$Res Function ( _ $CategoryAnalyticImpl ) then ,
) = __ $ $CategoryAnalyticImplCopyWithImpl < $Res > ;
@ override
2025-08-17 22:36:46 +07:00
@ useResult
$Res call ( {
2025-08-17 22:46:25 +07:00
String organizationId ,
String outletId ,
String dateFrom ,
String dateTo ,
List < CategoryAnalyticItem > data ,
2025-08-17 22:36:46 +07:00
} ) ;
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class __ $ $CategoryAnalyticImplCopyWithImpl < $Res >
extends _ $CategoryAnalyticCopyWithImpl < $Res , _ $CategoryAnalyticImpl >
implements _ $ $CategoryAnalyticImplCopyWith < $Res > {
__ $ $CategoryAnalyticImplCopyWithImpl (
_ $CategoryAnalyticImpl _value ,
$Res Function ( _ $CategoryAnalyticImpl ) _then ,
2025-08-17 22:36:46 +07:00
) : super ( _value , _then ) ;
2025-08-17 22:46:25 +07:00
/// Create a copy of CategoryAnalytic
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
2025-08-17 22:46:25 +07:00
Object ? organizationId = null ,
Object ? outletId = null ,
Object ? dateFrom = null ,
Object ? dateTo = null ,
Object ? data = null ,
2025-08-17 22:36:46 +07:00
} ) {
return _then (
2025-08-17 22:46:25 +07:00
_ $CategoryAnalyticImpl (
organizationId: null = = organizationId
? _value . organizationId
: organizationId // ignore: cast_nullable_to_non_nullable
2025-08-17 22:36:46 +07:00
as String ,
2025-08-17 22:46:25 +07:00
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 ,
data: null = = data
? _value . _data
: data // ignore: cast_nullable_to_non_nullable
as List < CategoryAnalyticItem > ,
2025-08-17 22:36:46 +07:00
) ,
) ;
}
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class _ $CategoryAnalyticImpl implements _CategoryAnalytic {
const _ $CategoryAnalyticImpl ( {
required this . organizationId ,
required this . outletId ,
required this . dateFrom ,
required this . dateTo ,
required final List < CategoryAnalyticItem > data ,
} ) : _data = data ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final String organizationId ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final String outletId ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final String dateFrom ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final String dateTo ;
final List < CategoryAnalyticItem > _data ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
List < CategoryAnalyticItem > get data {
if ( _data is EqualUnmodifiableListView ) return _data ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _data ) ;
}
2025-08-17 22:36:46 +07:00
@ override
String toString ( ) {
2025-08-17 22:46:25 +07:00
return ' CategoryAnalytic(organizationId: $ organizationId , outletId: $ outletId , dateFrom: $ dateFrom , dateTo: $ dateTo , data: $ data ) ' ;
2025-08-17 22:36:46 +07:00
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
2025-08-17 22:46:25 +07:00
other is _ $CategoryAnalyticImpl & &
( 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 ) & &
const DeepCollectionEquality ( ) . equals ( other . _data , _data ) ) ;
2025-08-17 22:36:46 +07:00
}
@ override
int get hashCode = > Object . hash (
runtimeType ,
2025-08-17 22:46:25 +07:00
organizationId ,
outletId ,
dateFrom ,
dateTo ,
const DeepCollectionEquality ( ) . hash ( _data ) ,
2025-08-17 22:36:46 +07:00
) ;
2025-08-17 22:46:25 +07:00
/// Create a copy of CategoryAnalytic
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
2025-08-17 22:46:25 +07:00
_ $ $CategoryAnalyticImplCopyWith < _ $CategoryAnalyticImpl > get copyWith = >
__ $ $CategoryAnalyticImplCopyWithImpl < _ $CategoryAnalyticImpl > (
2025-08-17 22:36:46 +07:00
this ,
_ $identity ,
) ;
}
2025-08-17 22:46:25 +07:00
abstract class _CategoryAnalytic implements CategoryAnalytic {
const factory _CategoryAnalytic ( {
required final String organizationId ,
required final String outletId ,
required final String dateFrom ,
required final String dateTo ,
required final List < CategoryAnalyticItem > data ,
} ) = _ $CategoryAnalyticImpl ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
String get organizationId ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
String get outletId ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
String get dateFrom ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
String get dateTo ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
List < CategoryAnalyticItem > get data ;
2025-08-17 22:36:46 +07:00
2025-08-17 22:46:25 +07:00
/// Create a copy of CategoryAnalytic
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-08-17 22:46:25 +07:00
_ $ $CategoryAnalyticImplCopyWith < _ $CategoryAnalyticImpl > get copyWith = >
2025-08-17 22:36:46 +07:00
throw _privateConstructorUsedError ;
}
/// @nodoc
2025-08-17 22:46:25 +07:00
mixin _ $CategoryAnalyticItem {
2025-08-17 22:36:46 +07:00
String get categoryId = > throw _privateConstructorUsedError ;
String get categoryName = > throw _privateConstructorUsedError ;
2025-08-17 22:46:25 +07:00
int get totalRevenue = > throw _privateConstructorUsedError ;
int get totalQuantity = > throw _privateConstructorUsedError ;
int get productCount = > throw _privateConstructorUsedError ;
int get orderCount = > throw _privateConstructorUsedError ;
2025-08-17 22:36:46 +07:00
2025-08-17 22:46:25 +07:00
/// Create a copy of CategoryAnalyticItem
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-08-17 22:46:25 +07:00
$CategoryAnalyticItemCopyWith < CategoryAnalyticItem > get copyWith = >
2025-08-17 22:36:46 +07:00
throw _privateConstructorUsedError ;
}
/// @nodoc
2025-08-17 22:46:25 +07:00
abstract class $CategoryAnalyticItemCopyWith < $Res > {
factory $CategoryAnalyticItemCopyWith (
CategoryAnalyticItem value ,
$Res Function ( CategoryAnalyticItem ) then ,
) = _ $CategoryAnalyticItemCopyWithImpl < $Res , CategoryAnalyticItem > ;
2025-08-17 22:36:46 +07:00
@ useResult
$Res call ( {
String categoryId ,
String categoryName ,
2025-08-17 22:46:25 +07:00
int totalRevenue ,
int totalQuantity ,
int productCount ,
int orderCount ,
2025-08-17 22:36:46 +07:00
} ) ;
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class _ $CategoryAnalyticItemCopyWithImpl <
2025-08-17 22:36:46 +07:00
$Res ,
2025-08-17 22:46:25 +07:00
$Val extends CategoryAnalyticItem
2025-08-17 22:36:46 +07:00
>
2025-08-17 22:46:25 +07:00
implements $CategoryAnalyticItemCopyWith < $Res > {
_ $CategoryAnalyticItemCopyWithImpl ( this . _value , this . _then ) ;
2025-08-17 22:36:46 +07:00
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
2025-08-17 22:46:25 +07:00
/// Create a copy of CategoryAnalyticItem
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? categoryId = null ,
Object ? categoryName = null ,
2025-08-17 22:46:25 +07:00
Object ? totalRevenue = null ,
Object ? totalQuantity = null ,
Object ? productCount = null ,
Object ? orderCount = null ,
2025-08-17 22:36:46 +07:00
} ) {
return _then (
_value . copyWith (
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 ,
2025-08-17 22:46:25 +07:00
totalRevenue: null = = totalRevenue
? _value . totalRevenue
: totalRevenue // ignore: cast_nullable_to_non_nullable
2025-08-17 22:36:46 +07:00
as int ,
2025-08-17 22:46:25 +07:00
totalQuantity: null = = totalQuantity
? _value . totalQuantity
: totalQuantity // ignore: cast_nullable_to_non_nullable
2025-08-17 22:36:46 +07:00
as int ,
2025-08-17 22:46:25 +07:00
productCount: null = = productCount
? _value . productCount
: productCount // ignore: cast_nullable_to_non_nullable
2025-08-17 22:36:46 +07:00
as int ,
2025-08-17 22:46:25 +07:00
orderCount: null = = orderCount
? _value . orderCount
: orderCount // ignore: cast_nullable_to_non_nullable
2025-08-17 22:36:46 +07:00
as int ,
)
as $Val ,
) ;
}
}
/// @nodoc
2025-08-17 22:46:25 +07:00
abstract class _ $ $CategoryAnalyticItemImplCopyWith < $Res >
implements $CategoryAnalyticItemCopyWith < $Res > {
factory _ $ $CategoryAnalyticItemImplCopyWith (
_ $CategoryAnalyticItemImpl value ,
$Res Function ( _ $CategoryAnalyticItemImpl ) then ,
) = __ $ $CategoryAnalyticItemImplCopyWithImpl < $Res > ;
2025-08-17 22:36:46 +07:00
@ override
@ useResult
$Res call ( {
String categoryId ,
String categoryName ,
2025-08-17 22:46:25 +07:00
int totalRevenue ,
int totalQuantity ,
int productCount ,
int orderCount ,
2025-08-17 22:36:46 +07:00
} ) ;
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class __ $ $CategoryAnalyticItemImplCopyWithImpl < $Res >
extends _ $CategoryAnalyticItemCopyWithImpl < $Res , _ $CategoryAnalyticItemImpl >
implements _ $ $CategoryAnalyticItemImplCopyWith < $Res > {
__ $ $CategoryAnalyticItemImplCopyWithImpl (
_ $CategoryAnalyticItemImpl _value ,
$Res Function ( _ $CategoryAnalyticItemImpl ) _then ,
2025-08-17 22:36:46 +07:00
) : super ( _value , _then ) ;
2025-08-17 22:46:25 +07:00
/// Create a copy of CategoryAnalyticItem
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? categoryId = null ,
Object ? categoryName = null ,
2025-08-17 22:46:25 +07:00
Object ? totalRevenue = null ,
Object ? totalQuantity = null ,
Object ? productCount = null ,
Object ? orderCount = null ,
2025-08-17 22:36:46 +07:00
} ) {
return _then (
2025-08-17 22:46:25 +07:00
_ $CategoryAnalyticItemImpl (
2025-08-17 22:36:46 +07:00
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 ,
2025-08-17 22:46:25 +07:00
totalRevenue: null = = totalRevenue
? _value . totalRevenue
: totalRevenue // ignore: cast_nullable_to_non_nullable
as int ,
totalQuantity: null = = totalQuantity
? _value . totalQuantity
: totalQuantity // ignore: cast_nullable_to_non_nullable
as int ,
productCount: null = = productCount
? _value . productCount
: productCount // ignore: cast_nullable_to_non_nullable
as int ,
orderCount: null = = orderCount
? _value . orderCount
: orderCount // ignore: cast_nullable_to_non_nullable
as int ,
) ,
) ;
}
}
/// @nodoc
class _ $CategoryAnalyticItemImpl implements _CategoryAnalyticItem {
const _ $CategoryAnalyticItemImpl ( {
required this . categoryId ,
required this . categoryName ,
required this . totalRevenue ,
required this . totalQuantity ,
required this . productCount ,
required this . orderCount ,
} ) ;
@ override
final String categoryId ;
@ override
final String categoryName ;
@ override
final int totalRevenue ;
@ override
final int totalQuantity ;
@ override
final int productCount ;
@ override
final int orderCount ;
@ override
String toString ( ) {
return ' CategoryAnalyticItem(categoryId: $ categoryId , categoryName: $ categoryName , totalRevenue: $ totalRevenue , totalQuantity: $ totalQuantity , productCount: $ productCount , orderCount: $ orderCount ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $CategoryAnalyticItemImpl & &
( identical ( other . categoryId , categoryId ) | |
other . categoryId = = categoryId ) & &
( identical ( other . categoryName , categoryName ) | |
other . categoryName = = categoryName ) & &
( identical ( other . totalRevenue , totalRevenue ) | |
other . totalRevenue = = totalRevenue ) & &
( identical ( other . totalQuantity , totalQuantity ) | |
other . totalQuantity = = totalQuantity ) & &
( identical ( other . productCount , productCount ) | |
other . productCount = = productCount ) & &
( identical ( other . orderCount , orderCount ) | |
other . orderCount = = orderCount ) ) ;
}
@ override
int get hashCode = > Object . hash (
runtimeType ,
categoryId ,
categoryName ,
totalRevenue ,
totalQuantity ,
productCount ,
orderCount ,
) ;
/// Create a copy of CategoryAnalyticItem
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $CategoryAnalyticItemImplCopyWith < _ $CategoryAnalyticItemImpl >
get copyWith = >
__ $ $CategoryAnalyticItemImplCopyWithImpl < _ $CategoryAnalyticItemImpl > (
this ,
_ $identity ,
) ;
}
abstract class _CategoryAnalyticItem implements CategoryAnalyticItem {
const factory _CategoryAnalyticItem ( {
required final String categoryId ,
required final String categoryName ,
required final int totalRevenue ,
required final int totalQuantity ,
required final int productCount ,
required final int orderCount ,
} ) = _ $CategoryAnalyticItemImpl ;
@ override
String get categoryId ;
@ override
String get categoryName ;
@ override
int get totalRevenue ;
@ override
int get totalQuantity ;
@ override
int get productCount ;
@ override
int get orderCount ;
/// Create a copy of CategoryAnalyticItem
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $CategoryAnalyticItemImplCopyWith < _ $CategoryAnalyticItemImpl >
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 ( ) empty ,
required TResult Function ( String erroMessage ) dynamicErrorMessage ,
} ) = > throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
TResult ? Function ( ApiFailure failure ) ? serverError ,
TResult ? Function ( ) ? unexpectedError ,
TResult ? Function ( ) ? empty ,
TResult ? Function ( String erroMessage ) ? dynamicErrorMessage ,
} ) = > throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ApiFailure failure ) ? serverError ,
TResult Function ( ) ? unexpectedError ,
TResult Function ( ) ? empty ,
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 ( _Empty value ) empty ,
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 ( _Empty value ) ? empty ,
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 ( _Empty value ) ? empty ,
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 ( ) empty ,
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 ( ) ? empty ,
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 ( ) ? empty ,
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 ( _Empty value ) empty ,
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 ( _Empty value ) ? empty ,
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 ( _Empty value ) ? empty ,
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 ( ) empty ,
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 ( ) ? empty ,
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 ( ) ? empty ,
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 ( _Empty value ) empty ,
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 ( _Empty value ) ? empty ,
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 ( _Empty value ) ? empty ,
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 _ $ $EmptyImplCopyWith < $Res > {
factory _ $ $EmptyImplCopyWith (
_ $EmptyImpl value ,
$Res Function ( _ $EmptyImpl ) then ,
) = __ $ $EmptyImplCopyWithImpl < $Res > ;
}
/// @nodoc
class __ $ $EmptyImplCopyWithImpl < $Res >
extends _ $AnalyticFailureCopyWithImpl < $Res , _ $EmptyImpl >
implements _ $ $EmptyImplCopyWith < $Res > {
__ $ $EmptyImplCopyWithImpl (
_ $EmptyImpl _value ,
$Res Function ( _ $EmptyImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of AnalyticFailure
/// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
class _ $EmptyImpl implements _Empty {
const _ $EmptyImpl ( ) ;
@ override
String toString ( ) {
return ' AnalyticFailure.empty() ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & & other is _ $EmptyImpl ) ;
}
@ 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 ( ) empty ,
required TResult Function ( String erroMessage ) dynamicErrorMessage ,
} ) {
return empty ( ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
TResult ? Function ( ApiFailure failure ) ? serverError ,
TResult ? Function ( ) ? unexpectedError ,
TResult ? Function ( ) ? empty ,
TResult ? Function ( String erroMessage ) ? dynamicErrorMessage ,
} ) {
return empty ? . call ( ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ApiFailure failure ) ? serverError ,
TResult Function ( ) ? unexpectedError ,
TResult Function ( ) ? empty ,
TResult Function ( String erroMessage ) ? dynamicErrorMessage ,
required TResult orElse ( ) ,
} ) {
if ( empty ! = null ) {
return empty ( ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _ServerError value ) serverError ,
required TResult Function ( _UnexpectedError value ) unexpectedError ,
required TResult Function ( _Empty value ) empty ,
required TResult Function ( _DynamicErrorMessage value ) dynamicErrorMessage ,
} ) {
return empty ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _ServerError value ) ? serverError ,
TResult ? Function ( _UnexpectedError value ) ? unexpectedError ,
TResult ? Function ( _Empty value ) ? empty ,
TResult ? Function ( _DynamicErrorMessage value ) ? dynamicErrorMessage ,
} ) {
return empty ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _ServerError value ) ? serverError ,
TResult Function ( _UnexpectedError value ) ? unexpectedError ,
TResult Function ( _Empty value ) ? empty ,
TResult Function ( _DynamicErrorMessage value ) ? dynamicErrorMessage ,
required TResult orElse ( ) ,
} ) {
if ( empty ! = null ) {
return empty ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _Empty implements AnalyticFailure {
const factory _Empty ( ) = _ $EmptyImpl ;
}
/// @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 ,
2025-08-17 22:36:46 +07:00
) ,
) ;
}
}
/// @nodoc
2025-08-17 22:46:25 +07:00
class _ $DynamicErrorMessageImpl implements _DynamicErrorMessage {
const _ $DynamicErrorMessageImpl ( this . erroMessage ) ;
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
final String erroMessage ;
2025-08-17 22:36:46 +07:00
@ override
String toString ( ) {
2025-08-17 22:46:25 +07:00
return ' AnalyticFailure.dynamicErrorMessage(erroMessage: $ erroMessage ) ' ;
2025-08-17 22:36:46 +07:00
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
2025-08-17 22:46:25 +07:00
other is _ $DynamicErrorMessageImpl & &
( identical ( other . erroMessage , erroMessage ) | |
other . erroMessage = = erroMessage ) ) ;
2025-08-17 22:36:46 +07:00
}
@ override
2025-08-17 22:46:25 +07:00
int get hashCode = > Object . hash ( runtimeType , erroMessage ) ;
2025-08-17 22:36:46 +07:00
2025-08-17 22:46:25 +07:00
/// Create a copy of AnalyticFailure
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
2025-08-17 22:46:25 +07:00
_ $ $DynamicErrorMessageImplCopyWith < _ $DynamicErrorMessageImpl > get copyWith = >
__ $ $DynamicErrorMessageImplCopyWithImpl < _ $DynamicErrorMessageImpl > (
2025-08-17 22:36:46 +07:00
this ,
_ $identity ,
) ;
@ override
2025-08-17 22:46:25 +07:00
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ApiFailure failure ) serverError ,
required TResult Function ( ) unexpectedError ,
required TResult Function ( ) empty ,
required TResult Function ( String erroMessage ) dynamicErrorMessage ,
} ) {
return dynamicErrorMessage ( erroMessage ) ;
}
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
TResult ? Function ( ApiFailure failure ) ? serverError ,
TResult ? Function ( ) ? unexpectedError ,
TResult ? Function ( ) ? empty ,
TResult ? Function ( String erroMessage ) ? dynamicErrorMessage ,
} ) {
return dynamicErrorMessage ? . call ( erroMessage ) ;
}
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ApiFailure failure ) ? serverError ,
TResult Function ( ) ? unexpectedError ,
TResult Function ( ) ? empty ,
TResult Function ( String erroMessage ) ? dynamicErrorMessage ,
required TResult orElse ( ) ,
} ) {
if ( dynamicErrorMessage ! = null ) {
return dynamicErrorMessage ( erroMessage ) ;
}
return orElse ( ) ;
}
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _ServerError value ) serverError ,
required TResult Function ( _UnexpectedError value ) unexpectedError ,
required TResult Function ( _Empty value ) empty ,
required TResult Function ( _DynamicErrorMessage value ) dynamicErrorMessage ,
} ) {
return dynamicErrorMessage ( this ) ;
}
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _ServerError value ) ? serverError ,
TResult ? Function ( _UnexpectedError value ) ? unexpectedError ,
TResult ? Function ( _Empty value ) ? empty ,
TResult ? Function ( _DynamicErrorMessage value ) ? dynamicErrorMessage ,
} ) {
return dynamicErrorMessage ? . call ( this ) ;
}
2025-08-17 22:36:46 +07:00
@ override
2025-08-17 22:46:25 +07:00
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _ServerError value ) ? serverError ,
TResult Function ( _UnexpectedError value ) ? unexpectedError ,
TResult Function ( _Empty value ) ? empty ,
TResult Function ( _DynamicErrorMessage value ) ? dynamicErrorMessage ,
required TResult orElse ( ) ,
} ) {
if ( dynamicErrorMessage ! = null ) {
return dynamicErrorMessage ( this ) ;
}
return orElse ( ) ;
}
}
2025-08-17 22:36:46 +07:00
2025-08-17 22:46:25 +07:00
abstract class _DynamicErrorMessage implements AnalyticFailure {
const factory _DynamicErrorMessage ( final String erroMessage ) =
_ $DynamicErrorMessageImpl ;
String get erroMessage ;
/// Create a copy of AnalyticFailure
2025-08-17 22:36:46 +07:00
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-08-17 22:46:25 +07:00
_ $ $DynamicErrorMessageImplCopyWith < _ $DynamicErrorMessageImpl > get copyWith = >
throw _privateConstructorUsedError ;
2025-08-17 22:36:46 +07:00
}