Merge branch with resolved conflicts - restructured features and added new modules
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'auth_response_model.freezed.dart';
|
||||
part 'auth_response_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class AuthResponseModel with _$AuthResponseModel {
|
||||
const factory AuthResponseModel({
|
||||
String? accessToken,
|
||||
String? expiresIn,
|
||||
String? scope,
|
||||
String? expireTime,
|
||||
String? mobile,
|
||||
String? fullname,
|
||||
String? firstname,
|
||||
String? lastname,
|
||||
String? city,
|
||||
String? province,
|
||||
String? nationalCode,
|
||||
String? nationalId,
|
||||
String? birthday,
|
||||
String? image,
|
||||
int? baseOrder,
|
||||
List<String>? role,
|
||||
}) = _AuthResponseModel;
|
||||
|
||||
factory AuthResponseModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$AuthResponseModelFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,330 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// 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 'auth_response_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$AuthResponseModel {
|
||||
|
||||
String? get accessToken; String? get expiresIn; String? get scope; String? get expireTime; String? get mobile; String? get fullname; String? get firstname; String? get lastname; String? get city; String? get province; String? get nationalCode; String? get nationalId; String? get birthday; String? get image; int? get baseOrder; List<String>? get role;
|
||||
/// Create a copy of AuthResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$AuthResponseModelCopyWith<AuthResponseModel> get copyWith => _$AuthResponseModelCopyWithImpl<AuthResponseModel>(this as AuthResponseModel, _$identity);
|
||||
|
||||
/// Serializes this AuthResponseModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is AuthResponseModel&&(identical(other.accessToken, accessToken) || other.accessToken == accessToken)&&(identical(other.expiresIn, expiresIn) || other.expiresIn == expiresIn)&&(identical(other.scope, scope) || other.scope == scope)&&(identical(other.expireTime, expireTime) || other.expireTime == expireTime)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstname, firstname) || other.firstname == firstname)&&(identical(other.lastname, lastname) || other.lastname == lastname)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.image, image) || other.image == image)&&(identical(other.baseOrder, baseOrder) || other.baseOrder == baseOrder)&&const DeepCollectionEquality().equals(other.role, role));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,accessToken,expiresIn,scope,expireTime,mobile,fullname,firstname,lastname,city,province,nationalCode,nationalId,birthday,image,baseOrder,const DeepCollectionEquality().hash(role));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AuthResponseModel(accessToken: $accessToken, expiresIn: $expiresIn, scope: $scope, expireTime: $expireTime, mobile: $mobile, fullname: $fullname, firstname: $firstname, lastname: $lastname, city: $city, province: $province, nationalCode: $nationalCode, nationalId: $nationalId, birthday: $birthday, image: $image, baseOrder: $baseOrder, role: $role)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $AuthResponseModelCopyWith<$Res> {
|
||||
factory $AuthResponseModelCopyWith(AuthResponseModel value, $Res Function(AuthResponseModel) _then) = _$AuthResponseModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$AuthResponseModelCopyWithImpl<$Res>
|
||||
implements $AuthResponseModelCopyWith<$Res> {
|
||||
_$AuthResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final AuthResponseModel _self;
|
||||
final $Res Function(AuthResponseModel) _then;
|
||||
|
||||
/// Create a copy of AuthResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? accessToken = freezed,Object? expiresIn = freezed,Object? scope = freezed,Object? expireTime = freezed,Object? mobile = freezed,Object? fullname = freezed,Object? firstname = freezed,Object? lastname = freezed,Object? city = freezed,Object? province = freezed,Object? nationalCode = freezed,Object? nationalId = freezed,Object? birthday = freezed,Object? image = freezed,Object? baseOrder = freezed,Object? role = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
accessToken: freezed == accessToken ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable
|
||||
as String?,expiresIn: freezed == expiresIn ? _self.expiresIn : expiresIn // ignore: cast_nullable_to_non_nullable
|
||||
as String?,scope: freezed == scope ? _self.scope : scope // ignore: cast_nullable_to_non_nullable
|
||||
as String?,expireTime: freezed == expireTime ? _self.expireTime : expireTime // ignore: cast_nullable_to_non_nullable
|
||||
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,firstname: freezed == firstname ? _self.firstname : firstname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastname: freezed == lastname ? _self.lastname : lastname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
|
||||
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
|
||||
as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable
|
||||
as String?,baseOrder: freezed == baseOrder ? _self.baseOrder : baseOrder // ignore: cast_nullable_to_non_nullable
|
||||
as int?,role: freezed == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [AuthResponseModel].
|
||||
extension AuthResponseModelPatterns on AuthResponseModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _AuthResponseModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _AuthResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _AuthResponseModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _AuthResponseModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _AuthResponseModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _AuthResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _AuthResponseModel() when $default != null:
|
||||
return $default(_that.accessToken,_that.expiresIn,_that.scope,_that.expireTime,_that.mobile,_that.fullname,_that.firstname,_that.lastname,_that.city,_that.province,_that.nationalCode,_that.nationalId,_that.birthday,_that.image,_that.baseOrder,_that.role);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _AuthResponseModel():
|
||||
return $default(_that.accessToken,_that.expiresIn,_that.scope,_that.expireTime,_that.mobile,_that.fullname,_that.firstname,_that.lastname,_that.city,_that.province,_that.nationalCode,_that.nationalId,_that.birthday,_that.image,_that.baseOrder,_that.role);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _AuthResponseModel() when $default != null:
|
||||
return $default(_that.accessToken,_that.expiresIn,_that.scope,_that.expireTime,_that.mobile,_that.fullname,_that.firstname,_that.lastname,_that.city,_that.province,_that.nationalCode,_that.nationalId,_that.birthday,_that.image,_that.baseOrder,_that.role);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _AuthResponseModel implements AuthResponseModel {
|
||||
const _AuthResponseModel({this.accessToken, this.expiresIn, this.scope, this.expireTime, this.mobile, this.fullname, this.firstname, this.lastname, this.city, this.province, this.nationalCode, this.nationalId, this.birthday, this.image, this.baseOrder, final List<String>? role}): _role = role;
|
||||
factory _AuthResponseModel.fromJson(Map<String, dynamic> json) => _$AuthResponseModelFromJson(json);
|
||||
|
||||
@override final String? accessToken;
|
||||
@override final String? expiresIn;
|
||||
@override final String? scope;
|
||||
@override final String? expireTime;
|
||||
@override final String? mobile;
|
||||
@override final String? fullname;
|
||||
@override final String? firstname;
|
||||
@override final String? lastname;
|
||||
@override final String? city;
|
||||
@override final String? province;
|
||||
@override final String? nationalCode;
|
||||
@override final String? nationalId;
|
||||
@override final String? birthday;
|
||||
@override final String? image;
|
||||
@override final int? baseOrder;
|
||||
final List<String>? _role;
|
||||
@override List<String>? get role {
|
||||
final value = _role;
|
||||
if (value == null) return null;
|
||||
if (_role is EqualUnmodifiableListView) return _role;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of AuthResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$AuthResponseModelCopyWith<_AuthResponseModel> get copyWith => __$AuthResponseModelCopyWithImpl<_AuthResponseModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$AuthResponseModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AuthResponseModel&&(identical(other.accessToken, accessToken) || other.accessToken == accessToken)&&(identical(other.expiresIn, expiresIn) || other.expiresIn == expiresIn)&&(identical(other.scope, scope) || other.scope == scope)&&(identical(other.expireTime, expireTime) || other.expireTime == expireTime)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstname, firstname) || other.firstname == firstname)&&(identical(other.lastname, lastname) || other.lastname == lastname)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.image, image) || other.image == image)&&(identical(other.baseOrder, baseOrder) || other.baseOrder == baseOrder)&&const DeepCollectionEquality().equals(other._role, _role));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,accessToken,expiresIn,scope,expireTime,mobile,fullname,firstname,lastname,city,province,nationalCode,nationalId,birthday,image,baseOrder,const DeepCollectionEquality().hash(_role));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AuthResponseModel(accessToken: $accessToken, expiresIn: $expiresIn, scope: $scope, expireTime: $expireTime, mobile: $mobile, fullname: $fullname, firstname: $firstname, lastname: $lastname, city: $city, province: $province, nationalCode: $nationalCode, nationalId: $nationalId, birthday: $birthday, image: $image, baseOrder: $baseOrder, role: $role)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$AuthResponseModelCopyWith<$Res> implements $AuthResponseModelCopyWith<$Res> {
|
||||
factory _$AuthResponseModelCopyWith(_AuthResponseModel value, $Res Function(_AuthResponseModel) _then) = __$AuthResponseModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$AuthResponseModelCopyWithImpl<$Res>
|
||||
implements _$AuthResponseModelCopyWith<$Res> {
|
||||
__$AuthResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _AuthResponseModel _self;
|
||||
final $Res Function(_AuthResponseModel) _then;
|
||||
|
||||
/// Create a copy of AuthResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? accessToken = freezed,Object? expiresIn = freezed,Object? scope = freezed,Object? expireTime = freezed,Object? mobile = freezed,Object? fullname = freezed,Object? firstname = freezed,Object? lastname = freezed,Object? city = freezed,Object? province = freezed,Object? nationalCode = freezed,Object? nationalId = freezed,Object? birthday = freezed,Object? image = freezed,Object? baseOrder = freezed,Object? role = freezed,}) {
|
||||
return _then(_AuthResponseModel(
|
||||
accessToken: freezed == accessToken ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable
|
||||
as String?,expiresIn: freezed == expiresIn ? _self.expiresIn : expiresIn // ignore: cast_nullable_to_non_nullable
|
||||
as String?,scope: freezed == scope ? _self.scope : scope // ignore: cast_nullable_to_non_nullable
|
||||
as String?,expireTime: freezed == expireTime ? _self.expireTime : expireTime // ignore: cast_nullable_to_non_nullable
|
||||
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,firstname: freezed == firstname ? _self.firstname : firstname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastname: freezed == lastname ? _self.lastname : lastname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
|
||||
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
|
||||
as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable
|
||||
as String?,baseOrder: freezed == baseOrder ? _self.baseOrder : baseOrder // ignore: cast_nullable_to_non_nullable
|
||||
as int?,role: freezed == role ? _self._role : role // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,47 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'auth_response_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_AuthResponseModel _$AuthResponseModelFromJson(Map<String, dynamic> json) =>
|
||||
_AuthResponseModel(
|
||||
accessToken: json['access_token'] as String?,
|
||||
expiresIn: json['expires_in'] as String?,
|
||||
scope: json['scope'] as String?,
|
||||
expireTime: json['expire_time'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
fullname: json['fullname'] as String?,
|
||||
firstname: json['firstname'] as String?,
|
||||
lastname: json['lastname'] as String?,
|
||||
city: json['city'] as String?,
|
||||
province: json['province'] as String?,
|
||||
nationalCode: json['national_code'] as String?,
|
||||
nationalId: json['national_id'] as String?,
|
||||
birthday: json['birthday'] as String?,
|
||||
image: json['image'] as String?,
|
||||
baseOrder: (json['base_order'] as num?)?.toInt(),
|
||||
role: (json['role'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AuthResponseModelToJson(_AuthResponseModel instance) =>
|
||||
<String, dynamic>{
|
||||
'access_token': instance.accessToken,
|
||||
'expires_in': instance.expiresIn,
|
||||
'scope': instance.scope,
|
||||
'expire_time': instance.expireTime,
|
||||
'mobile': instance.mobile,
|
||||
'fullname': instance.fullname,
|
||||
'firstname': instance.firstname,
|
||||
'lastname': instance.lastname,
|
||||
'city': instance.city,
|
||||
'province': instance.province,
|
||||
'national_code': instance.nationalCode,
|
||||
'national_id': instance.nationalId,
|
||||
'birthday': instance.birthday,
|
||||
'image': instance.image,
|
||||
'base_order': instance.baseOrder,
|
||||
'role': instance.role,
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'bar_information.freezed.dart';
|
||||
part 'bar_information.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class BarInformation with _$BarInformation {
|
||||
const factory BarInformation({
|
||||
int? totalBars,
|
||||
int? totalBarsQuantity,
|
||||
double? totalBarsWeight,
|
||||
int? totalEnteredBars,
|
||||
int? totalEnteredBarsQuantity,
|
||||
double? totalEnteredBarsWeight,
|
||||
int? totalNotEnteredBars,
|
||||
int? totalNotEnteredBarsQuantity,
|
||||
double? totalNotEnteredKillHouseRequestsWeight,
|
||||
int? totalRejectedBars,
|
||||
int? totalRejectedBarsQuantity,
|
||||
double? totalRejectedBarsWeight,
|
||||
}) = _BarInformation;
|
||||
|
||||
factory BarInformation.fromJson(Map<String, dynamic> json) =>
|
||||
_$BarInformationFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,310 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// 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 'bar_information.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$BarInformation {
|
||||
|
||||
int? get totalBars; int? get totalBarsQuantity; double? get totalBarsWeight; int? get totalEnteredBars; int? get totalEnteredBarsQuantity; double? get totalEnteredBarsWeight; int? get totalNotEnteredBars; int? get totalNotEnteredBarsQuantity; double? get totalNotEnteredKillHouseRequestsWeight; int? get totalRejectedBars; int? get totalRejectedBarsQuantity; double? get totalRejectedBarsWeight;
|
||||
/// Create a copy of BarInformation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$BarInformationCopyWith<BarInformation> get copyWith => _$BarInformationCopyWithImpl<BarInformation>(this as BarInformation, _$identity);
|
||||
|
||||
/// Serializes this BarInformation to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is BarInformation&&(identical(other.totalBars, totalBars) || other.totalBars == totalBars)&&(identical(other.totalBarsQuantity, totalBarsQuantity) || other.totalBarsQuantity == totalBarsQuantity)&&(identical(other.totalBarsWeight, totalBarsWeight) || other.totalBarsWeight == totalBarsWeight)&&(identical(other.totalEnteredBars, totalEnteredBars) || other.totalEnteredBars == totalEnteredBars)&&(identical(other.totalEnteredBarsQuantity, totalEnteredBarsQuantity) || other.totalEnteredBarsQuantity == totalEnteredBarsQuantity)&&(identical(other.totalEnteredBarsWeight, totalEnteredBarsWeight) || other.totalEnteredBarsWeight == totalEnteredBarsWeight)&&(identical(other.totalNotEnteredBars, totalNotEnteredBars) || other.totalNotEnteredBars == totalNotEnteredBars)&&(identical(other.totalNotEnteredBarsQuantity, totalNotEnteredBarsQuantity) || other.totalNotEnteredBarsQuantity == totalNotEnteredBarsQuantity)&&(identical(other.totalNotEnteredKillHouseRequestsWeight, totalNotEnteredKillHouseRequestsWeight) || other.totalNotEnteredKillHouseRequestsWeight == totalNotEnteredKillHouseRequestsWeight)&&(identical(other.totalRejectedBars, totalRejectedBars) || other.totalRejectedBars == totalRejectedBars)&&(identical(other.totalRejectedBarsQuantity, totalRejectedBarsQuantity) || other.totalRejectedBarsQuantity == totalRejectedBarsQuantity)&&(identical(other.totalRejectedBarsWeight, totalRejectedBarsWeight) || other.totalRejectedBarsWeight == totalRejectedBarsWeight));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,totalBars,totalBarsQuantity,totalBarsWeight,totalEnteredBars,totalEnteredBarsQuantity,totalEnteredBarsWeight,totalNotEnteredBars,totalNotEnteredBarsQuantity,totalNotEnteredKillHouseRequestsWeight,totalRejectedBars,totalRejectedBarsQuantity,totalRejectedBarsWeight);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BarInformation(totalBars: $totalBars, totalBarsQuantity: $totalBarsQuantity, totalBarsWeight: $totalBarsWeight, totalEnteredBars: $totalEnteredBars, totalEnteredBarsQuantity: $totalEnteredBarsQuantity, totalEnteredBarsWeight: $totalEnteredBarsWeight, totalNotEnteredBars: $totalNotEnteredBars, totalNotEnteredBarsQuantity: $totalNotEnteredBarsQuantity, totalNotEnteredKillHouseRequestsWeight: $totalNotEnteredKillHouseRequestsWeight, totalRejectedBars: $totalRejectedBars, totalRejectedBarsQuantity: $totalRejectedBarsQuantity, totalRejectedBarsWeight: $totalRejectedBarsWeight)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $BarInformationCopyWith<$Res> {
|
||||
factory $BarInformationCopyWith(BarInformation value, $Res Function(BarInformation) _then) = _$BarInformationCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int? totalBars, int? totalBarsQuantity, double? totalBarsWeight, int? totalEnteredBars, int? totalEnteredBarsQuantity, double? totalEnteredBarsWeight, int? totalNotEnteredBars, int? totalNotEnteredBarsQuantity, double? totalNotEnteredKillHouseRequestsWeight, int? totalRejectedBars, int? totalRejectedBarsQuantity, double? totalRejectedBarsWeight
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$BarInformationCopyWithImpl<$Res>
|
||||
implements $BarInformationCopyWith<$Res> {
|
||||
_$BarInformationCopyWithImpl(this._self, this._then);
|
||||
|
||||
final BarInformation _self;
|
||||
final $Res Function(BarInformation) _then;
|
||||
|
||||
/// Create a copy of BarInformation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? totalBars = freezed,Object? totalBarsQuantity = freezed,Object? totalBarsWeight = freezed,Object? totalEnteredBars = freezed,Object? totalEnteredBarsQuantity = freezed,Object? totalEnteredBarsWeight = freezed,Object? totalNotEnteredBars = freezed,Object? totalNotEnteredBarsQuantity = freezed,Object? totalNotEnteredKillHouseRequestsWeight = freezed,Object? totalRejectedBars = freezed,Object? totalRejectedBarsQuantity = freezed,Object? totalRejectedBarsWeight = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
totalBars: freezed == totalBars ? _self.totalBars : totalBars // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalBarsQuantity: freezed == totalBarsQuantity ? _self.totalBarsQuantity : totalBarsQuantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalBarsWeight: freezed == totalBarsWeight ? _self.totalBarsWeight : totalBarsWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalEnteredBars: freezed == totalEnteredBars ? _self.totalEnteredBars : totalEnteredBars // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalEnteredBarsQuantity: freezed == totalEnteredBarsQuantity ? _self.totalEnteredBarsQuantity : totalEnteredBarsQuantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalEnteredBarsWeight: freezed == totalEnteredBarsWeight ? _self.totalEnteredBarsWeight : totalEnteredBarsWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalNotEnteredBars: freezed == totalNotEnteredBars ? _self.totalNotEnteredBars : totalNotEnteredBars // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalNotEnteredBarsQuantity: freezed == totalNotEnteredBarsQuantity ? _self.totalNotEnteredBarsQuantity : totalNotEnteredBarsQuantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalNotEnteredKillHouseRequestsWeight: freezed == totalNotEnteredKillHouseRequestsWeight ? _self.totalNotEnteredKillHouseRequestsWeight : totalNotEnteredKillHouseRequestsWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalRejectedBars: freezed == totalRejectedBars ? _self.totalRejectedBars : totalRejectedBars // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalRejectedBarsQuantity: freezed == totalRejectedBarsQuantity ? _self.totalRejectedBarsQuantity : totalRejectedBarsQuantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalRejectedBarsWeight: freezed == totalRejectedBarsWeight ? _self.totalRejectedBarsWeight : totalRejectedBarsWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [BarInformation].
|
||||
extension BarInformationPatterns on BarInformation {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _BarInformation value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _BarInformation() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _BarInformation value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _BarInformation():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _BarInformation value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _BarInformation() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? totalBars, int? totalBarsQuantity, double? totalBarsWeight, int? totalEnteredBars, int? totalEnteredBarsQuantity, double? totalEnteredBarsWeight, int? totalNotEnteredBars, int? totalNotEnteredBarsQuantity, double? totalNotEnteredKillHouseRequestsWeight, int? totalRejectedBars, int? totalRejectedBarsQuantity, double? totalRejectedBarsWeight)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _BarInformation() when $default != null:
|
||||
return $default(_that.totalBars,_that.totalBarsQuantity,_that.totalBarsWeight,_that.totalEnteredBars,_that.totalEnteredBarsQuantity,_that.totalEnteredBarsWeight,_that.totalNotEnteredBars,_that.totalNotEnteredBarsQuantity,_that.totalNotEnteredKillHouseRequestsWeight,_that.totalRejectedBars,_that.totalRejectedBarsQuantity,_that.totalRejectedBarsWeight);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? totalBars, int? totalBarsQuantity, double? totalBarsWeight, int? totalEnteredBars, int? totalEnteredBarsQuantity, double? totalEnteredBarsWeight, int? totalNotEnteredBars, int? totalNotEnteredBarsQuantity, double? totalNotEnteredKillHouseRequestsWeight, int? totalRejectedBars, int? totalRejectedBarsQuantity, double? totalRejectedBarsWeight) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _BarInformation():
|
||||
return $default(_that.totalBars,_that.totalBarsQuantity,_that.totalBarsWeight,_that.totalEnteredBars,_that.totalEnteredBarsQuantity,_that.totalEnteredBarsWeight,_that.totalNotEnteredBars,_that.totalNotEnteredBarsQuantity,_that.totalNotEnteredKillHouseRequestsWeight,_that.totalRejectedBars,_that.totalRejectedBarsQuantity,_that.totalRejectedBarsWeight);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? totalBars, int? totalBarsQuantity, double? totalBarsWeight, int? totalEnteredBars, int? totalEnteredBarsQuantity, double? totalEnteredBarsWeight, int? totalNotEnteredBars, int? totalNotEnteredBarsQuantity, double? totalNotEnteredKillHouseRequestsWeight, int? totalRejectedBars, int? totalRejectedBarsQuantity, double? totalRejectedBarsWeight)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _BarInformation() when $default != null:
|
||||
return $default(_that.totalBars,_that.totalBarsQuantity,_that.totalBarsWeight,_that.totalEnteredBars,_that.totalEnteredBarsQuantity,_that.totalEnteredBarsWeight,_that.totalNotEnteredBars,_that.totalNotEnteredBarsQuantity,_that.totalNotEnteredKillHouseRequestsWeight,_that.totalRejectedBars,_that.totalRejectedBarsQuantity,_that.totalRejectedBarsWeight);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _BarInformation implements BarInformation {
|
||||
const _BarInformation({this.totalBars, this.totalBarsQuantity, this.totalBarsWeight, this.totalEnteredBars, this.totalEnteredBarsQuantity, this.totalEnteredBarsWeight, this.totalNotEnteredBars, this.totalNotEnteredBarsQuantity, this.totalNotEnteredKillHouseRequestsWeight, this.totalRejectedBars, this.totalRejectedBarsQuantity, this.totalRejectedBarsWeight});
|
||||
factory _BarInformation.fromJson(Map<String, dynamic> json) => _$BarInformationFromJson(json);
|
||||
|
||||
@override final int? totalBars;
|
||||
@override final int? totalBarsQuantity;
|
||||
@override final double? totalBarsWeight;
|
||||
@override final int? totalEnteredBars;
|
||||
@override final int? totalEnteredBarsQuantity;
|
||||
@override final double? totalEnteredBarsWeight;
|
||||
@override final int? totalNotEnteredBars;
|
||||
@override final int? totalNotEnteredBarsQuantity;
|
||||
@override final double? totalNotEnteredKillHouseRequestsWeight;
|
||||
@override final int? totalRejectedBars;
|
||||
@override final int? totalRejectedBarsQuantity;
|
||||
@override final double? totalRejectedBarsWeight;
|
||||
|
||||
/// Create a copy of BarInformation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$BarInformationCopyWith<_BarInformation> get copyWith => __$BarInformationCopyWithImpl<_BarInformation>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$BarInformationToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _BarInformation&&(identical(other.totalBars, totalBars) || other.totalBars == totalBars)&&(identical(other.totalBarsQuantity, totalBarsQuantity) || other.totalBarsQuantity == totalBarsQuantity)&&(identical(other.totalBarsWeight, totalBarsWeight) || other.totalBarsWeight == totalBarsWeight)&&(identical(other.totalEnteredBars, totalEnteredBars) || other.totalEnteredBars == totalEnteredBars)&&(identical(other.totalEnteredBarsQuantity, totalEnteredBarsQuantity) || other.totalEnteredBarsQuantity == totalEnteredBarsQuantity)&&(identical(other.totalEnteredBarsWeight, totalEnteredBarsWeight) || other.totalEnteredBarsWeight == totalEnteredBarsWeight)&&(identical(other.totalNotEnteredBars, totalNotEnteredBars) || other.totalNotEnteredBars == totalNotEnteredBars)&&(identical(other.totalNotEnteredBarsQuantity, totalNotEnteredBarsQuantity) || other.totalNotEnteredBarsQuantity == totalNotEnteredBarsQuantity)&&(identical(other.totalNotEnteredKillHouseRequestsWeight, totalNotEnteredKillHouseRequestsWeight) || other.totalNotEnteredKillHouseRequestsWeight == totalNotEnteredKillHouseRequestsWeight)&&(identical(other.totalRejectedBars, totalRejectedBars) || other.totalRejectedBars == totalRejectedBars)&&(identical(other.totalRejectedBarsQuantity, totalRejectedBarsQuantity) || other.totalRejectedBarsQuantity == totalRejectedBarsQuantity)&&(identical(other.totalRejectedBarsWeight, totalRejectedBarsWeight) || other.totalRejectedBarsWeight == totalRejectedBarsWeight));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,totalBars,totalBarsQuantity,totalBarsWeight,totalEnteredBars,totalEnteredBarsQuantity,totalEnteredBarsWeight,totalNotEnteredBars,totalNotEnteredBarsQuantity,totalNotEnteredKillHouseRequestsWeight,totalRejectedBars,totalRejectedBarsQuantity,totalRejectedBarsWeight);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BarInformation(totalBars: $totalBars, totalBarsQuantity: $totalBarsQuantity, totalBarsWeight: $totalBarsWeight, totalEnteredBars: $totalEnteredBars, totalEnteredBarsQuantity: $totalEnteredBarsQuantity, totalEnteredBarsWeight: $totalEnteredBarsWeight, totalNotEnteredBars: $totalNotEnteredBars, totalNotEnteredBarsQuantity: $totalNotEnteredBarsQuantity, totalNotEnteredKillHouseRequestsWeight: $totalNotEnteredKillHouseRequestsWeight, totalRejectedBars: $totalRejectedBars, totalRejectedBarsQuantity: $totalRejectedBarsQuantity, totalRejectedBarsWeight: $totalRejectedBarsWeight)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$BarInformationCopyWith<$Res> implements $BarInformationCopyWith<$Res> {
|
||||
factory _$BarInformationCopyWith(_BarInformation value, $Res Function(_BarInformation) _then) = __$BarInformationCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int? totalBars, int? totalBarsQuantity, double? totalBarsWeight, int? totalEnteredBars, int? totalEnteredBarsQuantity, double? totalEnteredBarsWeight, int? totalNotEnteredBars, int? totalNotEnteredBarsQuantity, double? totalNotEnteredKillHouseRequestsWeight, int? totalRejectedBars, int? totalRejectedBarsQuantity, double? totalRejectedBarsWeight
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$BarInformationCopyWithImpl<$Res>
|
||||
implements _$BarInformationCopyWith<$Res> {
|
||||
__$BarInformationCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _BarInformation _self;
|
||||
final $Res Function(_BarInformation) _then;
|
||||
|
||||
/// Create a copy of BarInformation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? totalBars = freezed,Object? totalBarsQuantity = freezed,Object? totalBarsWeight = freezed,Object? totalEnteredBars = freezed,Object? totalEnteredBarsQuantity = freezed,Object? totalEnteredBarsWeight = freezed,Object? totalNotEnteredBars = freezed,Object? totalNotEnteredBarsQuantity = freezed,Object? totalNotEnteredKillHouseRequestsWeight = freezed,Object? totalRejectedBars = freezed,Object? totalRejectedBarsQuantity = freezed,Object? totalRejectedBarsWeight = freezed,}) {
|
||||
return _then(_BarInformation(
|
||||
totalBars: freezed == totalBars ? _self.totalBars : totalBars // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalBarsQuantity: freezed == totalBarsQuantity ? _self.totalBarsQuantity : totalBarsQuantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalBarsWeight: freezed == totalBarsWeight ? _self.totalBarsWeight : totalBarsWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalEnteredBars: freezed == totalEnteredBars ? _self.totalEnteredBars : totalEnteredBars // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalEnteredBarsQuantity: freezed == totalEnteredBarsQuantity ? _self.totalEnteredBarsQuantity : totalEnteredBarsQuantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalEnteredBarsWeight: freezed == totalEnteredBarsWeight ? _self.totalEnteredBarsWeight : totalEnteredBarsWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalNotEnteredBars: freezed == totalNotEnteredBars ? _self.totalNotEnteredBars : totalNotEnteredBars // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalNotEnteredBarsQuantity: freezed == totalNotEnteredBarsQuantity ? _self.totalNotEnteredBarsQuantity : totalNotEnteredBarsQuantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalNotEnteredKillHouseRequestsWeight: freezed == totalNotEnteredKillHouseRequestsWeight ? _self.totalNotEnteredKillHouseRequestsWeight : totalNotEnteredKillHouseRequestsWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalRejectedBars: freezed == totalRejectedBars ? _self.totalRejectedBars : totalRejectedBars // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalRejectedBarsQuantity: freezed == totalRejectedBarsQuantity ? _self.totalRejectedBarsQuantity : totalRejectedBarsQuantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalRejectedBarsWeight: freezed == totalRejectedBarsWeight ? _self.totalRejectedBarsWeight : totalRejectedBarsWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,47 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'bar_information.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_BarInformation _$BarInformationFromJson(Map<String, dynamic> json) =>
|
||||
_BarInformation(
|
||||
totalBars: (json['total_bars'] as num?)?.toInt(),
|
||||
totalBarsQuantity: (json['total_bars_quantity'] as num?)?.toInt(),
|
||||
totalBarsWeight: (json['total_bars_weight'] as num?)?.toDouble(),
|
||||
totalEnteredBars: (json['total_entered_bars'] as num?)?.toInt(),
|
||||
totalEnteredBarsQuantity: (json['total_entered_bars_quantity'] as num?)
|
||||
?.toInt(),
|
||||
totalEnteredBarsWeight: (json['total_entered_bars_weight'] as num?)
|
||||
?.toDouble(),
|
||||
totalNotEnteredBars: (json['total_not_entered_bars'] as num?)?.toInt(),
|
||||
totalNotEnteredBarsQuantity:
|
||||
(json['total_not_entered_bars_quantity'] as num?)?.toInt(),
|
||||
totalNotEnteredKillHouseRequestsWeight:
|
||||
(json['total_not_entered_kill_house_requests_weight'] as num?)
|
||||
?.toDouble(),
|
||||
totalRejectedBars: (json['total_rejected_bars'] as num?)?.toInt(),
|
||||
totalRejectedBarsQuantity: (json['total_rejected_bars_quantity'] as num?)
|
||||
?.toInt(),
|
||||
totalRejectedBarsWeight: (json['total_rejected_bars_weight'] as num?)
|
||||
?.toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$BarInformationToJson(_BarInformation instance) =>
|
||||
<String, dynamic>{
|
||||
'total_bars': instance.totalBars,
|
||||
'total_bars_quantity': instance.totalBarsQuantity,
|
||||
'total_bars_weight': instance.totalBarsWeight,
|
||||
'total_entered_bars': instance.totalEnteredBars,
|
||||
'total_entered_bars_quantity': instance.totalEnteredBarsQuantity,
|
||||
'total_entered_bars_weight': instance.totalEnteredBarsWeight,
|
||||
'total_not_entered_bars': instance.totalNotEnteredBars,
|
||||
'total_not_entered_bars_quantity': instance.totalNotEnteredBarsQuantity,
|
||||
'total_not_entered_kill_house_requests_weight':
|
||||
instance.totalNotEnteredKillHouseRequestsWeight,
|
||||
'total_rejected_bars': instance.totalRejectedBars,
|
||||
'total_rejected_bars_quantity': instance.totalRejectedBarsQuantity,
|
||||
'total_rejected_bars_weight': instance.totalRejectedBarsWeight,
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'broadcast_price.freezed.dart';
|
||||
part 'broadcast_price.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class BroadcastPrice with _$BroadcastPrice {
|
||||
const factory BroadcastPrice({
|
||||
bool? active,
|
||||
int? killHousePrice,
|
||||
int? stewardPrice,
|
||||
int? guildPrice,
|
||||
}) = _BroadcastPrice;
|
||||
|
||||
factory BroadcastPrice.fromJson(Map<String, dynamic> json) => _$BroadcastPriceFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,286 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// 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 'broadcast_price.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$BroadcastPrice {
|
||||
|
||||
bool? get active; int? get killHousePrice; int? get stewardPrice; int? get guildPrice;
|
||||
/// Create a copy of BroadcastPrice
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$BroadcastPriceCopyWith<BroadcastPrice> get copyWith => _$BroadcastPriceCopyWithImpl<BroadcastPrice>(this as BroadcastPrice, _$identity);
|
||||
|
||||
/// Serializes this BroadcastPrice to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is BroadcastPrice&&(identical(other.active, active) || other.active == active)&&(identical(other.killHousePrice, killHousePrice) || other.killHousePrice == killHousePrice)&&(identical(other.stewardPrice, stewardPrice) || other.stewardPrice == stewardPrice)&&(identical(other.guildPrice, guildPrice) || other.guildPrice == guildPrice));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,active,killHousePrice,stewardPrice,guildPrice);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BroadcastPrice(active: $active, killHousePrice: $killHousePrice, stewardPrice: $stewardPrice, guildPrice: $guildPrice)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $BroadcastPriceCopyWith<$Res> {
|
||||
factory $BroadcastPriceCopyWith(BroadcastPrice value, $Res Function(BroadcastPrice) _then) = _$BroadcastPriceCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
bool? active, int? killHousePrice, int? stewardPrice, int? guildPrice
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$BroadcastPriceCopyWithImpl<$Res>
|
||||
implements $BroadcastPriceCopyWith<$Res> {
|
||||
_$BroadcastPriceCopyWithImpl(this._self, this._then);
|
||||
|
||||
final BroadcastPrice _self;
|
||||
final $Res Function(BroadcastPrice) _then;
|
||||
|
||||
/// Create a copy of BroadcastPrice
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? active = freezed,Object? killHousePrice = freezed,Object? stewardPrice = freezed,Object? guildPrice = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
active: freezed == active ? _self.active : active // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,killHousePrice: freezed == killHousePrice ? _self.killHousePrice : killHousePrice // ignore: cast_nullable_to_non_nullable
|
||||
as int?,stewardPrice: freezed == stewardPrice ? _self.stewardPrice : stewardPrice // ignore: cast_nullable_to_non_nullable
|
||||
as int?,guildPrice: freezed == guildPrice ? _self.guildPrice : guildPrice // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [BroadcastPrice].
|
||||
extension BroadcastPricePatterns on BroadcastPrice {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _BroadcastPrice value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _BroadcastPrice() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _BroadcastPrice value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _BroadcastPrice():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _BroadcastPrice value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _BroadcastPrice() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool? active, int? killHousePrice, int? stewardPrice, int? guildPrice)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _BroadcastPrice() when $default != null:
|
||||
return $default(_that.active,_that.killHousePrice,_that.stewardPrice,_that.guildPrice);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool? active, int? killHousePrice, int? stewardPrice, int? guildPrice) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _BroadcastPrice():
|
||||
return $default(_that.active,_that.killHousePrice,_that.stewardPrice,_that.guildPrice);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool? active, int? killHousePrice, int? stewardPrice, int? guildPrice)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _BroadcastPrice() when $default != null:
|
||||
return $default(_that.active,_that.killHousePrice,_that.stewardPrice,_that.guildPrice);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _BroadcastPrice implements BroadcastPrice {
|
||||
const _BroadcastPrice({this.active, this.killHousePrice, this.stewardPrice, this.guildPrice});
|
||||
factory _BroadcastPrice.fromJson(Map<String, dynamic> json) => _$BroadcastPriceFromJson(json);
|
||||
|
||||
@override final bool? active;
|
||||
@override final int? killHousePrice;
|
||||
@override final int? stewardPrice;
|
||||
@override final int? guildPrice;
|
||||
|
||||
/// Create a copy of BroadcastPrice
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$BroadcastPriceCopyWith<_BroadcastPrice> get copyWith => __$BroadcastPriceCopyWithImpl<_BroadcastPrice>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$BroadcastPriceToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _BroadcastPrice&&(identical(other.active, active) || other.active == active)&&(identical(other.killHousePrice, killHousePrice) || other.killHousePrice == killHousePrice)&&(identical(other.stewardPrice, stewardPrice) || other.stewardPrice == stewardPrice)&&(identical(other.guildPrice, guildPrice) || other.guildPrice == guildPrice));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,active,killHousePrice,stewardPrice,guildPrice);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BroadcastPrice(active: $active, killHousePrice: $killHousePrice, stewardPrice: $stewardPrice, guildPrice: $guildPrice)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$BroadcastPriceCopyWith<$Res> implements $BroadcastPriceCopyWith<$Res> {
|
||||
factory _$BroadcastPriceCopyWith(_BroadcastPrice value, $Res Function(_BroadcastPrice) _then) = __$BroadcastPriceCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
bool? active, int? killHousePrice, int? stewardPrice, int? guildPrice
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$BroadcastPriceCopyWithImpl<$Res>
|
||||
implements _$BroadcastPriceCopyWith<$Res> {
|
||||
__$BroadcastPriceCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _BroadcastPrice _self;
|
||||
final $Res Function(_BroadcastPrice) _then;
|
||||
|
||||
/// Create a copy of BroadcastPrice
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? active = freezed,Object? killHousePrice = freezed,Object? stewardPrice = freezed,Object? guildPrice = freezed,}) {
|
||||
return _then(_BroadcastPrice(
|
||||
active: freezed == active ? _self.active : active // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,killHousePrice: freezed == killHousePrice ? _self.killHousePrice : killHousePrice // ignore: cast_nullable_to_non_nullable
|
||||
as int?,stewardPrice: freezed == stewardPrice ? _self.stewardPrice : stewardPrice // ignore: cast_nullable_to_non_nullable
|
||||
as int?,guildPrice: freezed == guildPrice ? _self.guildPrice : guildPrice // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,23 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'broadcast_price.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_BroadcastPrice _$BroadcastPriceFromJson(Map<String, dynamic> json) =>
|
||||
_BroadcastPrice(
|
||||
active: json['active'] as bool?,
|
||||
killHousePrice: (json['kill_house_price'] as num?)?.toInt(),
|
||||
stewardPrice: (json['steward_price'] as num?)?.toInt(),
|
||||
guildPrice: (json['guild_price'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$BroadcastPriceToJson(_BroadcastPrice instance) =>
|
||||
<String, dynamic>{
|
||||
'active': instance.active,
|
||||
'kill_house_price': instance.killHousePrice,
|
||||
'steward_price': instance.stewardPrice,
|
||||
'guild_price': instance.guildPrice,
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'captcha_response_model.freezed.dart';
|
||||
part 'captcha_response_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class CaptchaResponseModel with _$CaptchaResponseModel {
|
||||
const factory CaptchaResponseModel({
|
||||
String? captchaKey,
|
||||
String? captchaImage,
|
||||
String? imageType,
|
||||
String? imageDecode,
|
||||
}) = _CaptchaResponseModel;
|
||||
|
||||
factory CaptchaResponseModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$CaptchaResponseModelFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,286 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// 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 'captcha_response_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$CaptchaResponseModel {
|
||||
|
||||
String? get captchaKey; String? get captchaImage; String? get imageType; String? get imageDecode;
|
||||
/// Create a copy of CaptchaResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$CaptchaResponseModelCopyWith<CaptchaResponseModel> get copyWith => _$CaptchaResponseModelCopyWithImpl<CaptchaResponseModel>(this as CaptchaResponseModel, _$identity);
|
||||
|
||||
/// Serializes this CaptchaResponseModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is CaptchaResponseModel&&(identical(other.captchaKey, captchaKey) || other.captchaKey == captchaKey)&&(identical(other.captchaImage, captchaImage) || other.captchaImage == captchaImage)&&(identical(other.imageType, imageType) || other.imageType == imageType)&&(identical(other.imageDecode, imageDecode) || other.imageDecode == imageDecode));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,captchaKey,captchaImage,imageType,imageDecode);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CaptchaResponseModel(captchaKey: $captchaKey, captchaImage: $captchaImage, imageType: $imageType, imageDecode: $imageDecode)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $CaptchaResponseModelCopyWith<$Res> {
|
||||
factory $CaptchaResponseModelCopyWith(CaptchaResponseModel value, $Res Function(CaptchaResponseModel) _then) = _$CaptchaResponseModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? captchaKey, String? captchaImage, String? imageType, String? imageDecode
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$CaptchaResponseModelCopyWithImpl<$Res>
|
||||
implements $CaptchaResponseModelCopyWith<$Res> {
|
||||
_$CaptchaResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final CaptchaResponseModel _self;
|
||||
final $Res Function(CaptchaResponseModel) _then;
|
||||
|
||||
/// Create a copy of CaptchaResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? captchaKey = freezed,Object? captchaImage = freezed,Object? imageType = freezed,Object? imageDecode = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
captchaKey: freezed == captchaKey ? _self.captchaKey : captchaKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,captchaImage: freezed == captchaImage ? _self.captchaImage : captchaImage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,imageType: freezed == imageType ? _self.imageType : imageType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,imageDecode: freezed == imageDecode ? _self.imageDecode : imageDecode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [CaptchaResponseModel].
|
||||
extension CaptchaResponseModelPatterns on CaptchaResponseModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _CaptchaResponseModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _CaptchaResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _CaptchaResponseModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _CaptchaResponseModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _CaptchaResponseModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _CaptchaResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? captchaKey, String? captchaImage, String? imageType, String? imageDecode)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CaptchaResponseModel() when $default != null:
|
||||
return $default(_that.captchaKey,_that.captchaImage,_that.imageType,_that.imageDecode);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? captchaKey, String? captchaImage, String? imageType, String? imageDecode) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CaptchaResponseModel():
|
||||
return $default(_that.captchaKey,_that.captchaImage,_that.imageType,_that.imageDecode);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? captchaKey, String? captchaImage, String? imageType, String? imageDecode)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CaptchaResponseModel() when $default != null:
|
||||
return $default(_that.captchaKey,_that.captchaImage,_that.imageType,_that.imageDecode);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _CaptchaResponseModel implements CaptchaResponseModel {
|
||||
const _CaptchaResponseModel({this.captchaKey, this.captchaImage, this.imageType, this.imageDecode});
|
||||
factory _CaptchaResponseModel.fromJson(Map<String, dynamic> json) => _$CaptchaResponseModelFromJson(json);
|
||||
|
||||
@override final String? captchaKey;
|
||||
@override final String? captchaImage;
|
||||
@override final String? imageType;
|
||||
@override final String? imageDecode;
|
||||
|
||||
/// Create a copy of CaptchaResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$CaptchaResponseModelCopyWith<_CaptchaResponseModel> get copyWith => __$CaptchaResponseModelCopyWithImpl<_CaptchaResponseModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$CaptchaResponseModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CaptchaResponseModel&&(identical(other.captchaKey, captchaKey) || other.captchaKey == captchaKey)&&(identical(other.captchaImage, captchaImage) || other.captchaImage == captchaImage)&&(identical(other.imageType, imageType) || other.imageType == imageType)&&(identical(other.imageDecode, imageDecode) || other.imageDecode == imageDecode));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,captchaKey,captchaImage,imageType,imageDecode);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CaptchaResponseModel(captchaKey: $captchaKey, captchaImage: $captchaImage, imageType: $imageType, imageDecode: $imageDecode)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$CaptchaResponseModelCopyWith<$Res> implements $CaptchaResponseModelCopyWith<$Res> {
|
||||
factory _$CaptchaResponseModelCopyWith(_CaptchaResponseModel value, $Res Function(_CaptchaResponseModel) _then) = __$CaptchaResponseModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? captchaKey, String? captchaImage, String? imageType, String? imageDecode
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$CaptchaResponseModelCopyWithImpl<$Res>
|
||||
implements _$CaptchaResponseModelCopyWith<$Res> {
|
||||
__$CaptchaResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _CaptchaResponseModel _self;
|
||||
final $Res Function(_CaptchaResponseModel) _then;
|
||||
|
||||
/// Create a copy of CaptchaResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? captchaKey = freezed,Object? captchaImage = freezed,Object? imageType = freezed,Object? imageDecode = freezed,}) {
|
||||
return _then(_CaptchaResponseModel(
|
||||
captchaKey: freezed == captchaKey ? _self.captchaKey : captchaKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,captchaImage: freezed == captchaImage ? _self.captchaImage : captchaImage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,imageType: freezed == imageType ? _self.imageType : imageType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,imageDecode: freezed == imageDecode ? _self.imageDecode : imageDecode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,25 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'captcha_response_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_CaptchaResponseModel _$CaptchaResponseModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _CaptchaResponseModel(
|
||||
captchaKey: json['captcha_key'] as String?,
|
||||
captchaImage: json['captcha_image'] as String?,
|
||||
imageType: json['image_type'] as String?,
|
||||
imageDecode: json['image_decode'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CaptchaResponseModelToJson(
|
||||
_CaptchaResponseModel instance,
|
||||
) => <String, dynamic>{
|
||||
'captcha_key': instance.captchaKey,
|
||||
'captcha_image': instance.captchaImage,
|
||||
'image_type': instance.imageType,
|
||||
'image_decode': instance.imageDecode,
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'guild_model.freezed.dart';
|
||||
part 'guild_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class GuildModel with _$GuildModel {
|
||||
const factory GuildModel({
|
||||
String? key,
|
||||
String? guildsName,
|
||||
bool? steward,
|
||||
User? user,
|
||||
}) = _GuildModel;
|
||||
|
||||
factory GuildModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$GuildModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class User with _$User {
|
||||
const factory User({
|
||||
String? fullname,
|
||||
String? mobile,
|
||||
String? city,
|
||||
}) = _User;
|
||||
|
||||
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,579 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// 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 'guild_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$GuildModel {
|
||||
|
||||
String? get key; String? get guildsName; bool? get steward; User? get user;
|
||||
/// Create a copy of GuildModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$GuildModelCopyWith<GuildModel> get copyWith => _$GuildModelCopyWithImpl<GuildModel>(this as GuildModel, _$identity);
|
||||
|
||||
/// Serializes this GuildModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is GuildModel&&(identical(other.key, key) || other.key == key)&&(identical(other.guildsName, guildsName) || other.guildsName == guildsName)&&(identical(other.steward, steward) || other.steward == steward)&&(identical(other.user, user) || other.user == user));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,key,guildsName,steward,user);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'GuildModel(key: $key, guildsName: $guildsName, steward: $steward, user: $user)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $GuildModelCopyWith<$Res> {
|
||||
factory $GuildModelCopyWith(GuildModel value, $Res Function(GuildModel) _then) = _$GuildModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? key, String? guildsName, bool? steward, User? user
|
||||
});
|
||||
|
||||
|
||||
$UserCopyWith<$Res>? get user;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$GuildModelCopyWithImpl<$Res>
|
||||
implements $GuildModelCopyWith<$Res> {
|
||||
_$GuildModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final GuildModel _self;
|
||||
final $Res Function(GuildModel) _then;
|
||||
|
||||
/// Create a copy of GuildModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? guildsName = freezed,Object? steward = freezed,Object? user = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,guildsName: freezed == guildsName ? _self.guildsName : guildsName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,steward: freezed == steward ? _self.steward : steward // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
|
||||
as User?,
|
||||
));
|
||||
}
|
||||
/// Create a copy of GuildModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$UserCopyWith<$Res>? get user {
|
||||
if (_self.user == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $UserCopyWith<$Res>(_self.user!, (value) {
|
||||
return _then(_self.copyWith(user: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [GuildModel].
|
||||
extension GuildModelPatterns on GuildModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _GuildModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GuildModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _GuildModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GuildModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _GuildModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _GuildModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? key, String? guildsName, bool? steward, User? user)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GuildModel() when $default != null:
|
||||
return $default(_that.key,_that.guildsName,_that.steward,_that.user);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? key, String? guildsName, bool? steward, User? user) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GuildModel():
|
||||
return $default(_that.key,_that.guildsName,_that.steward,_that.user);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? key, String? guildsName, bool? steward, User? user)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _GuildModel() when $default != null:
|
||||
return $default(_that.key,_that.guildsName,_that.steward,_that.user);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _GuildModel implements GuildModel {
|
||||
const _GuildModel({this.key, this.guildsName, this.steward, this.user});
|
||||
factory _GuildModel.fromJson(Map<String, dynamic> json) => _$GuildModelFromJson(json);
|
||||
|
||||
@override final String? key;
|
||||
@override final String? guildsName;
|
||||
@override final bool? steward;
|
||||
@override final User? user;
|
||||
|
||||
/// Create a copy of GuildModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$GuildModelCopyWith<_GuildModel> get copyWith => __$GuildModelCopyWithImpl<_GuildModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$GuildModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GuildModel&&(identical(other.key, key) || other.key == key)&&(identical(other.guildsName, guildsName) || other.guildsName == guildsName)&&(identical(other.steward, steward) || other.steward == steward)&&(identical(other.user, user) || other.user == user));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,key,guildsName,steward,user);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'GuildModel(key: $key, guildsName: $guildsName, steward: $steward, user: $user)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$GuildModelCopyWith<$Res> implements $GuildModelCopyWith<$Res> {
|
||||
factory _$GuildModelCopyWith(_GuildModel value, $Res Function(_GuildModel) _then) = __$GuildModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? key, String? guildsName, bool? steward, User? user
|
||||
});
|
||||
|
||||
|
||||
@override $UserCopyWith<$Res>? get user;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$GuildModelCopyWithImpl<$Res>
|
||||
implements _$GuildModelCopyWith<$Res> {
|
||||
__$GuildModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _GuildModel _self;
|
||||
final $Res Function(_GuildModel) _then;
|
||||
|
||||
/// Create a copy of GuildModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? guildsName = freezed,Object? steward = freezed,Object? user = freezed,}) {
|
||||
return _then(_GuildModel(
|
||||
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,guildsName: freezed == guildsName ? _self.guildsName : guildsName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,steward: freezed == steward ? _self.steward : steward // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
|
||||
as User?,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of GuildModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$UserCopyWith<$Res>? get user {
|
||||
if (_self.user == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $UserCopyWith<$Res>(_self.user!, (value) {
|
||||
return _then(_self.copyWith(user: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$User {
|
||||
|
||||
String? get fullname; String? get mobile; String? get city;
|
||||
/// Create a copy of User
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$UserCopyWith<User> get copyWith => _$UserCopyWithImpl<User>(this as User, _$identity);
|
||||
|
||||
/// Serializes this User to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is User&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.city, city) || other.city == city));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,fullname,mobile,city);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'User(fullname: $fullname, mobile: $mobile, city: $city)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $UserCopyWith<$Res> {
|
||||
factory $UserCopyWith(User value, $Res Function(User) _then) = _$UserCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? fullname, String? mobile, String? city
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$UserCopyWithImpl<$Res>
|
||||
implements $UserCopyWith<$Res> {
|
||||
_$UserCopyWithImpl(this._self, this._then);
|
||||
|
||||
final User _self;
|
||||
final $Res Function(User) _then;
|
||||
|
||||
/// Create a copy of User
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? fullname = freezed,Object? mobile = freezed,Object? city = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [User].
|
||||
extension UserPatterns on User {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _User value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _User() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _User value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _User():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _User value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _User() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? fullname, String? mobile, String? city)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _User() when $default != null:
|
||||
return $default(_that.fullname,_that.mobile,_that.city);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? fullname, String? mobile, String? city) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _User():
|
||||
return $default(_that.fullname,_that.mobile,_that.city);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? fullname, String? mobile, String? city)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _User() when $default != null:
|
||||
return $default(_that.fullname,_that.mobile,_that.city);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _User implements User {
|
||||
const _User({this.fullname, this.mobile, this.city});
|
||||
factory _User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
|
||||
|
||||
@override final String? fullname;
|
||||
@override final String? mobile;
|
||||
@override final String? city;
|
||||
|
||||
/// Create a copy of User
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$UserCopyWith<_User> get copyWith => __$UserCopyWithImpl<_User>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$UserToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _User&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.city, city) || other.city == city));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,fullname,mobile,city);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'User(fullname: $fullname, mobile: $mobile, city: $city)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$UserCopyWith<$Res> implements $UserCopyWith<$Res> {
|
||||
factory _$UserCopyWith(_User value, $Res Function(_User) _then) = __$UserCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? fullname, String? mobile, String? city
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$UserCopyWithImpl<$Res>
|
||||
implements _$UserCopyWith<$Res> {
|
||||
__$UserCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _User _self;
|
||||
final $Res Function(_User) _then;
|
||||
|
||||
/// Create a copy of User
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? fullname = freezed,Object? mobile = freezed,Object? city = freezed,}) {
|
||||
return _then(_User(
|
||||
fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,36 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'guild_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_GuildModel _$GuildModelFromJson(Map<String, dynamic> json) => _GuildModel(
|
||||
key: json['key'] as String?,
|
||||
guildsName: json['guilds_name'] as String?,
|
||||
steward: json['steward'] as bool?,
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: User.fromJson(json['user'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GuildModelToJson(_GuildModel instance) =>
|
||||
<String, dynamic>{
|
||||
'key': instance.key,
|
||||
'guilds_name': instance.guildsName,
|
||||
'steward': instance.steward,
|
||||
'user': instance.user,
|
||||
};
|
||||
|
||||
_User _$UserFromJson(Map<String, dynamic> json) => _User(
|
||||
fullname: json['fullname'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
city: json['city'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserToJson(_User instance) => <String, dynamic>{
|
||||
'fullname': instance.fullname,
|
||||
'mobile': instance.mobile,
|
||||
'city': instance.city,
|
||||
};
|
||||
@@ -0,0 +1,160 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'guild_profile.freezed.dart';
|
||||
part 'guild_profile.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class GuildProfile with _$GuildProfile {
|
||||
const factory GuildProfile({
|
||||
int? id,
|
||||
User? user,
|
||||
Address? address,
|
||||
GuildAreaActivity? guild_area_activity,
|
||||
GuildTypeActivity? guild_type_activity,
|
||||
List<dynamic>? kill_house,
|
||||
List<dynamic>? steward_kill_house,
|
||||
List<dynamic>? stewards,
|
||||
GetPosStatus? get_pos_status,
|
||||
String? key,
|
||||
String? create_date,
|
||||
String? modify_date,
|
||||
bool? trash,
|
||||
String? user_id_foreign_key,
|
||||
String? address_id_foreign_key,
|
||||
String? user_bank_id_foreign_key,
|
||||
String? wallet_id_foreign_key,
|
||||
String? provincial_government_id_key,
|
||||
dynamic identity_documents,
|
||||
bool? active,
|
||||
int? city_number,
|
||||
String? city_name,
|
||||
String? guilds_id,
|
||||
String? license_number,
|
||||
String? guilds_name,
|
||||
String? phone,
|
||||
String? type_activity,
|
||||
String? area_activity,
|
||||
int? province_number,
|
||||
String? province_name,
|
||||
bool? steward,
|
||||
bool? has_pos,
|
||||
dynamic centers_allocation,
|
||||
dynamic kill_house_centers_allocation,
|
||||
dynamic allocation_limit,
|
||||
bool? limitation_allocation,
|
||||
String? registerar_role,
|
||||
String? registerar_fullname,
|
||||
String? registerar_mobile,
|
||||
bool? kill_house_register,
|
||||
bool? steward_register,
|
||||
bool? guilds_room_register,
|
||||
bool? pos_company_register,
|
||||
String? province_accept_state,
|
||||
String? province_message,
|
||||
String? condition,
|
||||
String? description_condition,
|
||||
bool? steward_active,
|
||||
dynamic steward_allocation_limit,
|
||||
bool? steward_limitation_allocation,
|
||||
bool? license,
|
||||
dynamic license_form,
|
||||
dynamic license_file,
|
||||
String? reviewer_role,
|
||||
String? reviewer_fullname,
|
||||
String? reviewer_mobile,
|
||||
String? checker_message,
|
||||
bool? final_accept,
|
||||
bool? temporary_registration,
|
||||
String? created_by,
|
||||
String? modified_by,
|
||||
dynamic user_bank_info,
|
||||
int? wallet,
|
||||
List<dynamic>? cars,
|
||||
List<dynamic>? user_level,
|
||||
}) = _GuildProfile;
|
||||
|
||||
factory GuildProfile.fromJson(Map<String, dynamic> json) =>
|
||||
_$GuildProfileFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class User with _$User {
|
||||
const factory User({
|
||||
String? fullname,
|
||||
String? first_name,
|
||||
String? last_name,
|
||||
String? mobile,
|
||||
String? national_id,
|
||||
String? city,
|
||||
}) = _User;
|
||||
|
||||
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Address with _$Address {
|
||||
const factory Address({
|
||||
Province? province,
|
||||
City? city,
|
||||
String? address,
|
||||
String? postal_code,
|
||||
}) = _Address;
|
||||
|
||||
factory Address.fromJson(Map<String, dynamic> json) =>
|
||||
_$AddressFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Province with _$Province {
|
||||
const factory Province({
|
||||
String? key,
|
||||
String? name,
|
||||
}) = _Province;
|
||||
|
||||
factory Province.fromJson(Map<String, dynamic> json) =>
|
||||
_$ProvinceFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class City with _$City {
|
||||
const factory City({
|
||||
String? key,
|
||||
String? name,
|
||||
}) = _City;
|
||||
|
||||
factory City.fromJson(Map<String, dynamic> json) => _$CityFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class GuildAreaActivity with _$GuildAreaActivity {
|
||||
const factory GuildAreaActivity({
|
||||
String? key,
|
||||
String? title,
|
||||
}) = _GuildAreaActivity;
|
||||
|
||||
factory GuildAreaActivity.fromJson(Map<String, dynamic> json) =>
|
||||
_$GuildAreaActivityFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class GuildTypeActivity with _$GuildTypeActivity {
|
||||
const factory GuildTypeActivity({
|
||||
String? key,
|
||||
String? title,
|
||||
}) = _GuildTypeActivity;
|
||||
|
||||
factory GuildTypeActivity.fromJson(Map<String, dynamic> json) =>
|
||||
_$GuildTypeActivityFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class GetPosStatus with _$GetPosStatus {
|
||||
const factory GetPosStatus({
|
||||
int? len_active_sessions,
|
||||
bool? has_pons,
|
||||
bool? has_active_pons,
|
||||
}) = _GetPosStatus;
|
||||
|
||||
factory GetPosStatus.fromJson(Map<String, dynamic> json) =>
|
||||
_$GetPosStatusFromJson(json);
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,244 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'guild_profile.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_GuildProfile _$GuildProfileFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _GuildProfile(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: User.fromJson(json['user'] as Map<String, dynamic>),
|
||||
address: json['address'] == null
|
||||
? null
|
||||
: Address.fromJson(json['address'] as Map<String, dynamic>),
|
||||
guild_area_activity: json['guild_area_activity'] == null
|
||||
? null
|
||||
: GuildAreaActivity.fromJson(
|
||||
json['guild_area_activity'] as Map<String, dynamic>,
|
||||
),
|
||||
guild_type_activity: json['guild_type_activity'] == null
|
||||
? null
|
||||
: GuildTypeActivity.fromJson(
|
||||
json['guild_type_activity'] as Map<String, dynamic>,
|
||||
),
|
||||
kill_house: json['kill_house'] as List<dynamic>?,
|
||||
steward_kill_house: json['steward_kill_house'] as List<dynamic>?,
|
||||
stewards: json['stewards'] as List<dynamic>?,
|
||||
get_pos_status: json['get_pos_status'] == null
|
||||
? null
|
||||
: GetPosStatus.fromJson(json['get_pos_status'] as Map<String, dynamic>),
|
||||
key: json['key'] as String?,
|
||||
create_date: json['create_date'] as String?,
|
||||
modify_date: json['modify_date'] as String?,
|
||||
trash: json['trash'] as bool?,
|
||||
user_id_foreign_key: json['user_id_foreign_key'] as String?,
|
||||
address_id_foreign_key: json['address_id_foreign_key'] as String?,
|
||||
user_bank_id_foreign_key: json['user_bank_id_foreign_key'] as String?,
|
||||
wallet_id_foreign_key: json['wallet_id_foreign_key'] as String?,
|
||||
provincial_government_id_key: json['provincial_government_id_key'] as String?,
|
||||
identity_documents: json['identity_documents'],
|
||||
active: json['active'] as bool?,
|
||||
city_number: (json['city_number'] as num?)?.toInt(),
|
||||
city_name: json['city_name'] as String?,
|
||||
guilds_id: json['guilds_id'] as String?,
|
||||
license_number: json['license_number'] as String?,
|
||||
guilds_name: json['guilds_name'] as String?,
|
||||
phone: json['phone'] as String?,
|
||||
type_activity: json['type_activity'] as String?,
|
||||
area_activity: json['area_activity'] as String?,
|
||||
province_number: (json['province_number'] as num?)?.toInt(),
|
||||
province_name: json['province_name'] as String?,
|
||||
steward: json['steward'] as bool?,
|
||||
has_pos: json['has_pos'] as bool?,
|
||||
centers_allocation: json['centers_allocation'],
|
||||
kill_house_centers_allocation: json['kill_house_centers_allocation'],
|
||||
allocation_limit: json['allocation_limit'],
|
||||
limitation_allocation: json['limitation_allocation'] as bool?,
|
||||
registerar_role: json['registerar_role'] as String?,
|
||||
registerar_fullname: json['registerar_fullname'] as String?,
|
||||
registerar_mobile: json['registerar_mobile'] as String?,
|
||||
kill_house_register: json['kill_house_register'] as bool?,
|
||||
steward_register: json['steward_register'] as bool?,
|
||||
guilds_room_register: json['guilds_room_register'] as bool?,
|
||||
pos_company_register: json['pos_company_register'] as bool?,
|
||||
province_accept_state: json['province_accept_state'] as String?,
|
||||
province_message: json['province_message'] as String?,
|
||||
condition: json['condition'] as String?,
|
||||
description_condition: json['description_condition'] as String?,
|
||||
steward_active: json['steward_active'] as bool?,
|
||||
steward_allocation_limit: json['steward_allocation_limit'],
|
||||
steward_limitation_allocation: json['steward_limitation_allocation'] as bool?,
|
||||
license: json['license'] as bool?,
|
||||
license_form: json['license_form'],
|
||||
license_file: json['license_file'],
|
||||
reviewer_role: json['reviewer_role'] as String?,
|
||||
reviewer_fullname: json['reviewer_fullname'] as String?,
|
||||
reviewer_mobile: json['reviewer_mobile'] as String?,
|
||||
checker_message: json['checker_message'] as String?,
|
||||
final_accept: json['final_accept'] as bool?,
|
||||
temporary_registration: json['temporary_registration'] as bool?,
|
||||
created_by: json['created_by'] as String?,
|
||||
modified_by: json['modified_by'] as String?,
|
||||
user_bank_info: json['user_bank_info'],
|
||||
wallet: (json['wallet'] as num?)?.toInt(),
|
||||
cars: json['cars'] as List<dynamic>?,
|
||||
user_level: json['user_level'] as List<dynamic>?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GuildProfileToJson(_GuildProfile instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'user': instance.user,
|
||||
'address': instance.address,
|
||||
'guild_area_activity': instance.guild_area_activity,
|
||||
'guild_type_activity': instance.guild_type_activity,
|
||||
'kill_house': instance.kill_house,
|
||||
'steward_kill_house': instance.steward_kill_house,
|
||||
'stewards': instance.stewards,
|
||||
'get_pos_status': instance.get_pos_status,
|
||||
'key': instance.key,
|
||||
'create_date': instance.create_date,
|
||||
'modify_date': instance.modify_date,
|
||||
'trash': instance.trash,
|
||||
'user_id_foreign_key': instance.user_id_foreign_key,
|
||||
'address_id_foreign_key': instance.address_id_foreign_key,
|
||||
'user_bank_id_foreign_key': instance.user_bank_id_foreign_key,
|
||||
'wallet_id_foreign_key': instance.wallet_id_foreign_key,
|
||||
'provincial_government_id_key': instance.provincial_government_id_key,
|
||||
'identity_documents': instance.identity_documents,
|
||||
'active': instance.active,
|
||||
'city_number': instance.city_number,
|
||||
'city_name': instance.city_name,
|
||||
'guilds_id': instance.guilds_id,
|
||||
'license_number': instance.license_number,
|
||||
'guilds_name': instance.guilds_name,
|
||||
'phone': instance.phone,
|
||||
'type_activity': instance.type_activity,
|
||||
'area_activity': instance.area_activity,
|
||||
'province_number': instance.province_number,
|
||||
'province_name': instance.province_name,
|
||||
'steward': instance.steward,
|
||||
'has_pos': instance.has_pos,
|
||||
'centers_allocation': instance.centers_allocation,
|
||||
'kill_house_centers_allocation': instance.kill_house_centers_allocation,
|
||||
'allocation_limit': instance.allocation_limit,
|
||||
'limitation_allocation': instance.limitation_allocation,
|
||||
'registerar_role': instance.registerar_role,
|
||||
'registerar_fullname': instance.registerar_fullname,
|
||||
'registerar_mobile': instance.registerar_mobile,
|
||||
'kill_house_register': instance.kill_house_register,
|
||||
'steward_register': instance.steward_register,
|
||||
'guilds_room_register': instance.guilds_room_register,
|
||||
'pos_company_register': instance.pos_company_register,
|
||||
'province_accept_state': instance.province_accept_state,
|
||||
'province_message': instance.province_message,
|
||||
'condition': instance.condition,
|
||||
'description_condition': instance.description_condition,
|
||||
'steward_active': instance.steward_active,
|
||||
'steward_allocation_limit': instance.steward_allocation_limit,
|
||||
'steward_limitation_allocation': instance.steward_limitation_allocation,
|
||||
'license': instance.license,
|
||||
'license_form': instance.license_form,
|
||||
'license_file': instance.license_file,
|
||||
'reviewer_role': instance.reviewer_role,
|
||||
'reviewer_fullname': instance.reviewer_fullname,
|
||||
'reviewer_mobile': instance.reviewer_mobile,
|
||||
'checker_message': instance.checker_message,
|
||||
'final_accept': instance.final_accept,
|
||||
'temporary_registration': instance.temporary_registration,
|
||||
'created_by': instance.created_by,
|
||||
'modified_by': instance.modified_by,
|
||||
'user_bank_info': instance.user_bank_info,
|
||||
'wallet': instance.wallet,
|
||||
'cars': instance.cars,
|
||||
'user_level': instance.user_level,
|
||||
};
|
||||
|
||||
_User _$UserFromJson(Map<String, dynamic> json) => _User(
|
||||
fullname: json['fullname'] as String?,
|
||||
first_name: json['first_name'] as String?,
|
||||
last_name: json['last_name'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
national_id: json['national_id'] as String?,
|
||||
city: json['city'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserToJson(_User instance) => <String, dynamic>{
|
||||
'fullname': instance.fullname,
|
||||
'first_name': instance.first_name,
|
||||
'last_name': instance.last_name,
|
||||
'mobile': instance.mobile,
|
||||
'national_id': instance.national_id,
|
||||
'city': instance.city,
|
||||
};
|
||||
|
||||
_Address _$AddressFromJson(Map<String, dynamic> json) => _Address(
|
||||
province: json['province'] == null
|
||||
? null
|
||||
: Province.fromJson(json['province'] as Map<String, dynamic>),
|
||||
city: json['city'] == null
|
||||
? null
|
||||
: City.fromJson(json['city'] as Map<String, dynamic>),
|
||||
address: json['address'] as String?,
|
||||
postal_code: json['postal_code'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AddressToJson(_Address instance) => <String, dynamic>{
|
||||
'province': instance.province,
|
||||
'city': instance.city,
|
||||
'address': instance.address,
|
||||
'postal_code': instance.postal_code,
|
||||
};
|
||||
|
||||
_Province _$ProvinceFromJson(Map<String, dynamic> json) =>
|
||||
_Province(key: json['key'] as String?, name: json['name'] as String?);
|
||||
|
||||
Map<String, dynamic> _$ProvinceToJson(_Province instance) => <String, dynamic>{
|
||||
'key': instance.key,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
_City _$CityFromJson(Map<String, dynamic> json) =>
|
||||
_City(key: json['key'] as String?, name: json['name'] as String?);
|
||||
|
||||
Map<String, dynamic> _$CityToJson(_City instance) => <String, dynamic>{
|
||||
'key': instance.key,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
_GuildAreaActivity _$GuildAreaActivityFromJson(Map<String, dynamic> json) =>
|
||||
_GuildAreaActivity(
|
||||
key: json['key'] as String?,
|
||||
title: json['title'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GuildAreaActivityToJson(_GuildAreaActivity instance) =>
|
||||
<String, dynamic>{'key': instance.key, 'title': instance.title};
|
||||
|
||||
_GuildTypeActivity _$GuildTypeActivityFromJson(Map<String, dynamic> json) =>
|
||||
_GuildTypeActivity(
|
||||
key: json['key'] as String?,
|
||||
title: json['title'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GuildTypeActivityToJson(_GuildTypeActivity instance) =>
|
||||
<String, dynamic>{'key': instance.key, 'title': instance.title};
|
||||
|
||||
_GetPosStatus _$GetPosStatusFromJson(Map<String, dynamic> json) =>
|
||||
_GetPosStatus(
|
||||
len_active_sessions: (json['len_active_sessions'] as num?)?.toInt(),
|
||||
has_pons: json['has_pons'] as bool?,
|
||||
has_active_pons: json['has_active_pons'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetPosStatusToJson(_GetPosStatus instance) =>
|
||||
<String, dynamic>{
|
||||
'len_active_sessions': instance.len_active_sessions,
|
||||
'has_pons': instance.has_pons,
|
||||
'has_active_pons': instance.has_active_pons,
|
||||
};
|
||||
@@ -0,0 +1,56 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'inventory_model.freezed.dart';
|
||||
part 'inventory_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class InventoryModel with _$InventoryModel {
|
||||
const factory InventoryModel({
|
||||
int? id,
|
||||
String? key,
|
||||
String? createDate,
|
||||
String? modifyDate,
|
||||
bool? trash,
|
||||
String? name,
|
||||
int? provinceGovernmentalCarcassesQuantity,
|
||||
int? provinceGovernmentalCarcassesWeight,
|
||||
int? provinceFreeCarcassesQuantity,
|
||||
int? provinceFreeCarcassesWeight,
|
||||
int? receiveGovernmentalCarcassesQuantity,
|
||||
int? receiveGovernmentalCarcassesWeight,
|
||||
int? receiveFreeCarcassesQuantity,
|
||||
int? receiveFreeCarcassesWeight,
|
||||
int? freeBuyingCarcassesQuantity,
|
||||
int? freeBuyingCarcassesWeight,
|
||||
int? totalGovernmentalCarcassesQuantity,
|
||||
int? totalGovernmentalCarcassesWeight,
|
||||
int? totalFreeBarsCarcassesQuantity,
|
||||
int? totalFreeBarsCarcassesWeight,
|
||||
double? weightAverage,
|
||||
int? totalCarcassesQuantity,
|
||||
int? totalCarcassesWeight,
|
||||
int? freezingQuantity,
|
||||
int? freezingWeight,
|
||||
int? lossWeight,
|
||||
int? outProvinceAllocatedQuantity,
|
||||
int? outProvinceAllocatedWeight,
|
||||
int? provinceAllocatedQuantity,
|
||||
int? provinceAllocatedWeight,
|
||||
int? realAllocatedQuantity,
|
||||
int? realAllocatedWeight,
|
||||
int? coldHouseAllocatedWeight,
|
||||
int? posAllocatedWeight,
|
||||
int? segmentationWeight,
|
||||
int? totalRemainQuantity,
|
||||
int? totalRemainWeight,
|
||||
int? freePrice,
|
||||
int? approvedPrice,
|
||||
bool? approvedPriceStatus,
|
||||
int? parentProduct,
|
||||
int? killHouse,
|
||||
int? guild,
|
||||
}) = _InventoryModel; // Changed to _InventoryModel
|
||||
|
||||
factory InventoryModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$InventoryModelFromJson(json);
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,127 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'inventory_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_InventoryModel _$InventoryModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _InventoryModel(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
key: json['key'] as String?,
|
||||
createDate: json['create_date'] as String?,
|
||||
modifyDate: json['modify_date'] as String?,
|
||||
trash: json['trash'] as bool?,
|
||||
name: json['name'] as String?,
|
||||
provinceGovernmentalCarcassesQuantity:
|
||||
(json['province_governmental_carcasses_quantity'] as num?)?.toInt(),
|
||||
provinceGovernmentalCarcassesWeight:
|
||||
(json['province_governmental_carcasses_weight'] as num?)?.toInt(),
|
||||
provinceFreeCarcassesQuantity:
|
||||
(json['province_free_carcasses_quantity'] as num?)?.toInt(),
|
||||
provinceFreeCarcassesWeight: (json['province_free_carcasses_weight'] as num?)
|
||||
?.toInt(),
|
||||
receiveGovernmentalCarcassesQuantity:
|
||||
(json['receive_governmental_carcasses_quantity'] as num?)?.toInt(),
|
||||
receiveGovernmentalCarcassesWeight:
|
||||
(json['receive_governmental_carcasses_weight'] as num?)?.toInt(),
|
||||
receiveFreeCarcassesQuantity:
|
||||
(json['receive_free_carcasses_quantity'] as num?)?.toInt(),
|
||||
receiveFreeCarcassesWeight: (json['receive_free_carcasses_weight'] as num?)
|
||||
?.toInt(),
|
||||
freeBuyingCarcassesQuantity: (json['free_buying_carcasses_quantity'] as num?)
|
||||
?.toInt(),
|
||||
freeBuyingCarcassesWeight: (json['free_buying_carcasses_weight'] as num?)
|
||||
?.toInt(),
|
||||
totalGovernmentalCarcassesQuantity:
|
||||
(json['total_governmental_carcasses_quantity'] as num?)?.toInt(),
|
||||
totalGovernmentalCarcassesWeight:
|
||||
(json['total_governmental_carcasses_weight'] as num?)?.toInt(),
|
||||
totalFreeBarsCarcassesQuantity:
|
||||
(json['total_free_bars_carcasses_quantity'] as num?)?.toInt(),
|
||||
totalFreeBarsCarcassesWeight:
|
||||
(json['total_free_bars_carcasses_weight'] as num?)?.toInt(),
|
||||
weightAverage: (json['weight_average'] as num?)?.toDouble(),
|
||||
totalCarcassesQuantity: (json['total_carcasses_quantity'] as num?)?.toInt(),
|
||||
totalCarcassesWeight: (json['total_carcasses_weight'] as num?)?.toInt(),
|
||||
freezingQuantity: (json['freezing_quantity'] as num?)?.toInt(),
|
||||
freezingWeight: (json['freezing_weight'] as num?)?.toInt(),
|
||||
lossWeight: (json['loss_weight'] as num?)?.toInt(),
|
||||
outProvinceAllocatedQuantity:
|
||||
(json['out_province_allocated_quantity'] as num?)?.toInt(),
|
||||
outProvinceAllocatedWeight: (json['out_province_allocated_weight'] as num?)
|
||||
?.toInt(),
|
||||
provinceAllocatedQuantity: (json['province_allocated_quantity'] as num?)
|
||||
?.toInt(),
|
||||
provinceAllocatedWeight: (json['province_allocated_weight'] as num?)?.toInt(),
|
||||
realAllocatedQuantity: (json['real_allocated_quantity'] as num?)?.toInt(),
|
||||
realAllocatedWeight: (json['real_allocated_weight'] as num?)?.toInt(),
|
||||
coldHouseAllocatedWeight: (json['cold_house_allocated_weight'] as num?)
|
||||
?.toInt(),
|
||||
posAllocatedWeight: (json['pos_allocated_weight'] as num?)?.toInt(),
|
||||
segmentationWeight: (json['segmentation_weight'] as num?)?.toInt(),
|
||||
totalRemainQuantity: (json['total_remain_quantity'] as num?)?.toInt(),
|
||||
totalRemainWeight: (json['total_remain_weight'] as num?)?.toInt(),
|
||||
freePrice: (json['free_price'] as num?)?.toInt(),
|
||||
approvedPrice: (json['approved_price'] as num?)?.toInt(),
|
||||
approvedPriceStatus: json['approved_price_status'] as bool?,
|
||||
parentProduct: (json['parent_product'] as num?)?.toInt(),
|
||||
killHouse: (json['kill_house'] as num?)?.toInt(),
|
||||
guild: (json['guild'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$InventoryModelToJson(
|
||||
_InventoryModel instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'key': instance.key,
|
||||
'create_date': instance.createDate,
|
||||
'modify_date': instance.modifyDate,
|
||||
'trash': instance.trash,
|
||||
'name': instance.name,
|
||||
'province_governmental_carcasses_quantity':
|
||||
instance.provinceGovernmentalCarcassesQuantity,
|
||||
'province_governmental_carcasses_weight':
|
||||
instance.provinceGovernmentalCarcassesWeight,
|
||||
'province_free_carcasses_quantity': instance.provinceFreeCarcassesQuantity,
|
||||
'province_free_carcasses_weight': instance.provinceFreeCarcassesWeight,
|
||||
'receive_governmental_carcasses_quantity':
|
||||
instance.receiveGovernmentalCarcassesQuantity,
|
||||
'receive_governmental_carcasses_weight':
|
||||
instance.receiveGovernmentalCarcassesWeight,
|
||||
'receive_free_carcasses_quantity': instance.receiveFreeCarcassesQuantity,
|
||||
'receive_free_carcasses_weight': instance.receiveFreeCarcassesWeight,
|
||||
'free_buying_carcasses_quantity': instance.freeBuyingCarcassesQuantity,
|
||||
'free_buying_carcasses_weight': instance.freeBuyingCarcassesWeight,
|
||||
'total_governmental_carcasses_quantity':
|
||||
instance.totalGovernmentalCarcassesQuantity,
|
||||
'total_governmental_carcasses_weight':
|
||||
instance.totalGovernmentalCarcassesWeight,
|
||||
'total_free_bars_carcasses_quantity': instance.totalFreeBarsCarcassesQuantity,
|
||||
'total_free_bars_carcasses_weight': instance.totalFreeBarsCarcassesWeight,
|
||||
'weight_average': instance.weightAverage,
|
||||
'total_carcasses_quantity': instance.totalCarcassesQuantity,
|
||||
'total_carcasses_weight': instance.totalCarcassesWeight,
|
||||
'freezing_quantity': instance.freezingQuantity,
|
||||
'freezing_weight': instance.freezingWeight,
|
||||
'loss_weight': instance.lossWeight,
|
||||
'out_province_allocated_quantity': instance.outProvinceAllocatedQuantity,
|
||||
'out_province_allocated_weight': instance.outProvinceAllocatedWeight,
|
||||
'province_allocated_quantity': instance.provinceAllocatedQuantity,
|
||||
'province_allocated_weight': instance.provinceAllocatedWeight,
|
||||
'real_allocated_quantity': instance.realAllocatedQuantity,
|
||||
'real_allocated_weight': instance.realAllocatedWeight,
|
||||
'cold_house_allocated_weight': instance.coldHouseAllocatedWeight,
|
||||
'pos_allocated_weight': instance.posAllocatedWeight,
|
||||
'segmentation_weight': instance.segmentationWeight,
|
||||
'total_remain_quantity': instance.totalRemainQuantity,
|
||||
'total_remain_weight': instance.totalRemainWeight,
|
||||
'free_price': instance.freePrice,
|
||||
'approved_price': instance.approvedPrice,
|
||||
'approved_price_status': instance.approvedPriceStatus,
|
||||
'parent_product': instance.parentProduct,
|
||||
'kill_house': instance.killHouse,
|
||||
'guild': instance.guild,
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'iran_province_city_model.freezed.dart';
|
||||
part 'iran_province_city_model.g.dart';
|
||||
|
||||
|
||||
@freezed
|
||||
abstract class IranProvinceCityModel with _$IranProvinceCityModel {
|
||||
const factory IranProvinceCityModel({
|
||||
int? id,
|
||||
String? name,
|
||||
}) = _IranProvinceCityModel;
|
||||
|
||||
factory IranProvinceCityModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$IranProvinceCityModelFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// 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 'iran_province_city_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$IranProvinceCityModel {
|
||||
|
||||
int? get id; String? get name;
|
||||
/// Create a copy of IranProvinceCityModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$IranProvinceCityModelCopyWith<IranProvinceCityModel> get copyWith => _$IranProvinceCityModelCopyWithImpl<IranProvinceCityModel>(this as IranProvinceCityModel, _$identity);
|
||||
|
||||
/// Serializes this IranProvinceCityModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is IranProvinceCityModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,name);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'IranProvinceCityModel(id: $id, name: $name)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $IranProvinceCityModelCopyWith<$Res> {
|
||||
factory $IranProvinceCityModelCopyWith(IranProvinceCityModel value, $Res Function(IranProvinceCityModel) _then) = _$IranProvinceCityModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int? id, String? name
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$IranProvinceCityModelCopyWithImpl<$Res>
|
||||
implements $IranProvinceCityModelCopyWith<$Res> {
|
||||
_$IranProvinceCityModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final IranProvinceCityModel _self;
|
||||
final $Res Function(IranProvinceCityModel) _then;
|
||||
|
||||
/// Create a copy of IranProvinceCityModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? name = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as int?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [IranProvinceCityModel].
|
||||
extension IranProvinceCityModelPatterns on IranProvinceCityModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _IranProvinceCityModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _IranProvinceCityModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _IranProvinceCityModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _IranProvinceCityModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _IranProvinceCityModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _IranProvinceCityModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? id, String? name)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _IranProvinceCityModel() when $default != null:
|
||||
return $default(_that.id,_that.name);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? id, String? name) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _IranProvinceCityModel():
|
||||
return $default(_that.id,_that.name);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? id, String? name)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _IranProvinceCityModel() when $default != null:
|
||||
return $default(_that.id,_that.name);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _IranProvinceCityModel implements IranProvinceCityModel {
|
||||
const _IranProvinceCityModel({this.id, this.name});
|
||||
factory _IranProvinceCityModel.fromJson(Map<String, dynamic> json) => _$IranProvinceCityModelFromJson(json);
|
||||
|
||||
@override final int? id;
|
||||
@override final String? name;
|
||||
|
||||
/// Create a copy of IranProvinceCityModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$IranProvinceCityModelCopyWith<_IranProvinceCityModel> get copyWith => __$IranProvinceCityModelCopyWithImpl<_IranProvinceCityModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$IranProvinceCityModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _IranProvinceCityModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,name);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'IranProvinceCityModel(id: $id, name: $name)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$IranProvinceCityModelCopyWith<$Res> implements $IranProvinceCityModelCopyWith<$Res> {
|
||||
factory _$IranProvinceCityModelCopyWith(_IranProvinceCityModel value, $Res Function(_IranProvinceCityModel) _then) = __$IranProvinceCityModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int? id, String? name
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$IranProvinceCityModelCopyWithImpl<$Res>
|
||||
implements _$IranProvinceCityModelCopyWith<$Res> {
|
||||
__$IranProvinceCityModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _IranProvinceCityModel _self;
|
||||
final $Res Function(_IranProvinceCityModel) _then;
|
||||
|
||||
/// Create a copy of IranProvinceCityModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? name = freezed,}) {
|
||||
return _then(_IranProvinceCityModel(
|
||||
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as int?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,18 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'iran_province_city_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_IranProvinceCityModel _$IranProvinceCityModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _IranProvinceCityModel(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$IranProvinceCityModelToJson(
|
||||
_IranProvinceCityModel instance,
|
||||
) => <String, dynamic>{'id': instance.id, 'name': instance.name};
|
||||
@@ -0,0 +1,15 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'kill_house_distribution_info.freezed.dart';
|
||||
part 'kill_house_distribution_info.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class KillHouseDistributionInfo with _$KillHouseDistributionInfo {
|
||||
const factory KillHouseDistributionInfo({
|
||||
double? stewardAllocationsWeight,
|
||||
double? freeSalesWeight,
|
||||
}) = _KillHouseDistributionInfo;
|
||||
|
||||
factory KillHouseDistributionInfo.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillHouseDistributionInfoFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// 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 'kill_house_distribution_info.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$KillHouseDistributionInfo {
|
||||
|
||||
double? get stewardAllocationsWeight; double? get freeSalesWeight;
|
||||
/// Create a copy of KillHouseDistributionInfo
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$KillHouseDistributionInfoCopyWith<KillHouseDistributionInfo> get copyWith => _$KillHouseDistributionInfoCopyWithImpl<KillHouseDistributionInfo>(this as KillHouseDistributionInfo, _$identity);
|
||||
|
||||
/// Serializes this KillHouseDistributionInfo to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is KillHouseDistributionInfo&&(identical(other.stewardAllocationsWeight, stewardAllocationsWeight) || other.stewardAllocationsWeight == stewardAllocationsWeight)&&(identical(other.freeSalesWeight, freeSalesWeight) || other.freeSalesWeight == freeSalesWeight));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,stewardAllocationsWeight,freeSalesWeight);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'KillHouseDistributionInfo(stewardAllocationsWeight: $stewardAllocationsWeight, freeSalesWeight: $freeSalesWeight)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $KillHouseDistributionInfoCopyWith<$Res> {
|
||||
factory $KillHouseDistributionInfoCopyWith(KillHouseDistributionInfo value, $Res Function(KillHouseDistributionInfo) _then) = _$KillHouseDistributionInfoCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
double? stewardAllocationsWeight, double? freeSalesWeight
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$KillHouseDistributionInfoCopyWithImpl<$Res>
|
||||
implements $KillHouseDistributionInfoCopyWith<$Res> {
|
||||
_$KillHouseDistributionInfoCopyWithImpl(this._self, this._then);
|
||||
|
||||
final KillHouseDistributionInfo _self;
|
||||
final $Res Function(KillHouseDistributionInfo) _then;
|
||||
|
||||
/// Create a copy of KillHouseDistributionInfo
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? stewardAllocationsWeight = freezed,Object? freeSalesWeight = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
stewardAllocationsWeight: freezed == stewardAllocationsWeight ? _self.stewardAllocationsWeight : stewardAllocationsWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,freeSalesWeight: freezed == freeSalesWeight ? _self.freeSalesWeight : freeSalesWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [KillHouseDistributionInfo].
|
||||
extension KillHouseDistributionInfoPatterns on KillHouseDistributionInfo {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _KillHouseDistributionInfo value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseDistributionInfo() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _KillHouseDistributionInfo value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseDistributionInfo():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _KillHouseDistributionInfo value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseDistributionInfo() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( double? stewardAllocationsWeight, double? freeSalesWeight)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseDistributionInfo() when $default != null:
|
||||
return $default(_that.stewardAllocationsWeight,_that.freeSalesWeight);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( double? stewardAllocationsWeight, double? freeSalesWeight) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseDistributionInfo():
|
||||
return $default(_that.stewardAllocationsWeight,_that.freeSalesWeight);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( double? stewardAllocationsWeight, double? freeSalesWeight)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseDistributionInfo() when $default != null:
|
||||
return $default(_that.stewardAllocationsWeight,_that.freeSalesWeight);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _KillHouseDistributionInfo implements KillHouseDistributionInfo {
|
||||
const _KillHouseDistributionInfo({this.stewardAllocationsWeight, this.freeSalesWeight});
|
||||
factory _KillHouseDistributionInfo.fromJson(Map<String, dynamic> json) => _$KillHouseDistributionInfoFromJson(json);
|
||||
|
||||
@override final double? stewardAllocationsWeight;
|
||||
@override final double? freeSalesWeight;
|
||||
|
||||
/// Create a copy of KillHouseDistributionInfo
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$KillHouseDistributionInfoCopyWith<_KillHouseDistributionInfo> get copyWith => __$KillHouseDistributionInfoCopyWithImpl<_KillHouseDistributionInfo>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$KillHouseDistributionInfoToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _KillHouseDistributionInfo&&(identical(other.stewardAllocationsWeight, stewardAllocationsWeight) || other.stewardAllocationsWeight == stewardAllocationsWeight)&&(identical(other.freeSalesWeight, freeSalesWeight) || other.freeSalesWeight == freeSalesWeight));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,stewardAllocationsWeight,freeSalesWeight);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'KillHouseDistributionInfo(stewardAllocationsWeight: $stewardAllocationsWeight, freeSalesWeight: $freeSalesWeight)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$KillHouseDistributionInfoCopyWith<$Res> implements $KillHouseDistributionInfoCopyWith<$Res> {
|
||||
factory _$KillHouseDistributionInfoCopyWith(_KillHouseDistributionInfo value, $Res Function(_KillHouseDistributionInfo) _then) = __$KillHouseDistributionInfoCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
double? stewardAllocationsWeight, double? freeSalesWeight
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$KillHouseDistributionInfoCopyWithImpl<$Res>
|
||||
implements _$KillHouseDistributionInfoCopyWith<$Res> {
|
||||
__$KillHouseDistributionInfoCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _KillHouseDistributionInfo _self;
|
||||
final $Res Function(_KillHouseDistributionInfo) _then;
|
||||
|
||||
/// Create a copy of KillHouseDistributionInfo
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? stewardAllocationsWeight = freezed,Object? freeSalesWeight = freezed,}) {
|
||||
return _then(_KillHouseDistributionInfo(
|
||||
stewardAllocationsWeight: freezed == stewardAllocationsWeight ? _self.stewardAllocationsWeight : stewardAllocationsWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,freeSalesWeight: freezed == freeSalesWeight ? _self.freeSalesWeight : freeSalesWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,22 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'kill_house_distribution_info.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_KillHouseDistributionInfo _$KillHouseDistributionInfoFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _KillHouseDistributionInfo(
|
||||
stewardAllocationsWeight: (json['steward_allocations_weight'] as num?)
|
||||
?.toDouble(),
|
||||
freeSalesWeight: (json['free_sales_weight'] as num?)?.toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillHouseDistributionInfoToJson(
|
||||
_KillHouseDistributionInfo instance,
|
||||
) => <String, dynamic>{
|
||||
'steward_allocations_weight': instance.stewardAllocationsWeight,
|
||||
'free_sales_weight': instance.freeSalesWeight,
|
||||
};
|
||||
@@ -0,0 +1,71 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'kill_house_free_bar.freezed.dart';
|
||||
part 'kill_house_free_bar.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class KillHouseFreeBar with _$KillHouseFreeBar {
|
||||
const factory KillHouseFreeBar({
|
||||
int? id,
|
||||
dynamic killHouse,
|
||||
dynamic exclusiveKiller,
|
||||
String? key,
|
||||
String? createDate,
|
||||
String? modifyDate,
|
||||
bool? trash,
|
||||
String? poultryName,
|
||||
String? poultryMobile,
|
||||
String? sellerName,
|
||||
String? sellerMobile,
|
||||
String? province,
|
||||
String? city,
|
||||
String? vetFarmName,
|
||||
String? vetFarmMobile,
|
||||
String? driverName,
|
||||
String? driverMobile,
|
||||
String? car,
|
||||
String? clearanceCode,
|
||||
String? barClearanceCode,
|
||||
int? quantity,
|
||||
int? numberOfCarcasses,
|
||||
int? weightOfCarcasses,
|
||||
int? killHouseVetQuantity,
|
||||
int? killHouseVetWeight,
|
||||
String? killHouseVetState,
|
||||
String? dateOfAcceptReject,
|
||||
dynamic acceptorRejector,
|
||||
int? liveWeight,
|
||||
String? barImage,
|
||||
String? buyType,
|
||||
bool? wareHouse,
|
||||
String? date,
|
||||
int? wage,
|
||||
int? totalWageAmount,
|
||||
int? unionShare,
|
||||
int? unionSharePercent,
|
||||
int? companyShare,
|
||||
int? companySharePercent,
|
||||
int? guildsShare,
|
||||
int? guildsSharePercent,
|
||||
int? cityShare,
|
||||
int? citySharePercent,
|
||||
int? walletShare,
|
||||
int? walletSharePercent,
|
||||
int? otherShare,
|
||||
int? otherSharePercent,
|
||||
bool? archiveWage,
|
||||
int? weightLoss,
|
||||
bool? calculateStatus,
|
||||
bool? temporaryTrash,
|
||||
bool? temporaryDeleted,
|
||||
String? enteredMessage,
|
||||
int? barCode,
|
||||
String? registerType,
|
||||
dynamic createdBy,
|
||||
dynamic modifiedBy,
|
||||
int? product,
|
||||
}) = _KillHouseFreeBar;
|
||||
|
||||
factory KillHouseFreeBar.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillHouseFreeBarFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,448 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// 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 'kill_house_free_bar.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$KillHouseFreeBar {
|
||||
|
||||
int? get id; dynamic get killHouse; dynamic get exclusiveKiller; String? get key; String? get createDate; String? get modifyDate; bool? get trash; String? get poultryName; String? get poultryMobile; String? get sellerName; String? get sellerMobile; String? get province; String? get city; String? get vetFarmName; String? get vetFarmMobile; String? get driverName; String? get driverMobile; String? get car; String? get clearanceCode; String? get barClearanceCode; int? get quantity; int? get numberOfCarcasses; int? get weightOfCarcasses; int? get killHouseVetQuantity; int? get killHouseVetWeight; String? get killHouseVetState; String? get dateOfAcceptReject; dynamic get acceptorRejector; int? get liveWeight; String? get barImage; String? get buyType; bool? get wareHouse; String? get date; int? get wage; int? get totalWageAmount; int? get unionShare; int? get unionSharePercent; int? get companyShare; int? get companySharePercent; int? get guildsShare; int? get guildsSharePercent; int? get cityShare; int? get citySharePercent; int? get walletShare; int? get walletSharePercent; int? get otherShare; int? get otherSharePercent; bool? get archiveWage; int? get weightLoss; bool? get calculateStatus; bool? get temporaryTrash; bool? get temporaryDeleted; String? get enteredMessage; int? get barCode; String? get registerType; dynamic get createdBy; dynamic get modifiedBy; int? get product;
|
||||
/// Create a copy of KillHouseFreeBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$KillHouseFreeBarCopyWith<KillHouseFreeBar> get copyWith => _$KillHouseFreeBarCopyWithImpl<KillHouseFreeBar>(this as KillHouseFreeBar, _$identity);
|
||||
|
||||
/// Serializes this KillHouseFreeBar to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is KillHouseFreeBar&&(identical(other.id, id) || other.id == id)&&const DeepCollectionEquality().equals(other.killHouse, killHouse)&&const DeepCollectionEquality().equals(other.exclusiveKiller, exclusiveKiller)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.poultryName, poultryName) || other.poultryName == poultryName)&&(identical(other.poultryMobile, poultryMobile) || other.poultryMobile == poultryMobile)&&(identical(other.sellerName, sellerName) || other.sellerName == sellerName)&&(identical(other.sellerMobile, sellerMobile) || other.sellerMobile == sellerMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.vetFarmName, vetFarmName) || other.vetFarmName == vetFarmName)&&(identical(other.vetFarmMobile, vetFarmMobile) || other.vetFarmMobile == vetFarmMobile)&&(identical(other.driverName, driverName) || other.driverName == driverName)&&(identical(other.driverMobile, driverMobile) || other.driverMobile == driverMobile)&&(identical(other.car, car) || other.car == car)&&(identical(other.clearanceCode, clearanceCode) || other.clearanceCode == clearanceCode)&&(identical(other.barClearanceCode, barClearanceCode) || other.barClearanceCode == barClearanceCode)&&(identical(other.quantity, quantity) || other.quantity == quantity)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.killHouseVetQuantity, killHouseVetQuantity) || other.killHouseVetQuantity == killHouseVetQuantity)&&(identical(other.killHouseVetWeight, killHouseVetWeight) || other.killHouseVetWeight == killHouseVetWeight)&&(identical(other.killHouseVetState, killHouseVetState) || other.killHouseVetState == killHouseVetState)&&(identical(other.dateOfAcceptReject, dateOfAcceptReject) || other.dateOfAcceptReject == dateOfAcceptReject)&&const DeepCollectionEquality().equals(other.acceptorRejector, acceptorRejector)&&(identical(other.liveWeight, liveWeight) || other.liveWeight == liveWeight)&&(identical(other.barImage, barImage) || other.barImage == barImage)&&(identical(other.buyType, buyType) || other.buyType == buyType)&&(identical(other.wareHouse, wareHouse) || other.wareHouse == wareHouse)&&(identical(other.date, date) || other.date == date)&&(identical(other.wage, wage) || other.wage == wage)&&(identical(other.totalWageAmount, totalWageAmount) || other.totalWageAmount == totalWageAmount)&&(identical(other.unionShare, unionShare) || other.unionShare == unionShare)&&(identical(other.unionSharePercent, unionSharePercent) || other.unionSharePercent == unionSharePercent)&&(identical(other.companyShare, companyShare) || other.companyShare == companyShare)&&(identical(other.companySharePercent, companySharePercent) || other.companySharePercent == companySharePercent)&&(identical(other.guildsShare, guildsShare) || other.guildsShare == guildsShare)&&(identical(other.guildsSharePercent, guildsSharePercent) || other.guildsSharePercent == guildsSharePercent)&&(identical(other.cityShare, cityShare) || other.cityShare == cityShare)&&(identical(other.citySharePercent, citySharePercent) || other.citySharePercent == citySharePercent)&&(identical(other.walletShare, walletShare) || other.walletShare == walletShare)&&(identical(other.walletSharePercent, walletSharePercent) || other.walletSharePercent == walletSharePercent)&&(identical(other.otherShare, otherShare) || other.otherShare == otherShare)&&(identical(other.otherSharePercent, otherSharePercent) || other.otherSharePercent == otherSharePercent)&&(identical(other.archiveWage, archiveWage) || other.archiveWage == archiveWage)&&(identical(other.weightLoss, weightLoss) || other.weightLoss == weightLoss)&&(identical(other.calculateStatus, calculateStatus) || other.calculateStatus == calculateStatus)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&(identical(other.enteredMessage, enteredMessage) || other.enteredMessage == enteredMessage)&&(identical(other.barCode, barCode) || other.barCode == barCode)&&(identical(other.registerType, registerType) || other.registerType == registerType)&&const DeepCollectionEquality().equals(other.createdBy, createdBy)&&const DeepCollectionEquality().equals(other.modifiedBy, modifiedBy)&&(identical(other.product, product) || other.product == product));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hashAll([runtimeType,id,const DeepCollectionEquality().hash(killHouse),const DeepCollectionEquality().hash(exclusiveKiller),key,createDate,modifyDate,trash,poultryName,poultryMobile,sellerName,sellerMobile,province,city,vetFarmName,vetFarmMobile,driverName,driverMobile,car,clearanceCode,barClearanceCode,quantity,numberOfCarcasses,weightOfCarcasses,killHouseVetQuantity,killHouseVetWeight,killHouseVetState,dateOfAcceptReject,const DeepCollectionEquality().hash(acceptorRejector),liveWeight,barImage,buyType,wareHouse,date,wage,totalWageAmount,unionShare,unionSharePercent,companyShare,companySharePercent,guildsShare,guildsSharePercent,cityShare,citySharePercent,walletShare,walletSharePercent,otherShare,otherSharePercent,archiveWage,weightLoss,calculateStatus,temporaryTrash,temporaryDeleted,enteredMessage,barCode,registerType,const DeepCollectionEquality().hash(createdBy),const DeepCollectionEquality().hash(modifiedBy),product]);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'KillHouseFreeBar(id: $id, killHouse: $killHouse, exclusiveKiller: $exclusiveKiller, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, poultryName: $poultryName, poultryMobile: $poultryMobile, sellerName: $sellerName, sellerMobile: $sellerMobile, province: $province, city: $city, vetFarmName: $vetFarmName, vetFarmMobile: $vetFarmMobile, driverName: $driverName, driverMobile: $driverMobile, car: $car, clearanceCode: $clearanceCode, barClearanceCode: $barClearanceCode, quantity: $quantity, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, killHouseVetQuantity: $killHouseVetQuantity, killHouseVetWeight: $killHouseVetWeight, killHouseVetState: $killHouseVetState, dateOfAcceptReject: $dateOfAcceptReject, acceptorRejector: $acceptorRejector, liveWeight: $liveWeight, barImage: $barImage, buyType: $buyType, wareHouse: $wareHouse, date: $date, wage: $wage, totalWageAmount: $totalWageAmount, unionShare: $unionShare, unionSharePercent: $unionSharePercent, companyShare: $companyShare, companySharePercent: $companySharePercent, guildsShare: $guildsShare, guildsSharePercent: $guildsSharePercent, cityShare: $cityShare, citySharePercent: $citySharePercent, walletShare: $walletShare, walletSharePercent: $walletSharePercent, otherShare: $otherShare, otherSharePercent: $otherSharePercent, archiveWage: $archiveWage, weightLoss: $weightLoss, calculateStatus: $calculateStatus, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, enteredMessage: $enteredMessage, barCode: $barCode, registerType: $registerType, createdBy: $createdBy, modifiedBy: $modifiedBy, product: $product)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $KillHouseFreeBarCopyWith<$Res> {
|
||||
factory $KillHouseFreeBarCopyWith(KillHouseFreeBar value, $Res Function(KillHouseFreeBar) _then) = _$KillHouseFreeBarCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int? id, dynamic killHouse, dynamic exclusiveKiller, String? key, String? createDate, String? modifyDate, bool? trash, String? poultryName, String? poultryMobile, String? sellerName, String? sellerMobile, String? province, String? city, String? vetFarmName, String? vetFarmMobile, String? driverName, String? driverMobile, String? car, String? clearanceCode, String? barClearanceCode, int? quantity, int? numberOfCarcasses, int? weightOfCarcasses, int? killHouseVetQuantity, int? killHouseVetWeight, String? killHouseVetState, String? dateOfAcceptReject, dynamic acceptorRejector, int? liveWeight, String? barImage, String? buyType, bool? wareHouse, String? date, int? wage, int? totalWageAmount, int? unionShare, int? unionSharePercent, int? companyShare, int? companySharePercent, int? guildsShare, int? guildsSharePercent, int? cityShare, int? citySharePercent, int? walletShare, int? walletSharePercent, int? otherShare, int? otherSharePercent, bool? archiveWage, int? weightLoss, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? enteredMessage, int? barCode, String? registerType, dynamic createdBy, dynamic modifiedBy, int? product
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$KillHouseFreeBarCopyWithImpl<$Res>
|
||||
implements $KillHouseFreeBarCopyWith<$Res> {
|
||||
_$KillHouseFreeBarCopyWithImpl(this._self, this._then);
|
||||
|
||||
final KillHouseFreeBar _self;
|
||||
final $Res Function(KillHouseFreeBar) _then;
|
||||
|
||||
/// Create a copy of KillHouseFreeBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? killHouse = freezed,Object? exclusiveKiller = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? poultryName = freezed,Object? poultryMobile = freezed,Object? sellerName = freezed,Object? sellerMobile = freezed,Object? province = freezed,Object? city = freezed,Object? vetFarmName = freezed,Object? vetFarmMobile = freezed,Object? driverName = freezed,Object? driverMobile = freezed,Object? car = freezed,Object? clearanceCode = freezed,Object? barClearanceCode = freezed,Object? quantity = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? killHouseVetQuantity = freezed,Object? killHouseVetWeight = freezed,Object? killHouseVetState = freezed,Object? dateOfAcceptReject = freezed,Object? acceptorRejector = freezed,Object? liveWeight = freezed,Object? barImage = freezed,Object? buyType = freezed,Object? wareHouse = freezed,Object? date = freezed,Object? wage = freezed,Object? totalWageAmount = freezed,Object? unionShare = freezed,Object? unionSharePercent = freezed,Object? companyShare = freezed,Object? companySharePercent = freezed,Object? guildsShare = freezed,Object? guildsSharePercent = freezed,Object? cityShare = freezed,Object? citySharePercent = freezed,Object? walletShare = freezed,Object? walletSharePercent = freezed,Object? otherShare = freezed,Object? otherSharePercent = freezed,Object? archiveWage = freezed,Object? weightLoss = freezed,Object? calculateStatus = freezed,Object? temporaryTrash = freezed,Object? temporaryDeleted = freezed,Object? enteredMessage = freezed,Object? barCode = freezed,Object? registerType = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,Object? product = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as int?,killHouse: freezed == killHouse ? _self.killHouse : killHouse // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,exclusiveKiller: freezed == exclusiveKiller ? _self.exclusiveKiller : exclusiveKiller // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,createDate: freezed == createDate ? _self.createDate : createDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,modifyDate: freezed == modifyDate ? _self.modifyDate : modifyDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,trash: freezed == trash ? _self.trash : trash // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,poultryName: freezed == poultryName ? _self.poultryName : poultryName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,poultryMobile: freezed == poultryMobile ? _self.poultryMobile : poultryMobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,sellerName: freezed == sellerName ? _self.sellerName : sellerName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,sellerMobile: freezed == sellerMobile ? _self.sellerMobile : sellerMobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
|
||||
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
|
||||
as String?,vetFarmName: freezed == vetFarmName ? _self.vetFarmName : vetFarmName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,vetFarmMobile: freezed == vetFarmMobile ? _self.vetFarmMobile : vetFarmMobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,driverName: freezed == driverName ? _self.driverName : driverName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,driverMobile: freezed == driverMobile ? _self.driverMobile : driverMobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,car: freezed == car ? _self.car : car // ignore: cast_nullable_to_non_nullable
|
||||
as String?,clearanceCode: freezed == clearanceCode ? _self.clearanceCode : clearanceCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,barClearanceCode: freezed == barClearanceCode ? _self.barClearanceCode : barClearanceCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,quantity: freezed == quantity ? _self.quantity : quantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,numberOfCarcasses: freezed == numberOfCarcasses ? _self.numberOfCarcasses : numberOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as int?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarcasses : weightOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as int?,killHouseVetQuantity: freezed == killHouseVetQuantity ? _self.killHouseVetQuantity : killHouseVetQuantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,killHouseVetWeight: freezed == killHouseVetWeight ? _self.killHouseVetWeight : killHouseVetWeight // ignore: cast_nullable_to_non_nullable
|
||||
as int?,killHouseVetState: freezed == killHouseVetState ? _self.killHouseVetState : killHouseVetState // ignore: cast_nullable_to_non_nullable
|
||||
as String?,dateOfAcceptReject: freezed == dateOfAcceptReject ? _self.dateOfAcceptReject : dateOfAcceptReject // ignore: cast_nullable_to_non_nullable
|
||||
as String?,acceptorRejector: freezed == acceptorRejector ? _self.acceptorRejector : acceptorRejector // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,liveWeight: freezed == liveWeight ? _self.liveWeight : liveWeight // ignore: cast_nullable_to_non_nullable
|
||||
as int?,barImage: freezed == barImage ? _self.barImage : barImage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,buyType: freezed == buyType ? _self.buyType : buyType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,wareHouse: freezed == wareHouse ? _self.wareHouse : wareHouse // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,wage: freezed == wage ? _self.wage : wage // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalWageAmount: freezed == totalWageAmount ? _self.totalWageAmount : totalWageAmount // ignore: cast_nullable_to_non_nullable
|
||||
as int?,unionShare: freezed == unionShare ? _self.unionShare : unionShare // ignore: cast_nullable_to_non_nullable
|
||||
as int?,unionSharePercent: freezed == unionSharePercent ? _self.unionSharePercent : unionSharePercent // ignore: cast_nullable_to_non_nullable
|
||||
as int?,companyShare: freezed == companyShare ? _self.companyShare : companyShare // ignore: cast_nullable_to_non_nullable
|
||||
as int?,companySharePercent: freezed == companySharePercent ? _self.companySharePercent : companySharePercent // ignore: cast_nullable_to_non_nullable
|
||||
as int?,guildsShare: freezed == guildsShare ? _self.guildsShare : guildsShare // ignore: cast_nullable_to_non_nullable
|
||||
as int?,guildsSharePercent: freezed == guildsSharePercent ? _self.guildsSharePercent : guildsSharePercent // ignore: cast_nullable_to_non_nullable
|
||||
as int?,cityShare: freezed == cityShare ? _self.cityShare : cityShare // ignore: cast_nullable_to_non_nullable
|
||||
as int?,citySharePercent: freezed == citySharePercent ? _self.citySharePercent : citySharePercent // ignore: cast_nullable_to_non_nullable
|
||||
as int?,walletShare: freezed == walletShare ? _self.walletShare : walletShare // ignore: cast_nullable_to_non_nullable
|
||||
as int?,walletSharePercent: freezed == walletSharePercent ? _self.walletSharePercent : walletSharePercent // ignore: cast_nullable_to_non_nullable
|
||||
as int?,otherShare: freezed == otherShare ? _self.otherShare : otherShare // ignore: cast_nullable_to_non_nullable
|
||||
as int?,otherSharePercent: freezed == otherSharePercent ? _self.otherSharePercent : otherSharePercent // ignore: cast_nullable_to_non_nullable
|
||||
as int?,archiveWage: freezed == archiveWage ? _self.archiveWage : archiveWage // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,weightLoss: freezed == weightLoss ? _self.weightLoss : weightLoss // ignore: cast_nullable_to_non_nullable
|
||||
as int?,calculateStatus: freezed == calculateStatus ? _self.calculateStatus : calculateStatus // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,temporaryTrash: freezed == temporaryTrash ? _self.temporaryTrash : temporaryTrash // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,temporaryDeleted: freezed == temporaryDeleted ? _self.temporaryDeleted : temporaryDeleted // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,enteredMessage: freezed == enteredMessage ? _self.enteredMessage : enteredMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,barCode: freezed == barCode ? _self.barCode : barCode // ignore: cast_nullable_to_non_nullable
|
||||
as int?,registerType: freezed == registerType ? _self.registerType : registerType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,createdBy: freezed == createdBy ? _self.createdBy : createdBy // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,modifiedBy: freezed == modifiedBy ? _self.modifiedBy : modifiedBy // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [KillHouseFreeBar].
|
||||
extension KillHouseFreeBarPatterns on KillHouseFreeBar {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _KillHouseFreeBar value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseFreeBar() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _KillHouseFreeBar value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseFreeBar():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _KillHouseFreeBar value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseFreeBar() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? id, dynamic killHouse, dynamic exclusiveKiller, String? key, String? createDate, String? modifyDate, bool? trash, String? poultryName, String? poultryMobile, String? sellerName, String? sellerMobile, String? province, String? city, String? vetFarmName, String? vetFarmMobile, String? driverName, String? driverMobile, String? car, String? clearanceCode, String? barClearanceCode, int? quantity, int? numberOfCarcasses, int? weightOfCarcasses, int? killHouseVetQuantity, int? killHouseVetWeight, String? killHouseVetState, String? dateOfAcceptReject, dynamic acceptorRejector, int? liveWeight, String? barImage, String? buyType, bool? wareHouse, String? date, int? wage, int? totalWageAmount, int? unionShare, int? unionSharePercent, int? companyShare, int? companySharePercent, int? guildsShare, int? guildsSharePercent, int? cityShare, int? citySharePercent, int? walletShare, int? walletSharePercent, int? otherShare, int? otherSharePercent, bool? archiveWage, int? weightLoss, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? enteredMessage, int? barCode, String? registerType, dynamic createdBy, dynamic modifiedBy, int? product)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseFreeBar() when $default != null:
|
||||
return $default(_that.id,_that.killHouse,_that.exclusiveKiller,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.poultryName,_that.poultryMobile,_that.sellerName,_that.sellerMobile,_that.province,_that.city,_that.vetFarmName,_that.vetFarmMobile,_that.driverName,_that.driverMobile,_that.car,_that.clearanceCode,_that.barClearanceCode,_that.quantity,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.killHouseVetQuantity,_that.killHouseVetWeight,_that.killHouseVetState,_that.dateOfAcceptReject,_that.acceptorRejector,_that.liveWeight,_that.barImage,_that.buyType,_that.wareHouse,_that.date,_that.wage,_that.totalWageAmount,_that.unionShare,_that.unionSharePercent,_that.companyShare,_that.companySharePercent,_that.guildsShare,_that.guildsSharePercent,_that.cityShare,_that.citySharePercent,_that.walletShare,_that.walletSharePercent,_that.otherShare,_that.otherSharePercent,_that.archiveWage,_that.weightLoss,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.enteredMessage,_that.barCode,_that.registerType,_that.createdBy,_that.modifiedBy,_that.product);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? id, dynamic killHouse, dynamic exclusiveKiller, String? key, String? createDate, String? modifyDate, bool? trash, String? poultryName, String? poultryMobile, String? sellerName, String? sellerMobile, String? province, String? city, String? vetFarmName, String? vetFarmMobile, String? driverName, String? driverMobile, String? car, String? clearanceCode, String? barClearanceCode, int? quantity, int? numberOfCarcasses, int? weightOfCarcasses, int? killHouseVetQuantity, int? killHouseVetWeight, String? killHouseVetState, String? dateOfAcceptReject, dynamic acceptorRejector, int? liveWeight, String? barImage, String? buyType, bool? wareHouse, String? date, int? wage, int? totalWageAmount, int? unionShare, int? unionSharePercent, int? companyShare, int? companySharePercent, int? guildsShare, int? guildsSharePercent, int? cityShare, int? citySharePercent, int? walletShare, int? walletSharePercent, int? otherShare, int? otherSharePercent, bool? archiveWage, int? weightLoss, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? enteredMessage, int? barCode, String? registerType, dynamic createdBy, dynamic modifiedBy, int? product) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseFreeBar():
|
||||
return $default(_that.id,_that.killHouse,_that.exclusiveKiller,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.poultryName,_that.poultryMobile,_that.sellerName,_that.sellerMobile,_that.province,_that.city,_that.vetFarmName,_that.vetFarmMobile,_that.driverName,_that.driverMobile,_that.car,_that.clearanceCode,_that.barClearanceCode,_that.quantity,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.killHouseVetQuantity,_that.killHouseVetWeight,_that.killHouseVetState,_that.dateOfAcceptReject,_that.acceptorRejector,_that.liveWeight,_that.barImage,_that.buyType,_that.wareHouse,_that.date,_that.wage,_that.totalWageAmount,_that.unionShare,_that.unionSharePercent,_that.companyShare,_that.companySharePercent,_that.guildsShare,_that.guildsSharePercent,_that.cityShare,_that.citySharePercent,_that.walletShare,_that.walletSharePercent,_that.otherShare,_that.otherSharePercent,_that.archiveWage,_that.weightLoss,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.enteredMessage,_that.barCode,_that.registerType,_that.createdBy,_that.modifiedBy,_that.product);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? id, dynamic killHouse, dynamic exclusiveKiller, String? key, String? createDate, String? modifyDate, bool? trash, String? poultryName, String? poultryMobile, String? sellerName, String? sellerMobile, String? province, String? city, String? vetFarmName, String? vetFarmMobile, String? driverName, String? driverMobile, String? car, String? clearanceCode, String? barClearanceCode, int? quantity, int? numberOfCarcasses, int? weightOfCarcasses, int? killHouseVetQuantity, int? killHouseVetWeight, String? killHouseVetState, String? dateOfAcceptReject, dynamic acceptorRejector, int? liveWeight, String? barImage, String? buyType, bool? wareHouse, String? date, int? wage, int? totalWageAmount, int? unionShare, int? unionSharePercent, int? companyShare, int? companySharePercent, int? guildsShare, int? guildsSharePercent, int? cityShare, int? citySharePercent, int? walletShare, int? walletSharePercent, int? otherShare, int? otherSharePercent, bool? archiveWage, int? weightLoss, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? enteredMessage, int? barCode, String? registerType, dynamic createdBy, dynamic modifiedBy, int? product)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseFreeBar() when $default != null:
|
||||
return $default(_that.id,_that.killHouse,_that.exclusiveKiller,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.poultryName,_that.poultryMobile,_that.sellerName,_that.sellerMobile,_that.province,_that.city,_that.vetFarmName,_that.vetFarmMobile,_that.driverName,_that.driverMobile,_that.car,_that.clearanceCode,_that.barClearanceCode,_that.quantity,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.killHouseVetQuantity,_that.killHouseVetWeight,_that.killHouseVetState,_that.dateOfAcceptReject,_that.acceptorRejector,_that.liveWeight,_that.barImage,_that.buyType,_that.wareHouse,_that.date,_that.wage,_that.totalWageAmount,_that.unionShare,_that.unionSharePercent,_that.companyShare,_that.companySharePercent,_that.guildsShare,_that.guildsSharePercent,_that.cityShare,_that.citySharePercent,_that.walletShare,_that.walletSharePercent,_that.otherShare,_that.otherSharePercent,_that.archiveWage,_that.weightLoss,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.enteredMessage,_that.barCode,_that.registerType,_that.createdBy,_that.modifiedBy,_that.product);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _KillHouseFreeBar implements KillHouseFreeBar {
|
||||
const _KillHouseFreeBar({this.id, this.killHouse, this.exclusiveKiller, this.key, this.createDate, this.modifyDate, this.trash, this.poultryName, this.poultryMobile, this.sellerName, this.sellerMobile, this.province, this.city, this.vetFarmName, this.vetFarmMobile, this.driverName, this.driverMobile, this.car, this.clearanceCode, this.barClearanceCode, this.quantity, this.numberOfCarcasses, this.weightOfCarcasses, this.killHouseVetQuantity, this.killHouseVetWeight, this.killHouseVetState, this.dateOfAcceptReject, this.acceptorRejector, this.liveWeight, this.barImage, this.buyType, this.wareHouse, this.date, this.wage, this.totalWageAmount, this.unionShare, this.unionSharePercent, this.companyShare, this.companySharePercent, this.guildsShare, this.guildsSharePercent, this.cityShare, this.citySharePercent, this.walletShare, this.walletSharePercent, this.otherShare, this.otherSharePercent, this.archiveWage, this.weightLoss, this.calculateStatus, this.temporaryTrash, this.temporaryDeleted, this.enteredMessage, this.barCode, this.registerType, this.createdBy, this.modifiedBy, this.product});
|
||||
factory _KillHouseFreeBar.fromJson(Map<String, dynamic> json) => _$KillHouseFreeBarFromJson(json);
|
||||
|
||||
@override final int? id;
|
||||
@override final dynamic killHouse;
|
||||
@override final dynamic exclusiveKiller;
|
||||
@override final String? key;
|
||||
@override final String? createDate;
|
||||
@override final String? modifyDate;
|
||||
@override final bool? trash;
|
||||
@override final String? poultryName;
|
||||
@override final String? poultryMobile;
|
||||
@override final String? sellerName;
|
||||
@override final String? sellerMobile;
|
||||
@override final String? province;
|
||||
@override final String? city;
|
||||
@override final String? vetFarmName;
|
||||
@override final String? vetFarmMobile;
|
||||
@override final String? driverName;
|
||||
@override final String? driverMobile;
|
||||
@override final String? car;
|
||||
@override final String? clearanceCode;
|
||||
@override final String? barClearanceCode;
|
||||
@override final int? quantity;
|
||||
@override final int? numberOfCarcasses;
|
||||
@override final int? weightOfCarcasses;
|
||||
@override final int? killHouseVetQuantity;
|
||||
@override final int? killHouseVetWeight;
|
||||
@override final String? killHouseVetState;
|
||||
@override final String? dateOfAcceptReject;
|
||||
@override final dynamic acceptorRejector;
|
||||
@override final int? liveWeight;
|
||||
@override final String? barImage;
|
||||
@override final String? buyType;
|
||||
@override final bool? wareHouse;
|
||||
@override final String? date;
|
||||
@override final int? wage;
|
||||
@override final int? totalWageAmount;
|
||||
@override final int? unionShare;
|
||||
@override final int? unionSharePercent;
|
||||
@override final int? companyShare;
|
||||
@override final int? companySharePercent;
|
||||
@override final int? guildsShare;
|
||||
@override final int? guildsSharePercent;
|
||||
@override final int? cityShare;
|
||||
@override final int? citySharePercent;
|
||||
@override final int? walletShare;
|
||||
@override final int? walletSharePercent;
|
||||
@override final int? otherShare;
|
||||
@override final int? otherSharePercent;
|
||||
@override final bool? archiveWage;
|
||||
@override final int? weightLoss;
|
||||
@override final bool? calculateStatus;
|
||||
@override final bool? temporaryTrash;
|
||||
@override final bool? temporaryDeleted;
|
||||
@override final String? enteredMessage;
|
||||
@override final int? barCode;
|
||||
@override final String? registerType;
|
||||
@override final dynamic createdBy;
|
||||
@override final dynamic modifiedBy;
|
||||
@override final int? product;
|
||||
|
||||
/// Create a copy of KillHouseFreeBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$KillHouseFreeBarCopyWith<_KillHouseFreeBar> get copyWith => __$KillHouseFreeBarCopyWithImpl<_KillHouseFreeBar>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$KillHouseFreeBarToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _KillHouseFreeBar&&(identical(other.id, id) || other.id == id)&&const DeepCollectionEquality().equals(other.killHouse, killHouse)&&const DeepCollectionEquality().equals(other.exclusiveKiller, exclusiveKiller)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.poultryName, poultryName) || other.poultryName == poultryName)&&(identical(other.poultryMobile, poultryMobile) || other.poultryMobile == poultryMobile)&&(identical(other.sellerName, sellerName) || other.sellerName == sellerName)&&(identical(other.sellerMobile, sellerMobile) || other.sellerMobile == sellerMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.vetFarmName, vetFarmName) || other.vetFarmName == vetFarmName)&&(identical(other.vetFarmMobile, vetFarmMobile) || other.vetFarmMobile == vetFarmMobile)&&(identical(other.driverName, driverName) || other.driverName == driverName)&&(identical(other.driverMobile, driverMobile) || other.driverMobile == driverMobile)&&(identical(other.car, car) || other.car == car)&&(identical(other.clearanceCode, clearanceCode) || other.clearanceCode == clearanceCode)&&(identical(other.barClearanceCode, barClearanceCode) || other.barClearanceCode == barClearanceCode)&&(identical(other.quantity, quantity) || other.quantity == quantity)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.killHouseVetQuantity, killHouseVetQuantity) || other.killHouseVetQuantity == killHouseVetQuantity)&&(identical(other.killHouseVetWeight, killHouseVetWeight) || other.killHouseVetWeight == killHouseVetWeight)&&(identical(other.killHouseVetState, killHouseVetState) || other.killHouseVetState == killHouseVetState)&&(identical(other.dateOfAcceptReject, dateOfAcceptReject) || other.dateOfAcceptReject == dateOfAcceptReject)&&const DeepCollectionEquality().equals(other.acceptorRejector, acceptorRejector)&&(identical(other.liveWeight, liveWeight) || other.liveWeight == liveWeight)&&(identical(other.barImage, barImage) || other.barImage == barImage)&&(identical(other.buyType, buyType) || other.buyType == buyType)&&(identical(other.wareHouse, wareHouse) || other.wareHouse == wareHouse)&&(identical(other.date, date) || other.date == date)&&(identical(other.wage, wage) || other.wage == wage)&&(identical(other.totalWageAmount, totalWageAmount) || other.totalWageAmount == totalWageAmount)&&(identical(other.unionShare, unionShare) || other.unionShare == unionShare)&&(identical(other.unionSharePercent, unionSharePercent) || other.unionSharePercent == unionSharePercent)&&(identical(other.companyShare, companyShare) || other.companyShare == companyShare)&&(identical(other.companySharePercent, companySharePercent) || other.companySharePercent == companySharePercent)&&(identical(other.guildsShare, guildsShare) || other.guildsShare == guildsShare)&&(identical(other.guildsSharePercent, guildsSharePercent) || other.guildsSharePercent == guildsSharePercent)&&(identical(other.cityShare, cityShare) || other.cityShare == cityShare)&&(identical(other.citySharePercent, citySharePercent) || other.citySharePercent == citySharePercent)&&(identical(other.walletShare, walletShare) || other.walletShare == walletShare)&&(identical(other.walletSharePercent, walletSharePercent) || other.walletSharePercent == walletSharePercent)&&(identical(other.otherShare, otherShare) || other.otherShare == otherShare)&&(identical(other.otherSharePercent, otherSharePercent) || other.otherSharePercent == otherSharePercent)&&(identical(other.archiveWage, archiveWage) || other.archiveWage == archiveWage)&&(identical(other.weightLoss, weightLoss) || other.weightLoss == weightLoss)&&(identical(other.calculateStatus, calculateStatus) || other.calculateStatus == calculateStatus)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&(identical(other.enteredMessage, enteredMessage) || other.enteredMessage == enteredMessage)&&(identical(other.barCode, barCode) || other.barCode == barCode)&&(identical(other.registerType, registerType) || other.registerType == registerType)&&const DeepCollectionEquality().equals(other.createdBy, createdBy)&&const DeepCollectionEquality().equals(other.modifiedBy, modifiedBy)&&(identical(other.product, product) || other.product == product));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hashAll([runtimeType,id,const DeepCollectionEquality().hash(killHouse),const DeepCollectionEquality().hash(exclusiveKiller),key,createDate,modifyDate,trash,poultryName,poultryMobile,sellerName,sellerMobile,province,city,vetFarmName,vetFarmMobile,driverName,driverMobile,car,clearanceCode,barClearanceCode,quantity,numberOfCarcasses,weightOfCarcasses,killHouseVetQuantity,killHouseVetWeight,killHouseVetState,dateOfAcceptReject,const DeepCollectionEquality().hash(acceptorRejector),liveWeight,barImage,buyType,wareHouse,date,wage,totalWageAmount,unionShare,unionSharePercent,companyShare,companySharePercent,guildsShare,guildsSharePercent,cityShare,citySharePercent,walletShare,walletSharePercent,otherShare,otherSharePercent,archiveWage,weightLoss,calculateStatus,temporaryTrash,temporaryDeleted,enteredMessage,barCode,registerType,const DeepCollectionEquality().hash(createdBy),const DeepCollectionEquality().hash(modifiedBy),product]);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'KillHouseFreeBar(id: $id, killHouse: $killHouse, exclusiveKiller: $exclusiveKiller, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, poultryName: $poultryName, poultryMobile: $poultryMobile, sellerName: $sellerName, sellerMobile: $sellerMobile, province: $province, city: $city, vetFarmName: $vetFarmName, vetFarmMobile: $vetFarmMobile, driverName: $driverName, driverMobile: $driverMobile, car: $car, clearanceCode: $clearanceCode, barClearanceCode: $barClearanceCode, quantity: $quantity, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, killHouseVetQuantity: $killHouseVetQuantity, killHouseVetWeight: $killHouseVetWeight, killHouseVetState: $killHouseVetState, dateOfAcceptReject: $dateOfAcceptReject, acceptorRejector: $acceptorRejector, liveWeight: $liveWeight, barImage: $barImage, buyType: $buyType, wareHouse: $wareHouse, date: $date, wage: $wage, totalWageAmount: $totalWageAmount, unionShare: $unionShare, unionSharePercent: $unionSharePercent, companyShare: $companyShare, companySharePercent: $companySharePercent, guildsShare: $guildsShare, guildsSharePercent: $guildsSharePercent, cityShare: $cityShare, citySharePercent: $citySharePercent, walletShare: $walletShare, walletSharePercent: $walletSharePercent, otherShare: $otherShare, otherSharePercent: $otherSharePercent, archiveWage: $archiveWage, weightLoss: $weightLoss, calculateStatus: $calculateStatus, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, enteredMessage: $enteredMessage, barCode: $barCode, registerType: $registerType, createdBy: $createdBy, modifiedBy: $modifiedBy, product: $product)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$KillHouseFreeBarCopyWith<$Res> implements $KillHouseFreeBarCopyWith<$Res> {
|
||||
factory _$KillHouseFreeBarCopyWith(_KillHouseFreeBar value, $Res Function(_KillHouseFreeBar) _then) = __$KillHouseFreeBarCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int? id, dynamic killHouse, dynamic exclusiveKiller, String? key, String? createDate, String? modifyDate, bool? trash, String? poultryName, String? poultryMobile, String? sellerName, String? sellerMobile, String? province, String? city, String? vetFarmName, String? vetFarmMobile, String? driverName, String? driverMobile, String? car, String? clearanceCode, String? barClearanceCode, int? quantity, int? numberOfCarcasses, int? weightOfCarcasses, int? killHouseVetQuantity, int? killHouseVetWeight, String? killHouseVetState, String? dateOfAcceptReject, dynamic acceptorRejector, int? liveWeight, String? barImage, String? buyType, bool? wareHouse, String? date, int? wage, int? totalWageAmount, int? unionShare, int? unionSharePercent, int? companyShare, int? companySharePercent, int? guildsShare, int? guildsSharePercent, int? cityShare, int? citySharePercent, int? walletShare, int? walletSharePercent, int? otherShare, int? otherSharePercent, bool? archiveWage, int? weightLoss, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? enteredMessage, int? barCode, String? registerType, dynamic createdBy, dynamic modifiedBy, int? product
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$KillHouseFreeBarCopyWithImpl<$Res>
|
||||
implements _$KillHouseFreeBarCopyWith<$Res> {
|
||||
__$KillHouseFreeBarCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _KillHouseFreeBar _self;
|
||||
final $Res Function(_KillHouseFreeBar) _then;
|
||||
|
||||
/// Create a copy of KillHouseFreeBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? killHouse = freezed,Object? exclusiveKiller = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? poultryName = freezed,Object? poultryMobile = freezed,Object? sellerName = freezed,Object? sellerMobile = freezed,Object? province = freezed,Object? city = freezed,Object? vetFarmName = freezed,Object? vetFarmMobile = freezed,Object? driverName = freezed,Object? driverMobile = freezed,Object? car = freezed,Object? clearanceCode = freezed,Object? barClearanceCode = freezed,Object? quantity = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? killHouseVetQuantity = freezed,Object? killHouseVetWeight = freezed,Object? killHouseVetState = freezed,Object? dateOfAcceptReject = freezed,Object? acceptorRejector = freezed,Object? liveWeight = freezed,Object? barImage = freezed,Object? buyType = freezed,Object? wareHouse = freezed,Object? date = freezed,Object? wage = freezed,Object? totalWageAmount = freezed,Object? unionShare = freezed,Object? unionSharePercent = freezed,Object? companyShare = freezed,Object? companySharePercent = freezed,Object? guildsShare = freezed,Object? guildsSharePercent = freezed,Object? cityShare = freezed,Object? citySharePercent = freezed,Object? walletShare = freezed,Object? walletSharePercent = freezed,Object? otherShare = freezed,Object? otherSharePercent = freezed,Object? archiveWage = freezed,Object? weightLoss = freezed,Object? calculateStatus = freezed,Object? temporaryTrash = freezed,Object? temporaryDeleted = freezed,Object? enteredMessage = freezed,Object? barCode = freezed,Object? registerType = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,Object? product = freezed,}) {
|
||||
return _then(_KillHouseFreeBar(
|
||||
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as int?,killHouse: freezed == killHouse ? _self.killHouse : killHouse // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,exclusiveKiller: freezed == exclusiveKiller ? _self.exclusiveKiller : exclusiveKiller // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,createDate: freezed == createDate ? _self.createDate : createDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,modifyDate: freezed == modifyDate ? _self.modifyDate : modifyDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,trash: freezed == trash ? _self.trash : trash // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,poultryName: freezed == poultryName ? _self.poultryName : poultryName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,poultryMobile: freezed == poultryMobile ? _self.poultryMobile : poultryMobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,sellerName: freezed == sellerName ? _self.sellerName : sellerName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,sellerMobile: freezed == sellerMobile ? _self.sellerMobile : sellerMobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
|
||||
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
|
||||
as String?,vetFarmName: freezed == vetFarmName ? _self.vetFarmName : vetFarmName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,vetFarmMobile: freezed == vetFarmMobile ? _self.vetFarmMobile : vetFarmMobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,driverName: freezed == driverName ? _self.driverName : driverName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,driverMobile: freezed == driverMobile ? _self.driverMobile : driverMobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,car: freezed == car ? _self.car : car // ignore: cast_nullable_to_non_nullable
|
||||
as String?,clearanceCode: freezed == clearanceCode ? _self.clearanceCode : clearanceCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,barClearanceCode: freezed == barClearanceCode ? _self.barClearanceCode : barClearanceCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,quantity: freezed == quantity ? _self.quantity : quantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,numberOfCarcasses: freezed == numberOfCarcasses ? _self.numberOfCarcasses : numberOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as int?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarcasses : weightOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as int?,killHouseVetQuantity: freezed == killHouseVetQuantity ? _self.killHouseVetQuantity : killHouseVetQuantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,killHouseVetWeight: freezed == killHouseVetWeight ? _self.killHouseVetWeight : killHouseVetWeight // ignore: cast_nullable_to_non_nullable
|
||||
as int?,killHouseVetState: freezed == killHouseVetState ? _self.killHouseVetState : killHouseVetState // ignore: cast_nullable_to_non_nullable
|
||||
as String?,dateOfAcceptReject: freezed == dateOfAcceptReject ? _self.dateOfAcceptReject : dateOfAcceptReject // ignore: cast_nullable_to_non_nullable
|
||||
as String?,acceptorRejector: freezed == acceptorRejector ? _self.acceptorRejector : acceptorRejector // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,liveWeight: freezed == liveWeight ? _self.liveWeight : liveWeight // ignore: cast_nullable_to_non_nullable
|
||||
as int?,barImage: freezed == barImage ? _self.barImage : barImage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,buyType: freezed == buyType ? _self.buyType : buyType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,wareHouse: freezed == wareHouse ? _self.wareHouse : wareHouse // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,wage: freezed == wage ? _self.wage : wage // ignore: cast_nullable_to_non_nullable
|
||||
as int?,totalWageAmount: freezed == totalWageAmount ? _self.totalWageAmount : totalWageAmount // ignore: cast_nullable_to_non_nullable
|
||||
as int?,unionShare: freezed == unionShare ? _self.unionShare : unionShare // ignore: cast_nullable_to_non_nullable
|
||||
as int?,unionSharePercent: freezed == unionSharePercent ? _self.unionSharePercent : unionSharePercent // ignore: cast_nullable_to_non_nullable
|
||||
as int?,companyShare: freezed == companyShare ? _self.companyShare : companyShare // ignore: cast_nullable_to_non_nullable
|
||||
as int?,companySharePercent: freezed == companySharePercent ? _self.companySharePercent : companySharePercent // ignore: cast_nullable_to_non_nullable
|
||||
as int?,guildsShare: freezed == guildsShare ? _self.guildsShare : guildsShare // ignore: cast_nullable_to_non_nullable
|
||||
as int?,guildsSharePercent: freezed == guildsSharePercent ? _self.guildsSharePercent : guildsSharePercent // ignore: cast_nullable_to_non_nullable
|
||||
as int?,cityShare: freezed == cityShare ? _self.cityShare : cityShare // ignore: cast_nullable_to_non_nullable
|
||||
as int?,citySharePercent: freezed == citySharePercent ? _self.citySharePercent : citySharePercent // ignore: cast_nullable_to_non_nullable
|
||||
as int?,walletShare: freezed == walletShare ? _self.walletShare : walletShare // ignore: cast_nullable_to_non_nullable
|
||||
as int?,walletSharePercent: freezed == walletSharePercent ? _self.walletSharePercent : walletSharePercent // ignore: cast_nullable_to_non_nullable
|
||||
as int?,otherShare: freezed == otherShare ? _self.otherShare : otherShare // ignore: cast_nullable_to_non_nullable
|
||||
as int?,otherSharePercent: freezed == otherSharePercent ? _self.otherSharePercent : otherSharePercent // ignore: cast_nullable_to_non_nullable
|
||||
as int?,archiveWage: freezed == archiveWage ? _self.archiveWage : archiveWage // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,weightLoss: freezed == weightLoss ? _self.weightLoss : weightLoss // ignore: cast_nullable_to_non_nullable
|
||||
as int?,calculateStatus: freezed == calculateStatus ? _self.calculateStatus : calculateStatus // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,temporaryTrash: freezed == temporaryTrash ? _self.temporaryTrash : temporaryTrash // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,temporaryDeleted: freezed == temporaryDeleted ? _self.temporaryDeleted : temporaryDeleted // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,enteredMessage: freezed == enteredMessage ? _self.enteredMessage : enteredMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,barCode: freezed == barCode ? _self.barCode : barCode // ignore: cast_nullable_to_non_nullable
|
||||
as int?,registerType: freezed == registerType ? _self.registerType : registerType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,createdBy: freezed == createdBy ? _self.createdBy : createdBy // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,modifiedBy: freezed == modifiedBy ? _self.modifiedBy : modifiedBy // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,131 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'kill_house_free_bar.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_KillHouseFreeBar _$KillHouseFreeBarFromJson(Map<String, dynamic> json) =>
|
||||
_KillHouseFreeBar(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
killHouse: json['kill_house'],
|
||||
exclusiveKiller: json['exclusive_killer'],
|
||||
key: json['key'] as String?,
|
||||
createDate: json['create_date'] as String?,
|
||||
modifyDate: json['modify_date'] as String?,
|
||||
trash: json['trash'] as bool?,
|
||||
poultryName: json['poultry_name'] as String?,
|
||||
poultryMobile: json['poultry_mobile'] as String?,
|
||||
sellerName: json['seller_name'] as String?,
|
||||
sellerMobile: json['seller_mobile'] as String?,
|
||||
province: json['province'] as String?,
|
||||
city: json['city'] as String?,
|
||||
vetFarmName: json['vet_farm_name'] as String?,
|
||||
vetFarmMobile: json['vet_farm_mobile'] as String?,
|
||||
driverName: json['driver_name'] as String?,
|
||||
driverMobile: json['driver_mobile'] as String?,
|
||||
car: json['car'] as String?,
|
||||
clearanceCode: json['clearance_code'] as String?,
|
||||
barClearanceCode: json['bar_clearance_code'] as String?,
|
||||
quantity: (json['quantity'] as num?)?.toInt(),
|
||||
numberOfCarcasses: (json['number_of_carcasses'] as num?)?.toInt(),
|
||||
weightOfCarcasses: (json['weight_of_carcasses'] as num?)?.toInt(),
|
||||
killHouseVetQuantity: (json['kill_house_vet_quantity'] as num?)?.toInt(),
|
||||
killHouseVetWeight: (json['kill_house_vet_weight'] as num?)?.toInt(),
|
||||
killHouseVetState: json['kill_house_vet_state'] as String?,
|
||||
dateOfAcceptReject: json['date_of_accept_reject'] as String?,
|
||||
acceptorRejector: json['acceptor_rejector'],
|
||||
liveWeight: (json['live_weight'] as num?)?.toInt(),
|
||||
barImage: json['bar_image'] as String?,
|
||||
buyType: json['buy_type'] as String?,
|
||||
wareHouse: json['ware_house'] as bool?,
|
||||
date: json['date'] as String?,
|
||||
wage: (json['wage'] as num?)?.toInt(),
|
||||
totalWageAmount: (json['total_wage_amount'] as num?)?.toInt(),
|
||||
unionShare: (json['union_share'] as num?)?.toInt(),
|
||||
unionSharePercent: (json['union_share_percent'] as num?)?.toInt(),
|
||||
companyShare: (json['company_share'] as num?)?.toInt(),
|
||||
companySharePercent: (json['company_share_percent'] as num?)?.toInt(),
|
||||
guildsShare: (json['guilds_share'] as num?)?.toInt(),
|
||||
guildsSharePercent: (json['guilds_share_percent'] as num?)?.toInt(),
|
||||
cityShare: (json['city_share'] as num?)?.toInt(),
|
||||
citySharePercent: (json['city_share_percent'] as num?)?.toInt(),
|
||||
walletShare: (json['wallet_share'] as num?)?.toInt(),
|
||||
walletSharePercent: (json['wallet_share_percent'] as num?)?.toInt(),
|
||||
otherShare: (json['other_share'] as num?)?.toInt(),
|
||||
otherSharePercent: (json['other_share_percent'] as num?)?.toInt(),
|
||||
archiveWage: json['archive_wage'] as bool?,
|
||||
weightLoss: (json['weight_loss'] as num?)?.toInt(),
|
||||
calculateStatus: json['calculate_status'] as bool?,
|
||||
temporaryTrash: json['temporary_trash'] as bool?,
|
||||
temporaryDeleted: json['temporary_deleted'] as bool?,
|
||||
enteredMessage: json['entered_message'] as String?,
|
||||
barCode: (json['bar_code'] as num?)?.toInt(),
|
||||
registerType: json['register_type'] as String?,
|
||||
createdBy: json['created_by'],
|
||||
modifiedBy: json['modified_by'],
|
||||
product: (json['product'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillHouseFreeBarToJson(_KillHouseFreeBar instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'kill_house': instance.killHouse,
|
||||
'exclusive_killer': instance.exclusiveKiller,
|
||||
'key': instance.key,
|
||||
'create_date': instance.createDate,
|
||||
'modify_date': instance.modifyDate,
|
||||
'trash': instance.trash,
|
||||
'poultry_name': instance.poultryName,
|
||||
'poultry_mobile': instance.poultryMobile,
|
||||
'seller_name': instance.sellerName,
|
||||
'seller_mobile': instance.sellerMobile,
|
||||
'province': instance.province,
|
||||
'city': instance.city,
|
||||
'vet_farm_name': instance.vetFarmName,
|
||||
'vet_farm_mobile': instance.vetFarmMobile,
|
||||
'driver_name': instance.driverName,
|
||||
'driver_mobile': instance.driverMobile,
|
||||
'car': instance.car,
|
||||
'clearance_code': instance.clearanceCode,
|
||||
'bar_clearance_code': instance.barClearanceCode,
|
||||
'quantity': instance.quantity,
|
||||
'number_of_carcasses': instance.numberOfCarcasses,
|
||||
'weight_of_carcasses': instance.weightOfCarcasses,
|
||||
'kill_house_vet_quantity': instance.killHouseVetQuantity,
|
||||
'kill_house_vet_weight': instance.killHouseVetWeight,
|
||||
'kill_house_vet_state': instance.killHouseVetState,
|
||||
'date_of_accept_reject': instance.dateOfAcceptReject,
|
||||
'acceptor_rejector': instance.acceptorRejector,
|
||||
'live_weight': instance.liveWeight,
|
||||
'bar_image': instance.barImage,
|
||||
'buy_type': instance.buyType,
|
||||
'ware_house': instance.wareHouse,
|
||||
'date': instance.date,
|
||||
'wage': instance.wage,
|
||||
'total_wage_amount': instance.totalWageAmount,
|
||||
'union_share': instance.unionShare,
|
||||
'union_share_percent': instance.unionSharePercent,
|
||||
'company_share': instance.companyShare,
|
||||
'company_share_percent': instance.companySharePercent,
|
||||
'guilds_share': instance.guildsShare,
|
||||
'guilds_share_percent': instance.guildsSharePercent,
|
||||
'city_share': instance.cityShare,
|
||||
'city_share_percent': instance.citySharePercent,
|
||||
'wallet_share': instance.walletShare,
|
||||
'wallet_share_percent': instance.walletSharePercent,
|
||||
'other_share': instance.otherShare,
|
||||
'other_share_percent': instance.otherSharePercent,
|
||||
'archive_wage': instance.archiveWage,
|
||||
'weight_loss': instance.weightLoss,
|
||||
'calculate_status': instance.calculateStatus,
|
||||
'temporary_trash': instance.temporaryTrash,
|
||||
'temporary_deleted': instance.temporaryDeleted,
|
||||
'entered_message': instance.enteredMessage,
|
||||
'bar_code': instance.barCode,
|
||||
'register_type': instance.registerType,
|
||||
'created_by': instance.createdBy,
|
||||
'modified_by': instance.modifiedBy,
|
||||
'product': instance.product,
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'roles_products.freezed.dart';
|
||||
part 'roles_products.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class RolesProductsModel with _$RolesProductsModel {
|
||||
factory RolesProductsModel({required List<ProductModel> products}) =
|
||||
_RolesProductsModel;
|
||||
|
||||
factory RolesProductsModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$RolesProductsModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ProductModel with _$ProductModel {
|
||||
factory ProductModel({
|
||||
int? id,
|
||||
String? key,
|
||||
String? create_date, // Changed from createDate, removed @JsonKey
|
||||
String? modify_date, // Changed from modifyDate, removed @JsonKey
|
||||
bool? trash,
|
||||
String? name,
|
||||
int? provinceGovernmentalCarcassesQuantity,
|
||||
int? provinceGovernmentalCarcassesWeight,
|
||||
int? provinceFreeCarcassesQuantity,
|
||||
int? provinceFreeCarcassesWeight,
|
||||
int? receiveGovernmentalCarcassesQuantity,
|
||||
int? receiveGovernmentalCarcassesWeight,
|
||||
int? receiveFreeCarcassesQuantity,
|
||||
int? receiveFreeCarcassesWeight,
|
||||
int? freeBuyingCarcassesQuantity,
|
||||
int? freeBuyingCarcassesWeight,
|
||||
int? totalGovernmentalCarcassesQuantity,
|
||||
int? totalGovernmentalCarcassesWeight,
|
||||
int? totalFreeBarsCarcassesQuantity,
|
||||
int? totalFreeBarsCarcassesWeight,
|
||||
int? totalFreeRemainWeight,
|
||||
int? totalGovernmentalRemainWeight,
|
||||
double? weightAverage,
|
||||
int? totalCarcassesQuantity,
|
||||
int? totalCarcassesWeight,
|
||||
int? freezingQuantity,
|
||||
int? freezingWeight,
|
||||
int? lossWeight,
|
||||
int? outProvinceAllocatedQuantity,
|
||||
int? outProvinceAllocatedWeight,
|
||||
int? provinceAllocatedQuantity,
|
||||
int? provinceAllocatedWeight,
|
||||
int? realAllocatedQuantity,
|
||||
int? realAllocatedWeight,
|
||||
int? coldHouseAllocatedWeight,
|
||||
int? posAllocatedWeight,
|
||||
int? segmentationWeight,
|
||||
int? totalRemainQuantity,
|
||||
int? totalRemainWeight,
|
||||
int? freePrice,
|
||||
int? approvedPrice,
|
||||
bool? approvedPriceStatus,
|
||||
dynamic createdBy,
|
||||
dynamic modifiedBy,
|
||||
int? parentProduct,
|
||||
dynamic killHouse,
|
||||
int? guild,
|
||||
}) = _ProductModel;
|
||||
|
||||
factory ProductModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$ProductModelFromJson(json);
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,146 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'roles_products.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_RolesProductsModel _$RolesProductsModelFromJson(Map<String, dynamic> json) =>
|
||||
_RolesProductsModel(
|
||||
products: (json['products'] as List<dynamic>)
|
||||
.map((e) => ProductModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$RolesProductsModelToJson(_RolesProductsModel instance) =>
|
||||
<String, dynamic>{'products': instance.products};
|
||||
|
||||
_ProductModel _$ProductModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _ProductModel(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
key: json['key'] as String?,
|
||||
create_date: json['create_date'] as String?,
|
||||
modify_date: json['modify_date'] as String?,
|
||||
trash: json['trash'] as bool?,
|
||||
name: json['name'] as String?,
|
||||
provinceGovernmentalCarcassesQuantity:
|
||||
(json['province_governmental_carcasses_quantity'] as num?)?.toInt(),
|
||||
provinceGovernmentalCarcassesWeight:
|
||||
(json['province_governmental_carcasses_weight'] as num?)?.toInt(),
|
||||
provinceFreeCarcassesQuantity:
|
||||
(json['province_free_carcasses_quantity'] as num?)?.toInt(),
|
||||
provinceFreeCarcassesWeight: (json['province_free_carcasses_weight'] as num?)
|
||||
?.toInt(),
|
||||
receiveGovernmentalCarcassesQuantity:
|
||||
(json['receive_governmental_carcasses_quantity'] as num?)?.toInt(),
|
||||
receiveGovernmentalCarcassesWeight:
|
||||
(json['receive_governmental_carcasses_weight'] as num?)?.toInt(),
|
||||
receiveFreeCarcassesQuantity:
|
||||
(json['receive_free_carcasses_quantity'] as num?)?.toInt(),
|
||||
receiveFreeCarcassesWeight: (json['receive_free_carcasses_weight'] as num?)
|
||||
?.toInt(),
|
||||
freeBuyingCarcassesQuantity: (json['free_buying_carcasses_quantity'] as num?)
|
||||
?.toInt(),
|
||||
freeBuyingCarcassesWeight: (json['free_buying_carcasses_weight'] as num?)
|
||||
?.toInt(),
|
||||
totalGovernmentalCarcassesQuantity:
|
||||
(json['total_governmental_carcasses_quantity'] as num?)?.toInt(),
|
||||
totalGovernmentalCarcassesWeight:
|
||||
(json['total_governmental_carcasses_weight'] as num?)?.toInt(),
|
||||
totalFreeBarsCarcassesQuantity:
|
||||
(json['total_free_bars_carcasses_quantity'] as num?)?.toInt(),
|
||||
totalFreeBarsCarcassesWeight:
|
||||
(json['total_free_bars_carcasses_weight'] as num?)?.toInt(),
|
||||
totalFreeRemainWeight: (json['total_free_remain_weight'] as num?)?.toInt(),
|
||||
totalGovernmentalRemainWeight:
|
||||
(json['total_governmental_remain_weight'] as num?)?.toInt(),
|
||||
weightAverage: (json['weight_average'] as num?)?.toDouble(),
|
||||
totalCarcassesQuantity: (json['total_carcasses_quantity'] as num?)?.toInt(),
|
||||
totalCarcassesWeight: (json['total_carcasses_weight'] as num?)?.toInt(),
|
||||
freezingQuantity: (json['freezing_quantity'] as num?)?.toInt(),
|
||||
freezingWeight: (json['freezing_weight'] as num?)?.toInt(),
|
||||
lossWeight: (json['loss_weight'] as num?)?.toInt(),
|
||||
outProvinceAllocatedQuantity:
|
||||
(json['out_province_allocated_quantity'] as num?)?.toInt(),
|
||||
outProvinceAllocatedWeight: (json['out_province_allocated_weight'] as num?)
|
||||
?.toInt(),
|
||||
provinceAllocatedQuantity: (json['province_allocated_quantity'] as num?)
|
||||
?.toInt(),
|
||||
provinceAllocatedWeight: (json['province_allocated_weight'] as num?)?.toInt(),
|
||||
realAllocatedQuantity: (json['real_allocated_quantity'] as num?)?.toInt(),
|
||||
realAllocatedWeight: (json['real_allocated_weight'] as num?)?.toInt(),
|
||||
coldHouseAllocatedWeight: (json['cold_house_allocated_weight'] as num?)
|
||||
?.toInt(),
|
||||
posAllocatedWeight: (json['pos_allocated_weight'] as num?)?.toInt(),
|
||||
segmentationWeight: (json['segmentation_weight'] as num?)?.toInt(),
|
||||
totalRemainQuantity: (json['total_remain_quantity'] as num?)?.toInt(),
|
||||
totalRemainWeight: (json['total_remain_weight'] as num?)?.toInt(),
|
||||
freePrice: (json['free_price'] as num?)?.toInt(),
|
||||
approvedPrice: (json['approved_price'] as num?)?.toInt(),
|
||||
approvedPriceStatus: json['approved_price_status'] as bool?,
|
||||
createdBy: json['created_by'],
|
||||
modifiedBy: json['modified_by'],
|
||||
parentProduct: (json['parent_product'] as num?)?.toInt(),
|
||||
killHouse: json['kill_house'],
|
||||
guild: (json['guild'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ProductModelToJson(
|
||||
_ProductModel instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'key': instance.key,
|
||||
'create_date': instance.create_date,
|
||||
'modify_date': instance.modify_date,
|
||||
'trash': instance.trash,
|
||||
'name': instance.name,
|
||||
'province_governmental_carcasses_quantity':
|
||||
instance.provinceGovernmentalCarcassesQuantity,
|
||||
'province_governmental_carcasses_weight':
|
||||
instance.provinceGovernmentalCarcassesWeight,
|
||||
'province_free_carcasses_quantity': instance.provinceFreeCarcassesQuantity,
|
||||
'province_free_carcasses_weight': instance.provinceFreeCarcassesWeight,
|
||||
'receive_governmental_carcasses_quantity':
|
||||
instance.receiveGovernmentalCarcassesQuantity,
|
||||
'receive_governmental_carcasses_weight':
|
||||
instance.receiveGovernmentalCarcassesWeight,
|
||||
'receive_free_carcasses_quantity': instance.receiveFreeCarcassesQuantity,
|
||||
'receive_free_carcasses_weight': instance.receiveFreeCarcassesWeight,
|
||||
'free_buying_carcasses_quantity': instance.freeBuyingCarcassesQuantity,
|
||||
'free_buying_carcasses_weight': instance.freeBuyingCarcassesWeight,
|
||||
'total_governmental_carcasses_quantity':
|
||||
instance.totalGovernmentalCarcassesQuantity,
|
||||
'total_governmental_carcasses_weight':
|
||||
instance.totalGovernmentalCarcassesWeight,
|
||||
'total_free_bars_carcasses_quantity': instance.totalFreeBarsCarcassesQuantity,
|
||||
'total_free_bars_carcasses_weight': instance.totalFreeBarsCarcassesWeight,
|
||||
'total_free_remain_weight': instance.totalFreeRemainWeight,
|
||||
'total_governmental_remain_weight': instance.totalGovernmentalRemainWeight,
|
||||
'weight_average': instance.weightAverage,
|
||||
'total_carcasses_quantity': instance.totalCarcassesQuantity,
|
||||
'total_carcasses_weight': instance.totalCarcassesWeight,
|
||||
'freezing_quantity': instance.freezingQuantity,
|
||||
'freezing_weight': instance.freezingWeight,
|
||||
'loss_weight': instance.lossWeight,
|
||||
'out_province_allocated_quantity': instance.outProvinceAllocatedQuantity,
|
||||
'out_province_allocated_weight': instance.outProvinceAllocatedWeight,
|
||||
'province_allocated_quantity': instance.provinceAllocatedQuantity,
|
||||
'province_allocated_weight': instance.provinceAllocatedWeight,
|
||||
'real_allocated_quantity': instance.realAllocatedQuantity,
|
||||
'real_allocated_weight': instance.realAllocatedWeight,
|
||||
'cold_house_allocated_weight': instance.coldHouseAllocatedWeight,
|
||||
'pos_allocated_weight': instance.posAllocatedWeight,
|
||||
'segmentation_weight': instance.segmentationWeight,
|
||||
'total_remain_quantity': instance.totalRemainQuantity,
|
||||
'total_remain_weight': instance.totalRemainWeight,
|
||||
'free_price': instance.freePrice,
|
||||
'approved_price': instance.approvedPrice,
|
||||
'approved_price_status': instance.approvedPriceStatus,
|
||||
'created_by': instance.createdBy,
|
||||
'modified_by': instance.modifiedBy,
|
||||
'parent_product': instance.parentProduct,
|
||||
'kill_house': instance.killHouse,
|
||||
'guild': instance.guild,
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
part 'user_info_model.freezed.dart';
|
||||
|
||||
part 'user_info_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class UserInfoModel with _$UserInfoModel {
|
||||
const factory UserInfoModel({
|
||||
bool? isUser,
|
||||
String? address,
|
||||
String? backend,
|
||||
String? apiKey,
|
||||
}) = _UserInfoModel ;
|
||||
|
||||
factory UserInfoModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$UserInfoModelFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,286 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// 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 'user_info_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$UserInfoModel {
|
||||
|
||||
bool? get isUser; String? get address; String? get backend; String? get apiKey;
|
||||
/// Create a copy of UserInfoModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$UserInfoModelCopyWith<UserInfoModel> get copyWith => _$UserInfoModelCopyWithImpl<UserInfoModel>(this as UserInfoModel, _$identity);
|
||||
|
||||
/// Serializes this UserInfoModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is UserInfoModel&&(identical(other.isUser, isUser) || other.isUser == isUser)&&(identical(other.address, address) || other.address == address)&&(identical(other.backend, backend) || other.backend == backend)&&(identical(other.apiKey, apiKey) || other.apiKey == apiKey));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,isUser,address,backend,apiKey);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UserInfoModel(isUser: $isUser, address: $address, backend: $backend, apiKey: $apiKey)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $UserInfoModelCopyWith<$Res> {
|
||||
factory $UserInfoModelCopyWith(UserInfoModel value, $Res Function(UserInfoModel) _then) = _$UserInfoModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
bool? isUser, String? address, String? backend, String? apiKey
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$UserInfoModelCopyWithImpl<$Res>
|
||||
implements $UserInfoModelCopyWith<$Res> {
|
||||
_$UserInfoModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final UserInfoModel _self;
|
||||
final $Res Function(UserInfoModel) _then;
|
||||
|
||||
/// Create a copy of UserInfoModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? isUser = freezed,Object? address = freezed,Object? backend = freezed,Object? apiKey = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
isUser: freezed == isUser ? _self.isUser : isUser // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
|
||||
as String?,backend: freezed == backend ? _self.backend : backend // ignore: cast_nullable_to_non_nullable
|
||||
as String?,apiKey: freezed == apiKey ? _self.apiKey : apiKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [UserInfoModel].
|
||||
extension UserInfoModelPatterns on UserInfoModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _UserInfoModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _UserInfoModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _UserInfoModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _UserInfoModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _UserInfoModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _UserInfoModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool? isUser, String? address, String? backend, String? apiKey)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UserInfoModel() when $default != null:
|
||||
return $default(_that.isUser,_that.address,_that.backend,_that.apiKey);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool? isUser, String? address, String? backend, String? apiKey) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UserInfoModel():
|
||||
return $default(_that.isUser,_that.address,_that.backend,_that.apiKey);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool? isUser, String? address, String? backend, String? apiKey)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UserInfoModel() when $default != null:
|
||||
return $default(_that.isUser,_that.address,_that.backend,_that.apiKey);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _UserInfoModel implements UserInfoModel {
|
||||
const _UserInfoModel({this.isUser, this.address, this.backend, this.apiKey});
|
||||
factory _UserInfoModel.fromJson(Map<String, dynamic> json) => _$UserInfoModelFromJson(json);
|
||||
|
||||
@override final bool? isUser;
|
||||
@override final String? address;
|
||||
@override final String? backend;
|
||||
@override final String? apiKey;
|
||||
|
||||
/// Create a copy of UserInfoModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$UserInfoModelCopyWith<_UserInfoModel> get copyWith => __$UserInfoModelCopyWithImpl<_UserInfoModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$UserInfoModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _UserInfoModel&&(identical(other.isUser, isUser) || other.isUser == isUser)&&(identical(other.address, address) || other.address == address)&&(identical(other.backend, backend) || other.backend == backend)&&(identical(other.apiKey, apiKey) || other.apiKey == apiKey));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,isUser,address,backend,apiKey);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UserInfoModel(isUser: $isUser, address: $address, backend: $backend, apiKey: $apiKey)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$UserInfoModelCopyWith<$Res> implements $UserInfoModelCopyWith<$Res> {
|
||||
factory _$UserInfoModelCopyWith(_UserInfoModel value, $Res Function(_UserInfoModel) _then) = __$UserInfoModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
bool? isUser, String? address, String? backend, String? apiKey
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$UserInfoModelCopyWithImpl<$Res>
|
||||
implements _$UserInfoModelCopyWith<$Res> {
|
||||
__$UserInfoModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _UserInfoModel _self;
|
||||
final $Res Function(_UserInfoModel) _then;
|
||||
|
||||
/// Create a copy of UserInfoModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? isUser = freezed,Object? address = freezed,Object? backend = freezed,Object? apiKey = freezed,}) {
|
||||
return _then(_UserInfoModel(
|
||||
isUser: freezed == isUser ? _self.isUser : isUser // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
|
||||
as String?,backend: freezed == backend ? _self.backend : backend // ignore: cast_nullable_to_non_nullable
|
||||
as String?,apiKey: freezed == apiKey ? _self.apiKey : apiKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,23 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'user_info_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_UserInfoModel _$UserInfoModelFromJson(Map<String, dynamic> json) =>
|
||||
_UserInfoModel(
|
||||
isUser: json['is_user'] as bool?,
|
||||
address: json['address'] as String?,
|
||||
backend: json['backend'] as String?,
|
||||
apiKey: json['api_key'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserInfoModelToJson(_UserInfoModel instance) =>
|
||||
<String, dynamic>{
|
||||
'is_user': instance.isUser,
|
||||
'address': instance.address,
|
||||
'backend': instance.backend,
|
||||
'api_key': instance.apiKey,
|
||||
};
|
||||
@@ -0,0 +1,65 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'user_profile.freezed.dart';
|
||||
part 'user_profile.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class UserProfile with _$UserProfile {
|
||||
const factory UserProfile({
|
||||
List<String>? role,
|
||||
String? city,
|
||||
String? province,
|
||||
String? key,
|
||||
String? userGateWayId,
|
||||
dynamic userDjangoIdForeignKey,
|
||||
dynamic provinceIdForeignKey,
|
||||
dynamic cityIdForeignKey,
|
||||
dynamic systemUserProfileIdKey,
|
||||
String? fullname,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
String? nationalCode,
|
||||
String? nationalCodeImage,
|
||||
String? nationalId,
|
||||
String? mobile,
|
||||
String? birthday,
|
||||
String? image,
|
||||
String? password,
|
||||
bool? active,
|
||||
UserState? state,
|
||||
int? baseOrder,
|
||||
int? cityNumber,
|
||||
String? cityName,
|
||||
int? provinceNumber,
|
||||
String? provinceName,
|
||||
String? unitName,
|
||||
String? unitNationalId,
|
||||
String? unitRegistrationNumber,
|
||||
String? unitEconomicalNumber,
|
||||
String? unitProvince,
|
||||
String? unitCity,
|
||||
String? unitPostalCode,
|
||||
String? unitAddress,
|
||||
String? personType,
|
||||
String? type,
|
||||
}) = _UserProfile;
|
||||
|
||||
factory UserProfile.fromJson(Map<String, dynamic> json) => _$UserProfileFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class UserState with _$UserState {
|
||||
const factory UserState({
|
||||
String? city,
|
||||
String? image,
|
||||
String? mobile,
|
||||
String? birthday,
|
||||
String? province,
|
||||
String? lastName,
|
||||
String? firstName,
|
||||
String? nationalId,
|
||||
String? nationalCode,
|
||||
}) = _UserState;
|
||||
|
||||
factory UserState.fromJson(Map<String, dynamic> json) => _$UserStateFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,701 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// 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 'user_profile.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$UserProfile {
|
||||
|
||||
List<String>? get role; String? get city; String? get province; String? get key; String? get userGateWayId; dynamic get userDjangoIdForeignKey; dynamic get provinceIdForeignKey; dynamic get cityIdForeignKey; dynamic get systemUserProfileIdKey; String? get fullname; String? get firstName; String? get lastName; String? get nationalCode; String? get nationalCodeImage; String? get nationalId; String? get mobile; String? get birthday; String? get image; String? get password; bool? get active; UserState? get state; int? get baseOrder; int? get cityNumber; String? get cityName; int? get provinceNumber; String? get provinceName; String? get unitName; String? get unitNationalId; String? get unitRegistrationNumber; String? get unitEconomicalNumber; String? get unitProvince; String? get unitCity; String? get unitPostalCode; String? get unitAddress; String? get personType; String? get type;
|
||||
/// Create a copy of UserProfile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$UserProfileCopyWith<UserProfile> get copyWith => _$UserProfileCopyWithImpl<UserProfile>(this as UserProfile, _$identity);
|
||||
|
||||
/// Serializes this UserProfile to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is UserProfile&&const DeepCollectionEquality().equals(other.role, role)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)&&(identical(other.key, key) || other.key == key)&&(identical(other.userGateWayId, userGateWayId) || other.userGateWayId == userGateWayId)&&const DeepCollectionEquality().equals(other.userDjangoIdForeignKey, userDjangoIdForeignKey)&&const DeepCollectionEquality().equals(other.provinceIdForeignKey, provinceIdForeignKey)&&const DeepCollectionEquality().equals(other.cityIdForeignKey, cityIdForeignKey)&&const DeepCollectionEquality().equals(other.systemUserProfileIdKey, systemUserProfileIdKey)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode)&&(identical(other.nationalCodeImage, nationalCodeImage) || other.nationalCodeImage == nationalCodeImage)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.image, image) || other.image == image)&&(identical(other.password, password) || other.password == password)&&(identical(other.active, active) || other.active == active)&&(identical(other.state, state) || other.state == state)&&(identical(other.baseOrder, baseOrder) || other.baseOrder == baseOrder)&&(identical(other.cityNumber, cityNumber) || other.cityNumber == cityNumber)&&(identical(other.cityName, cityName) || other.cityName == cityName)&&(identical(other.provinceNumber, provinceNumber) || other.provinceNumber == provinceNumber)&&(identical(other.provinceName, provinceName) || other.provinceName == provinceName)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.unitNationalId, unitNationalId) || other.unitNationalId == unitNationalId)&&(identical(other.unitRegistrationNumber, unitRegistrationNumber) || other.unitRegistrationNumber == unitRegistrationNumber)&&(identical(other.unitEconomicalNumber, unitEconomicalNumber) || other.unitEconomicalNumber == unitEconomicalNumber)&&(identical(other.unitProvince, unitProvince) || other.unitProvince == unitProvince)&&(identical(other.unitCity, unitCity) || other.unitCity == unitCity)&&(identical(other.unitPostalCode, unitPostalCode) || other.unitPostalCode == unitPostalCode)&&(identical(other.unitAddress, unitAddress) || other.unitAddress == unitAddress)&&(identical(other.personType, personType) || other.personType == personType)&&(identical(other.type, type) || other.type == type));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hashAll([runtimeType,const DeepCollectionEquality().hash(role),city,province,key,userGateWayId,const DeepCollectionEquality().hash(userDjangoIdForeignKey),const DeepCollectionEquality().hash(provinceIdForeignKey),const DeepCollectionEquality().hash(cityIdForeignKey),const DeepCollectionEquality().hash(systemUserProfileIdKey),fullname,firstName,lastName,nationalCode,nationalCodeImage,nationalId,mobile,birthday,image,password,active,state,baseOrder,cityNumber,cityName,provinceNumber,provinceName,unitName,unitNationalId,unitRegistrationNumber,unitEconomicalNumber,unitProvince,unitCity,unitPostalCode,unitAddress,personType,type]);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UserProfile(role: $role, city: $city, province: $province, key: $key, userGateWayId: $userGateWayId, userDjangoIdForeignKey: $userDjangoIdForeignKey, provinceIdForeignKey: $provinceIdForeignKey, cityIdForeignKey: $cityIdForeignKey, systemUserProfileIdKey: $systemUserProfileIdKey, fullname: $fullname, firstName: $firstName, lastName: $lastName, nationalCode: $nationalCode, nationalCodeImage: $nationalCodeImage, nationalId: $nationalId, mobile: $mobile, birthday: $birthday, image: $image, password: $password, active: $active, state: $state, baseOrder: $baseOrder, cityNumber: $cityNumber, cityName: $cityName, provinceNumber: $provinceNumber, provinceName: $provinceName, unitName: $unitName, unitNationalId: $unitNationalId, unitRegistrationNumber: $unitRegistrationNumber, unitEconomicalNumber: $unitEconomicalNumber, unitProvince: $unitProvince, unitCity: $unitCity, unitPostalCode: $unitPostalCode, unitAddress: $unitAddress, personType: $personType, type: $type)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $UserProfileCopyWith<$Res> {
|
||||
factory $UserProfileCopyWith(UserProfile value, $Res Function(UserProfile) _then) = _$UserProfileCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
List<String>? role, String? city, String? province, String? key, String? userGateWayId, dynamic userDjangoIdForeignKey, dynamic provinceIdForeignKey, dynamic cityIdForeignKey, dynamic systemUserProfileIdKey, String? fullname, String? firstName, String? lastName, String? nationalCode, String? nationalCodeImage, String? nationalId, String? mobile, String? birthday, String? image, String? password, bool? active, UserState? state, int? baseOrder, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress, String? personType, String? type
|
||||
});
|
||||
|
||||
|
||||
$UserStateCopyWith<$Res>? get state;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$UserProfileCopyWithImpl<$Res>
|
||||
implements $UserProfileCopyWith<$Res> {
|
||||
_$UserProfileCopyWithImpl(this._self, this._then);
|
||||
|
||||
final UserProfile _self;
|
||||
final $Res Function(UserProfile) _then;
|
||||
|
||||
/// Create a copy of UserProfile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? role = freezed,Object? city = freezed,Object? province = freezed,Object? key = freezed,Object? userGateWayId = freezed,Object? userDjangoIdForeignKey = freezed,Object? provinceIdForeignKey = freezed,Object? cityIdForeignKey = freezed,Object? systemUserProfileIdKey = freezed,Object? fullname = freezed,Object? firstName = freezed,Object? lastName = freezed,Object? nationalCode = freezed,Object? nationalCodeImage = freezed,Object? nationalId = freezed,Object? mobile = freezed,Object? birthday = freezed,Object? image = freezed,Object? password = freezed,Object? active = freezed,Object? state = freezed,Object? baseOrder = freezed,Object? cityNumber = freezed,Object? cityName = freezed,Object? provinceNumber = freezed,Object? provinceName = freezed,Object? unitName = freezed,Object? unitNationalId = freezed,Object? unitRegistrationNumber = freezed,Object? unitEconomicalNumber = freezed,Object? unitProvince = freezed,Object? unitCity = freezed,Object? unitPostalCode = freezed,Object? unitAddress = freezed,Object? personType = freezed,Object? type = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
role: freezed == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
|
||||
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
|
||||
as String?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,userGateWayId: freezed == userGateWayId ? _self.userGateWayId : userGateWayId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,userDjangoIdForeignKey: freezed == userDjangoIdForeignKey ? _self.userDjangoIdForeignKey : userDjangoIdForeignKey // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,provinceIdForeignKey: freezed == provinceIdForeignKey ? _self.provinceIdForeignKey : provinceIdForeignKey // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,cityIdForeignKey: freezed == cityIdForeignKey ? _self.cityIdForeignKey : cityIdForeignKey // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,systemUserProfileIdKey: freezed == systemUserProfileIdKey ? _self.systemUserProfileIdKey : systemUserProfileIdKey // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalCodeImage: freezed == nationalCodeImage ? _self.nationalCodeImage : nationalCodeImage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
|
||||
as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable
|
||||
as String?,password: freezed == password ? _self.password : password // ignore: cast_nullable_to_non_nullable
|
||||
as String?,active: freezed == active ? _self.active : active // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,state: freezed == state ? _self.state : state // ignore: cast_nullable_to_non_nullable
|
||||
as UserState?,baseOrder: freezed == baseOrder ? _self.baseOrder : baseOrder // ignore: cast_nullable_to_non_nullable
|
||||
as int?,cityNumber: freezed == cityNumber ? _self.cityNumber : cityNumber // ignore: cast_nullable_to_non_nullable
|
||||
as int?,cityName: freezed == cityName ? _self.cityName : cityName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,provinceNumber: freezed == provinceNumber ? _self.provinceNumber : provinceNumber // ignore: cast_nullable_to_non_nullable
|
||||
as int?,provinceName: freezed == provinceName ? _self.provinceName : provinceName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitNationalId: freezed == unitNationalId ? _self.unitNationalId : unitNationalId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitRegistrationNumber: freezed == unitRegistrationNumber ? _self.unitRegistrationNumber : unitRegistrationNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitEconomicalNumber: freezed == unitEconomicalNumber ? _self.unitEconomicalNumber : unitEconomicalNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitProvince: freezed == unitProvince ? _self.unitProvince : unitProvince // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitCity: freezed == unitCity ? _self.unitCity : unitCity // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitPostalCode: freezed == unitPostalCode ? _self.unitPostalCode : unitPostalCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitAddress: freezed == unitAddress ? _self.unitAddress : unitAddress // ignore: cast_nullable_to_non_nullable
|
||||
as String?,personType: freezed == personType ? _self.personType : personType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,type: freezed == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
/// Create a copy of UserProfile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$UserStateCopyWith<$Res>? get state {
|
||||
if (_self.state == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $UserStateCopyWith<$Res>(_self.state!, (value) {
|
||||
return _then(_self.copyWith(state: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [UserProfile].
|
||||
extension UserProfilePatterns on UserProfile {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _UserProfile value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _UserProfile() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _UserProfile value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _UserProfile():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _UserProfile value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _UserProfile() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<String>? role, String? city, String? province, String? key, String? userGateWayId, dynamic userDjangoIdForeignKey, dynamic provinceIdForeignKey, dynamic cityIdForeignKey, dynamic systemUserProfileIdKey, String? fullname, String? firstName, String? lastName, String? nationalCode, String? nationalCodeImage, String? nationalId, String? mobile, String? birthday, String? image, String? password, bool? active, UserState? state, int? baseOrder, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress, String? personType, String? type)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UserProfile() when $default != null:
|
||||
return $default(_that.role,_that.city,_that.province,_that.key,_that.userGateWayId,_that.userDjangoIdForeignKey,_that.provinceIdForeignKey,_that.cityIdForeignKey,_that.systemUserProfileIdKey,_that.fullname,_that.firstName,_that.lastName,_that.nationalCode,_that.nationalCodeImage,_that.nationalId,_that.mobile,_that.birthday,_that.image,_that.password,_that.active,_that.state,_that.baseOrder,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName,_that.unitName,_that.unitNationalId,_that.unitRegistrationNumber,_that.unitEconomicalNumber,_that.unitProvince,_that.unitCity,_that.unitPostalCode,_that.unitAddress,_that.personType,_that.type);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<String>? role, String? city, String? province, String? key, String? userGateWayId, dynamic userDjangoIdForeignKey, dynamic provinceIdForeignKey, dynamic cityIdForeignKey, dynamic systemUserProfileIdKey, String? fullname, String? firstName, String? lastName, String? nationalCode, String? nationalCodeImage, String? nationalId, String? mobile, String? birthday, String? image, String? password, bool? active, UserState? state, int? baseOrder, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress, String? personType, String? type) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UserProfile():
|
||||
return $default(_that.role,_that.city,_that.province,_that.key,_that.userGateWayId,_that.userDjangoIdForeignKey,_that.provinceIdForeignKey,_that.cityIdForeignKey,_that.systemUserProfileIdKey,_that.fullname,_that.firstName,_that.lastName,_that.nationalCode,_that.nationalCodeImage,_that.nationalId,_that.mobile,_that.birthday,_that.image,_that.password,_that.active,_that.state,_that.baseOrder,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName,_that.unitName,_that.unitNationalId,_that.unitRegistrationNumber,_that.unitEconomicalNumber,_that.unitProvince,_that.unitCity,_that.unitPostalCode,_that.unitAddress,_that.personType,_that.type);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<String>? role, String? city, String? province, String? key, String? userGateWayId, dynamic userDjangoIdForeignKey, dynamic provinceIdForeignKey, dynamic cityIdForeignKey, dynamic systemUserProfileIdKey, String? fullname, String? firstName, String? lastName, String? nationalCode, String? nationalCodeImage, String? nationalId, String? mobile, String? birthday, String? image, String? password, bool? active, UserState? state, int? baseOrder, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress, String? personType, String? type)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UserProfile() when $default != null:
|
||||
return $default(_that.role,_that.city,_that.province,_that.key,_that.userGateWayId,_that.userDjangoIdForeignKey,_that.provinceIdForeignKey,_that.cityIdForeignKey,_that.systemUserProfileIdKey,_that.fullname,_that.firstName,_that.lastName,_that.nationalCode,_that.nationalCodeImage,_that.nationalId,_that.mobile,_that.birthday,_that.image,_that.password,_that.active,_that.state,_that.baseOrder,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName,_that.unitName,_that.unitNationalId,_that.unitRegistrationNumber,_that.unitEconomicalNumber,_that.unitProvince,_that.unitCity,_that.unitPostalCode,_that.unitAddress,_that.personType,_that.type);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _UserProfile implements UserProfile {
|
||||
const _UserProfile({final List<String>? role, this.city, this.province, this.key, this.userGateWayId, this.userDjangoIdForeignKey, this.provinceIdForeignKey, this.cityIdForeignKey, this.systemUserProfileIdKey, this.fullname, this.firstName, this.lastName, this.nationalCode, this.nationalCodeImage, this.nationalId, this.mobile, this.birthday, this.image, this.password, this.active, this.state, this.baseOrder, this.cityNumber, this.cityName, this.provinceNumber, this.provinceName, this.unitName, this.unitNationalId, this.unitRegistrationNumber, this.unitEconomicalNumber, this.unitProvince, this.unitCity, this.unitPostalCode, this.unitAddress, this.personType, this.type}): _role = role;
|
||||
factory _UserProfile.fromJson(Map<String, dynamic> json) => _$UserProfileFromJson(json);
|
||||
|
||||
final List<String>? _role;
|
||||
@override List<String>? get role {
|
||||
final value = _role;
|
||||
if (value == null) return null;
|
||||
if (_role is EqualUnmodifiableListView) return _role;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
@override final String? city;
|
||||
@override final String? province;
|
||||
@override final String? key;
|
||||
@override final String? userGateWayId;
|
||||
@override final dynamic userDjangoIdForeignKey;
|
||||
@override final dynamic provinceIdForeignKey;
|
||||
@override final dynamic cityIdForeignKey;
|
||||
@override final dynamic systemUserProfileIdKey;
|
||||
@override final String? fullname;
|
||||
@override final String? firstName;
|
||||
@override final String? lastName;
|
||||
@override final String? nationalCode;
|
||||
@override final String? nationalCodeImage;
|
||||
@override final String? nationalId;
|
||||
@override final String? mobile;
|
||||
@override final String? birthday;
|
||||
@override final String? image;
|
||||
@override final String? password;
|
||||
@override final bool? active;
|
||||
@override final UserState? state;
|
||||
@override final int? baseOrder;
|
||||
@override final int? cityNumber;
|
||||
@override final String? cityName;
|
||||
@override final int? provinceNumber;
|
||||
@override final String? provinceName;
|
||||
@override final String? unitName;
|
||||
@override final String? unitNationalId;
|
||||
@override final String? unitRegistrationNumber;
|
||||
@override final String? unitEconomicalNumber;
|
||||
@override final String? unitProvince;
|
||||
@override final String? unitCity;
|
||||
@override final String? unitPostalCode;
|
||||
@override final String? unitAddress;
|
||||
@override final String? personType;
|
||||
@override final String? type;
|
||||
|
||||
/// Create a copy of UserProfile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$UserProfileCopyWith<_UserProfile> get copyWith => __$UserProfileCopyWithImpl<_UserProfile>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$UserProfileToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _UserProfile&&const DeepCollectionEquality().equals(other._role, _role)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)&&(identical(other.key, key) || other.key == key)&&(identical(other.userGateWayId, userGateWayId) || other.userGateWayId == userGateWayId)&&const DeepCollectionEquality().equals(other.userDjangoIdForeignKey, userDjangoIdForeignKey)&&const DeepCollectionEquality().equals(other.provinceIdForeignKey, provinceIdForeignKey)&&const DeepCollectionEquality().equals(other.cityIdForeignKey, cityIdForeignKey)&&const DeepCollectionEquality().equals(other.systemUserProfileIdKey, systemUserProfileIdKey)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode)&&(identical(other.nationalCodeImage, nationalCodeImage) || other.nationalCodeImage == nationalCodeImage)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.image, image) || other.image == image)&&(identical(other.password, password) || other.password == password)&&(identical(other.active, active) || other.active == active)&&(identical(other.state, state) || other.state == state)&&(identical(other.baseOrder, baseOrder) || other.baseOrder == baseOrder)&&(identical(other.cityNumber, cityNumber) || other.cityNumber == cityNumber)&&(identical(other.cityName, cityName) || other.cityName == cityName)&&(identical(other.provinceNumber, provinceNumber) || other.provinceNumber == provinceNumber)&&(identical(other.provinceName, provinceName) || other.provinceName == provinceName)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.unitNationalId, unitNationalId) || other.unitNationalId == unitNationalId)&&(identical(other.unitRegistrationNumber, unitRegistrationNumber) || other.unitRegistrationNumber == unitRegistrationNumber)&&(identical(other.unitEconomicalNumber, unitEconomicalNumber) || other.unitEconomicalNumber == unitEconomicalNumber)&&(identical(other.unitProvince, unitProvince) || other.unitProvince == unitProvince)&&(identical(other.unitCity, unitCity) || other.unitCity == unitCity)&&(identical(other.unitPostalCode, unitPostalCode) || other.unitPostalCode == unitPostalCode)&&(identical(other.unitAddress, unitAddress) || other.unitAddress == unitAddress)&&(identical(other.personType, personType) || other.personType == personType)&&(identical(other.type, type) || other.type == type));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hashAll([runtimeType,const DeepCollectionEquality().hash(_role),city,province,key,userGateWayId,const DeepCollectionEquality().hash(userDjangoIdForeignKey),const DeepCollectionEquality().hash(provinceIdForeignKey),const DeepCollectionEquality().hash(cityIdForeignKey),const DeepCollectionEquality().hash(systemUserProfileIdKey),fullname,firstName,lastName,nationalCode,nationalCodeImage,nationalId,mobile,birthday,image,password,active,state,baseOrder,cityNumber,cityName,provinceNumber,provinceName,unitName,unitNationalId,unitRegistrationNumber,unitEconomicalNumber,unitProvince,unitCity,unitPostalCode,unitAddress,personType,type]);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UserProfile(role: $role, city: $city, province: $province, key: $key, userGateWayId: $userGateWayId, userDjangoIdForeignKey: $userDjangoIdForeignKey, provinceIdForeignKey: $provinceIdForeignKey, cityIdForeignKey: $cityIdForeignKey, systemUserProfileIdKey: $systemUserProfileIdKey, fullname: $fullname, firstName: $firstName, lastName: $lastName, nationalCode: $nationalCode, nationalCodeImage: $nationalCodeImage, nationalId: $nationalId, mobile: $mobile, birthday: $birthday, image: $image, password: $password, active: $active, state: $state, baseOrder: $baseOrder, cityNumber: $cityNumber, cityName: $cityName, provinceNumber: $provinceNumber, provinceName: $provinceName, unitName: $unitName, unitNationalId: $unitNationalId, unitRegistrationNumber: $unitRegistrationNumber, unitEconomicalNumber: $unitEconomicalNumber, unitProvince: $unitProvince, unitCity: $unitCity, unitPostalCode: $unitPostalCode, unitAddress: $unitAddress, personType: $personType, type: $type)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$UserProfileCopyWith<$Res> implements $UserProfileCopyWith<$Res> {
|
||||
factory _$UserProfileCopyWith(_UserProfile value, $Res Function(_UserProfile) _then) = __$UserProfileCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
List<String>? role, String? city, String? province, String? key, String? userGateWayId, dynamic userDjangoIdForeignKey, dynamic provinceIdForeignKey, dynamic cityIdForeignKey, dynamic systemUserProfileIdKey, String? fullname, String? firstName, String? lastName, String? nationalCode, String? nationalCodeImage, String? nationalId, String? mobile, String? birthday, String? image, String? password, bool? active, UserState? state, int? baseOrder, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress, String? personType, String? type
|
||||
});
|
||||
|
||||
|
||||
@override $UserStateCopyWith<$Res>? get state;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$UserProfileCopyWithImpl<$Res>
|
||||
implements _$UserProfileCopyWith<$Res> {
|
||||
__$UserProfileCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _UserProfile _self;
|
||||
final $Res Function(_UserProfile) _then;
|
||||
|
||||
/// Create a copy of UserProfile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? role = freezed,Object? city = freezed,Object? province = freezed,Object? key = freezed,Object? userGateWayId = freezed,Object? userDjangoIdForeignKey = freezed,Object? provinceIdForeignKey = freezed,Object? cityIdForeignKey = freezed,Object? systemUserProfileIdKey = freezed,Object? fullname = freezed,Object? firstName = freezed,Object? lastName = freezed,Object? nationalCode = freezed,Object? nationalCodeImage = freezed,Object? nationalId = freezed,Object? mobile = freezed,Object? birthday = freezed,Object? image = freezed,Object? password = freezed,Object? active = freezed,Object? state = freezed,Object? baseOrder = freezed,Object? cityNumber = freezed,Object? cityName = freezed,Object? provinceNumber = freezed,Object? provinceName = freezed,Object? unitName = freezed,Object? unitNationalId = freezed,Object? unitRegistrationNumber = freezed,Object? unitEconomicalNumber = freezed,Object? unitProvince = freezed,Object? unitCity = freezed,Object? unitPostalCode = freezed,Object? unitAddress = freezed,Object? personType = freezed,Object? type = freezed,}) {
|
||||
return _then(_UserProfile(
|
||||
role: freezed == role ? _self._role : role // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
|
||||
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
|
||||
as String?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,userGateWayId: freezed == userGateWayId ? _self.userGateWayId : userGateWayId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,userDjangoIdForeignKey: freezed == userDjangoIdForeignKey ? _self.userDjangoIdForeignKey : userDjangoIdForeignKey // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,provinceIdForeignKey: freezed == provinceIdForeignKey ? _self.provinceIdForeignKey : provinceIdForeignKey // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,cityIdForeignKey: freezed == cityIdForeignKey ? _self.cityIdForeignKey : cityIdForeignKey // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,systemUserProfileIdKey: freezed == systemUserProfileIdKey ? _self.systemUserProfileIdKey : systemUserProfileIdKey // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalCodeImage: freezed == nationalCodeImage ? _self.nationalCodeImage : nationalCodeImage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
|
||||
as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable
|
||||
as String?,password: freezed == password ? _self.password : password // ignore: cast_nullable_to_non_nullable
|
||||
as String?,active: freezed == active ? _self.active : active // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,state: freezed == state ? _self.state : state // ignore: cast_nullable_to_non_nullable
|
||||
as UserState?,baseOrder: freezed == baseOrder ? _self.baseOrder : baseOrder // ignore: cast_nullable_to_non_nullable
|
||||
as int?,cityNumber: freezed == cityNumber ? _self.cityNumber : cityNumber // ignore: cast_nullable_to_non_nullable
|
||||
as int?,cityName: freezed == cityName ? _self.cityName : cityName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,provinceNumber: freezed == provinceNumber ? _self.provinceNumber : provinceNumber // ignore: cast_nullable_to_non_nullable
|
||||
as int?,provinceName: freezed == provinceName ? _self.provinceName : provinceName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitNationalId: freezed == unitNationalId ? _self.unitNationalId : unitNationalId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitRegistrationNumber: freezed == unitRegistrationNumber ? _self.unitRegistrationNumber : unitRegistrationNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitEconomicalNumber: freezed == unitEconomicalNumber ? _self.unitEconomicalNumber : unitEconomicalNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitProvince: freezed == unitProvince ? _self.unitProvince : unitProvince // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitCity: freezed == unitCity ? _self.unitCity : unitCity // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitPostalCode: freezed == unitPostalCode ? _self.unitPostalCode : unitPostalCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitAddress: freezed == unitAddress ? _self.unitAddress : unitAddress // ignore: cast_nullable_to_non_nullable
|
||||
as String?,personType: freezed == personType ? _self.personType : personType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,type: freezed == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of UserProfile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$UserStateCopyWith<$Res>? get state {
|
||||
if (_self.state == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $UserStateCopyWith<$Res>(_self.state!, (value) {
|
||||
return _then(_self.copyWith(state: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$UserState {
|
||||
|
||||
String? get city; String? get image; String? get mobile; String? get birthday; String? get province; String? get lastName; String? get firstName; String? get nationalId; String? get nationalCode;
|
||||
/// Create a copy of UserState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$UserStateCopyWith<UserState> get copyWith => _$UserStateCopyWithImpl<UserState>(this as UserState, _$identity);
|
||||
|
||||
/// Serializes this UserState to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is UserState&&(identical(other.city, city) || other.city == city)&&(identical(other.image, image) || other.image == image)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.province, province) || other.province == province)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,city,image,mobile,birthday,province,lastName,firstName,nationalId,nationalCode);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UserState(city: $city, image: $image, mobile: $mobile, birthday: $birthday, province: $province, lastName: $lastName, firstName: $firstName, nationalId: $nationalId, nationalCode: $nationalCode)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $UserStateCopyWith<$Res> {
|
||||
factory $UserStateCopyWith(UserState value, $Res Function(UserState) _then) = _$UserStateCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? city, String? image, String? mobile, String? birthday, String? province, String? lastName, String? firstName, String? nationalId, String? nationalCode
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$UserStateCopyWithImpl<$Res>
|
||||
implements $UserStateCopyWith<$Res> {
|
||||
_$UserStateCopyWithImpl(this._self, this._then);
|
||||
|
||||
final UserState _self;
|
||||
final $Res Function(UserState) _then;
|
||||
|
||||
/// Create a copy of UserState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? city = freezed,Object? image = freezed,Object? mobile = freezed,Object? birthday = freezed,Object? province = freezed,Object? lastName = freezed,Object? firstName = freezed,Object? nationalId = freezed,Object? nationalCode = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
|
||||
as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable
|
||||
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
|
||||
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [UserState].
|
||||
extension UserStatePatterns on UserState {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _UserState value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _UserState() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _UserState value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _UserState():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _UserState value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _UserState() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? city, String? image, String? mobile, String? birthday, String? province, String? lastName, String? firstName, String? nationalId, String? nationalCode)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UserState() when $default != null:
|
||||
return $default(_that.city,_that.image,_that.mobile,_that.birthday,_that.province,_that.lastName,_that.firstName,_that.nationalId,_that.nationalCode);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? city, String? image, String? mobile, String? birthday, String? province, String? lastName, String? firstName, String? nationalId, String? nationalCode) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UserState():
|
||||
return $default(_that.city,_that.image,_that.mobile,_that.birthday,_that.province,_that.lastName,_that.firstName,_that.nationalId,_that.nationalCode);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? city, String? image, String? mobile, String? birthday, String? province, String? lastName, String? firstName, String? nationalId, String? nationalCode)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UserState() when $default != null:
|
||||
return $default(_that.city,_that.image,_that.mobile,_that.birthday,_that.province,_that.lastName,_that.firstName,_that.nationalId,_that.nationalCode);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _UserState implements UserState {
|
||||
const _UserState({this.city, this.image, this.mobile, this.birthday, this.province, this.lastName, this.firstName, this.nationalId, this.nationalCode});
|
||||
factory _UserState.fromJson(Map<String, dynamic> json) => _$UserStateFromJson(json);
|
||||
|
||||
@override final String? city;
|
||||
@override final String? image;
|
||||
@override final String? mobile;
|
||||
@override final String? birthday;
|
||||
@override final String? province;
|
||||
@override final String? lastName;
|
||||
@override final String? firstName;
|
||||
@override final String? nationalId;
|
||||
@override final String? nationalCode;
|
||||
|
||||
/// Create a copy of UserState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$UserStateCopyWith<_UserState> get copyWith => __$UserStateCopyWithImpl<_UserState>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$UserStateToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _UserState&&(identical(other.city, city) || other.city == city)&&(identical(other.image, image) || other.image == image)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.province, province) || other.province == province)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,city,image,mobile,birthday,province,lastName,firstName,nationalId,nationalCode);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UserState(city: $city, image: $image, mobile: $mobile, birthday: $birthday, province: $province, lastName: $lastName, firstName: $firstName, nationalId: $nationalId, nationalCode: $nationalCode)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$UserStateCopyWith<$Res> implements $UserStateCopyWith<$Res> {
|
||||
factory _$UserStateCopyWith(_UserState value, $Res Function(_UserState) _then) = __$UserStateCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? city, String? image, String? mobile, String? birthday, String? province, String? lastName, String? firstName, String? nationalId, String? nationalCode
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$UserStateCopyWithImpl<$Res>
|
||||
implements _$UserStateCopyWith<$Res> {
|
||||
__$UserStateCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _UserState _self;
|
||||
final $Res Function(_UserState) _then;
|
||||
|
||||
/// Create a copy of UserState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? city = freezed,Object? image = freezed,Object? mobile = freezed,Object? birthday = freezed,Object? province = freezed,Object? lastName = freezed,Object? firstName = freezed,Object? nationalId = freezed,Object? nationalCode = freezed,}) {
|
||||
return _then(_UserState(
|
||||
city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
|
||||
as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable
|
||||
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
|
||||
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,113 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'user_profile.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_UserProfile _$UserProfileFromJson(Map<String, dynamic> json) => _UserProfile(
|
||||
role: (json['role'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
||||
city: json['city'] as String?,
|
||||
province: json['province'] as String?,
|
||||
key: json['key'] as String?,
|
||||
userGateWayId: json['user_gate_way_id'] as String?,
|
||||
userDjangoIdForeignKey: json['user_django_id_foreign_key'],
|
||||
provinceIdForeignKey: json['province_id_foreign_key'],
|
||||
cityIdForeignKey: json['city_id_foreign_key'],
|
||||
systemUserProfileIdKey: json['system_user_profile_id_key'],
|
||||
fullname: json['fullname'] as String?,
|
||||
firstName: json['first_name'] as String?,
|
||||
lastName: json['last_name'] as String?,
|
||||
nationalCode: json['national_code'] as String?,
|
||||
nationalCodeImage: json['national_code_image'] as String?,
|
||||
nationalId: json['national_id'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
birthday: json['birthday'] as String?,
|
||||
image: json['image'] as String?,
|
||||
password: json['password'] as String?,
|
||||
active: json['active'] as bool?,
|
||||
state: json['state'] == null
|
||||
? null
|
||||
: UserState.fromJson(json['state'] as Map<String, dynamic>),
|
||||
baseOrder: (json['base_order'] as num?)?.toInt(),
|
||||
cityNumber: (json['city_number'] as num?)?.toInt(),
|
||||
cityName: json['city_name'] as String?,
|
||||
provinceNumber: (json['province_number'] as num?)?.toInt(),
|
||||
provinceName: json['province_name'] as String?,
|
||||
unitName: json['unit_name'] as String?,
|
||||
unitNationalId: json['unit_national_id'] as String?,
|
||||
unitRegistrationNumber: json['unit_registration_number'] as String?,
|
||||
unitEconomicalNumber: json['unit_economical_number'] as String?,
|
||||
unitProvince: json['unit_province'] as String?,
|
||||
unitCity: json['unit_city'] as String?,
|
||||
unitPostalCode: json['unit_postal_code'] as String?,
|
||||
unitAddress: json['unit_address'] as String?,
|
||||
personType: json['person_type'] as String?,
|
||||
type: json['type'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserProfileToJson(_UserProfile instance) =>
|
||||
<String, dynamic>{
|
||||
'role': instance.role,
|
||||
'city': instance.city,
|
||||
'province': instance.province,
|
||||
'key': instance.key,
|
||||
'user_gate_way_id': instance.userGateWayId,
|
||||
'user_django_id_foreign_key': instance.userDjangoIdForeignKey,
|
||||
'province_id_foreign_key': instance.provinceIdForeignKey,
|
||||
'city_id_foreign_key': instance.cityIdForeignKey,
|
||||
'system_user_profile_id_key': instance.systemUserProfileIdKey,
|
||||
'fullname': instance.fullname,
|
||||
'first_name': instance.firstName,
|
||||
'last_name': instance.lastName,
|
||||
'national_code': instance.nationalCode,
|
||||
'national_code_image': instance.nationalCodeImage,
|
||||
'national_id': instance.nationalId,
|
||||
'mobile': instance.mobile,
|
||||
'birthday': instance.birthday,
|
||||
'image': instance.image,
|
||||
'password': instance.password,
|
||||
'active': instance.active,
|
||||
'state': instance.state,
|
||||
'base_order': instance.baseOrder,
|
||||
'city_number': instance.cityNumber,
|
||||
'city_name': instance.cityName,
|
||||
'province_number': instance.provinceNumber,
|
||||
'province_name': instance.provinceName,
|
||||
'unit_name': instance.unitName,
|
||||
'unit_national_id': instance.unitNationalId,
|
||||
'unit_registration_number': instance.unitRegistrationNumber,
|
||||
'unit_economical_number': instance.unitEconomicalNumber,
|
||||
'unit_province': instance.unitProvince,
|
||||
'unit_city': instance.unitCity,
|
||||
'unit_postal_code': instance.unitPostalCode,
|
||||
'unit_address': instance.unitAddress,
|
||||
'person_type': instance.personType,
|
||||
'type': instance.type,
|
||||
};
|
||||
|
||||
_UserState _$UserStateFromJson(Map<String, dynamic> json) => _UserState(
|
||||
city: json['city'] as String?,
|
||||
image: json['image'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
birthday: json['birthday'] as String?,
|
||||
province: json['province'] as String?,
|
||||
lastName: json['last_name'] as String?,
|
||||
firstName: json['first_name'] as String?,
|
||||
nationalId: json['national_id'] as String?,
|
||||
nationalCode: json['national_code'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserStateToJson(_UserState instance) =>
|
||||
<String, dynamic>{
|
||||
'city': instance.city,
|
||||
'image': instance.image,
|
||||
'mobile': instance.mobile,
|
||||
'birthday': instance.birthday,
|
||||
'province': instance.province,
|
||||
'last_name': instance.lastName,
|
||||
'first_name': instance.firstName,
|
||||
'national_id': instance.nationalId,
|
||||
'national_code': instance.nationalCode,
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'user_profile_model.freezed.dart';
|
||||
|
||||
part 'user_profile_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class UserProfileModel with _$UserProfileModel {
|
||||
const factory UserProfileModel({
|
||||
String? accessToken,
|
||||
String? expiresIn,
|
||||
String? scope,
|
||||
String? expireTime,
|
||||
String? mobile,
|
||||
String? fullname,
|
||||
String? firstname,
|
||||
String? lastname,
|
||||
String? city,
|
||||
String? province,
|
||||
String? nationalCode,
|
||||
String? nationalId,
|
||||
String? birthday,
|
||||
String? image,
|
||||
int? baseOrder,
|
||||
List<String>? role,
|
||||
}) = _UserProfileModel;
|
||||
|
||||
factory UserProfileModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$UserProfileModelFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,330 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// 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 'user_profile_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$UserProfileModel {
|
||||
|
||||
String? get accessToken; String? get expiresIn; String? get scope; String? get expireTime; String? get mobile; String? get fullname; String? get firstname; String? get lastname; String? get city; String? get province; String? get nationalCode; String? get nationalId; String? get birthday; String? get image; int? get baseOrder; List<String>? get role;
|
||||
/// Create a copy of UserProfileModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$UserProfileModelCopyWith<UserProfileModel> get copyWith => _$UserProfileModelCopyWithImpl<UserProfileModel>(this as UserProfileModel, _$identity);
|
||||
|
||||
/// Serializes this UserProfileModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is UserProfileModel&&(identical(other.accessToken, accessToken) || other.accessToken == accessToken)&&(identical(other.expiresIn, expiresIn) || other.expiresIn == expiresIn)&&(identical(other.scope, scope) || other.scope == scope)&&(identical(other.expireTime, expireTime) || other.expireTime == expireTime)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstname, firstname) || other.firstname == firstname)&&(identical(other.lastname, lastname) || other.lastname == lastname)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.image, image) || other.image == image)&&(identical(other.baseOrder, baseOrder) || other.baseOrder == baseOrder)&&const DeepCollectionEquality().equals(other.role, role));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,accessToken,expiresIn,scope,expireTime,mobile,fullname,firstname,lastname,city,province,nationalCode,nationalId,birthday,image,baseOrder,const DeepCollectionEquality().hash(role));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UserProfileModel(accessToken: $accessToken, expiresIn: $expiresIn, scope: $scope, expireTime: $expireTime, mobile: $mobile, fullname: $fullname, firstname: $firstname, lastname: $lastname, city: $city, province: $province, nationalCode: $nationalCode, nationalId: $nationalId, birthday: $birthday, image: $image, baseOrder: $baseOrder, role: $role)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $UserProfileModelCopyWith<$Res> {
|
||||
factory $UserProfileModelCopyWith(UserProfileModel value, $Res Function(UserProfileModel) _then) = _$UserProfileModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$UserProfileModelCopyWithImpl<$Res>
|
||||
implements $UserProfileModelCopyWith<$Res> {
|
||||
_$UserProfileModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final UserProfileModel _self;
|
||||
final $Res Function(UserProfileModel) _then;
|
||||
|
||||
/// Create a copy of UserProfileModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? accessToken = freezed,Object? expiresIn = freezed,Object? scope = freezed,Object? expireTime = freezed,Object? mobile = freezed,Object? fullname = freezed,Object? firstname = freezed,Object? lastname = freezed,Object? city = freezed,Object? province = freezed,Object? nationalCode = freezed,Object? nationalId = freezed,Object? birthday = freezed,Object? image = freezed,Object? baseOrder = freezed,Object? role = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
accessToken: freezed == accessToken ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable
|
||||
as String?,expiresIn: freezed == expiresIn ? _self.expiresIn : expiresIn // ignore: cast_nullable_to_non_nullable
|
||||
as String?,scope: freezed == scope ? _self.scope : scope // ignore: cast_nullable_to_non_nullable
|
||||
as String?,expireTime: freezed == expireTime ? _self.expireTime : expireTime // ignore: cast_nullable_to_non_nullable
|
||||
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,firstname: freezed == firstname ? _self.firstname : firstname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastname: freezed == lastname ? _self.lastname : lastname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
|
||||
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
|
||||
as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable
|
||||
as String?,baseOrder: freezed == baseOrder ? _self.baseOrder : baseOrder // ignore: cast_nullable_to_non_nullable
|
||||
as int?,role: freezed == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [UserProfileModel].
|
||||
extension UserProfileModelPatterns on UserProfileModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _UserProfileModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _UserProfileModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _UserProfileModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _UserProfileModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _UserProfileModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _UserProfileModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UserProfileModel() when $default != null:
|
||||
return $default(_that.accessToken,_that.expiresIn,_that.scope,_that.expireTime,_that.mobile,_that.fullname,_that.firstname,_that.lastname,_that.city,_that.province,_that.nationalCode,_that.nationalId,_that.birthday,_that.image,_that.baseOrder,_that.role);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UserProfileModel():
|
||||
return $default(_that.accessToken,_that.expiresIn,_that.scope,_that.expireTime,_that.mobile,_that.fullname,_that.firstname,_that.lastname,_that.city,_that.province,_that.nationalCode,_that.nationalId,_that.birthday,_that.image,_that.baseOrder,_that.role);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _UserProfileModel() when $default != null:
|
||||
return $default(_that.accessToken,_that.expiresIn,_that.scope,_that.expireTime,_that.mobile,_that.fullname,_that.firstname,_that.lastname,_that.city,_that.province,_that.nationalCode,_that.nationalId,_that.birthday,_that.image,_that.baseOrder,_that.role);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _UserProfileModel implements UserProfileModel {
|
||||
const _UserProfileModel({this.accessToken, this.expiresIn, this.scope, this.expireTime, this.mobile, this.fullname, this.firstname, this.lastname, this.city, this.province, this.nationalCode, this.nationalId, this.birthday, this.image, this.baseOrder, final List<String>? role}): _role = role;
|
||||
factory _UserProfileModel.fromJson(Map<String, dynamic> json) => _$UserProfileModelFromJson(json);
|
||||
|
||||
@override final String? accessToken;
|
||||
@override final String? expiresIn;
|
||||
@override final String? scope;
|
||||
@override final String? expireTime;
|
||||
@override final String? mobile;
|
||||
@override final String? fullname;
|
||||
@override final String? firstname;
|
||||
@override final String? lastname;
|
||||
@override final String? city;
|
||||
@override final String? province;
|
||||
@override final String? nationalCode;
|
||||
@override final String? nationalId;
|
||||
@override final String? birthday;
|
||||
@override final String? image;
|
||||
@override final int? baseOrder;
|
||||
final List<String>? _role;
|
||||
@override List<String>? get role {
|
||||
final value = _role;
|
||||
if (value == null) return null;
|
||||
if (_role is EqualUnmodifiableListView) return _role;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of UserProfileModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$UserProfileModelCopyWith<_UserProfileModel> get copyWith => __$UserProfileModelCopyWithImpl<_UserProfileModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$UserProfileModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _UserProfileModel&&(identical(other.accessToken, accessToken) || other.accessToken == accessToken)&&(identical(other.expiresIn, expiresIn) || other.expiresIn == expiresIn)&&(identical(other.scope, scope) || other.scope == scope)&&(identical(other.expireTime, expireTime) || other.expireTime == expireTime)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstname, firstname) || other.firstname == firstname)&&(identical(other.lastname, lastname) || other.lastname == lastname)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.image, image) || other.image == image)&&(identical(other.baseOrder, baseOrder) || other.baseOrder == baseOrder)&&const DeepCollectionEquality().equals(other._role, _role));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,accessToken,expiresIn,scope,expireTime,mobile,fullname,firstname,lastname,city,province,nationalCode,nationalId,birthday,image,baseOrder,const DeepCollectionEquality().hash(_role));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UserProfileModel(accessToken: $accessToken, expiresIn: $expiresIn, scope: $scope, expireTime: $expireTime, mobile: $mobile, fullname: $fullname, firstname: $firstname, lastname: $lastname, city: $city, province: $province, nationalCode: $nationalCode, nationalId: $nationalId, birthday: $birthday, image: $image, baseOrder: $baseOrder, role: $role)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$UserProfileModelCopyWith<$Res> implements $UserProfileModelCopyWith<$Res> {
|
||||
factory _$UserProfileModelCopyWith(_UserProfileModel value, $Res Function(_UserProfileModel) _then) = __$UserProfileModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$UserProfileModelCopyWithImpl<$Res>
|
||||
implements _$UserProfileModelCopyWith<$Res> {
|
||||
__$UserProfileModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _UserProfileModel _self;
|
||||
final $Res Function(_UserProfileModel) _then;
|
||||
|
||||
/// Create a copy of UserProfileModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? accessToken = freezed,Object? expiresIn = freezed,Object? scope = freezed,Object? expireTime = freezed,Object? mobile = freezed,Object? fullname = freezed,Object? firstname = freezed,Object? lastname = freezed,Object? city = freezed,Object? province = freezed,Object? nationalCode = freezed,Object? nationalId = freezed,Object? birthday = freezed,Object? image = freezed,Object? baseOrder = freezed,Object? role = freezed,}) {
|
||||
return _then(_UserProfileModel(
|
||||
accessToken: freezed == accessToken ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable
|
||||
as String?,expiresIn: freezed == expiresIn ? _self.expiresIn : expiresIn // ignore: cast_nullable_to_non_nullable
|
||||
as String?,scope: freezed == scope ? _self.scope : scope // ignore: cast_nullable_to_non_nullable
|
||||
as String?,expireTime: freezed == expireTime ? _self.expireTime : expireTime // ignore: cast_nullable_to_non_nullable
|
||||
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,firstname: freezed == firstname ? _self.firstname : firstname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastname: freezed == lastname ? _self.lastname : lastname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
|
||||
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
|
||||
as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable
|
||||
as String?,baseOrder: freezed == baseOrder ? _self.baseOrder : baseOrder // ignore: cast_nullable_to_non_nullable
|
||||
as int?,role: freezed == role ? _self._role : role // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,47 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'user_profile_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_UserProfileModel _$UserProfileModelFromJson(Map<String, dynamic> json) =>
|
||||
_UserProfileModel(
|
||||
accessToken: json['access_token'] as String?,
|
||||
expiresIn: json['expires_in'] as String?,
|
||||
scope: json['scope'] as String?,
|
||||
expireTime: json['expire_time'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
fullname: json['fullname'] as String?,
|
||||
firstname: json['firstname'] as String?,
|
||||
lastname: json['lastname'] as String?,
|
||||
city: json['city'] as String?,
|
||||
province: json['province'] as String?,
|
||||
nationalCode: json['national_code'] as String?,
|
||||
nationalId: json['national_id'] as String?,
|
||||
birthday: json['birthday'] as String?,
|
||||
image: json['image'] as String?,
|
||||
baseOrder: (json['base_order'] as num?)?.toInt(),
|
||||
role: (json['role'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserProfileModelToJson(_UserProfileModel instance) =>
|
||||
<String, dynamic>{
|
||||
'access_token': instance.accessToken,
|
||||
'expires_in': instance.expiresIn,
|
||||
'scope': instance.scope,
|
||||
'expire_time': instance.expireTime,
|
||||
'mobile': instance.mobile,
|
||||
'fullname': instance.fullname,
|
||||
'firstname': instance.firstname,
|
||||
'lastname': instance.lastname,
|
||||
'city': instance.city,
|
||||
'province': instance.province,
|
||||
'national_code': instance.nationalCode,
|
||||
'national_id': instance.nationalId,
|
||||
'birthday': instance.birthday,
|
||||
'image': instance.image,
|
||||
'base_order': instance.baseOrder,
|
||||
'role': instance.role,
|
||||
};
|
||||
Reference in New Issue
Block a user