feat : privacyPolicyWidget

This commit is contained in:
2025-07-23 14:41:05 +03:30
parent 93294dcfc1
commit 297c3659ea
35 changed files with 10368 additions and 275 deletions

View File

@@ -28,8 +28,8 @@ class MainActivity : FlutterActivity() {
CHANNEL CHANNEL
).setMethodCallHandler { call, result -> ).setMethodCallHandler { call, result ->
if (call.method == "apk_installer") { if (call.method == "apk_installer") {
val internalFile = File(context.filesDir.parentFile, "app_flutter/app-release.apk") val internalFile = File(context.filesDir.parentFile, "app_flutter/rasadyar.apk")
val externalFile = File(context.getExternalFilesDir(null), "app-release.apk") val externalFile = File(context.getExternalFilesDir(null), "rasadyar.apk")
internalFile.copyTo(externalFile, overwrite = true) internalFile.copyTo(externalFile, overwrite = true)
if (!installer.canInstallPackages()) { if (!installer.canInstallPackages()) {

View File

@@ -5,24 +5,14 @@ part 'app_info_model.g.dart';
@freezed @freezed
abstract class AppInfoModel with _$AppInfoModel { abstract class AppInfoModel with _$AppInfoModel {
const factory AppInfoModel({ const factory AppInfoModel({String? key, String? download_link, Info? info}) = _AppInfoModel;
required String key,
required Info info,
required String downloadLink,
}) = _AppInfoModel;
factory AppInfoModel.fromJson(Map<String, dynamic> json) => factory AppInfoModel.fromJson(Map<String, dynamic> json) => _$AppInfoModelFromJson(json);
_$AppInfoModelFromJson(json);
} }
@freezed @freezed
abstract class Info with _$Info { abstract class Info with _$Info {
const factory Info({ const factory Info({String? version, String? module, bool? required}) = _Info;
required String version,
required bool required,
required String module,
}) = _Info;
factory Info.fromJson(Map<String, dynamic> json) => _$InfoFromJson(json); factory Info.fromJson(Map<String, dynamic> json) => _$InfoFromJson(json);
} }

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -16,7 +15,7 @@ T _$identity<T>(T value) => value;
/// @nodoc /// @nodoc
mixin _$AppInfoModel { mixin _$AppInfoModel {
String get key; Info get info; String get downloadLink; String? get key; String? get download_link; Info? get info;
/// Create a copy of AppInfoModel /// Create a copy of AppInfoModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@@ -29,16 +28,16 @@ $AppInfoModelCopyWith<AppInfoModel> get copyWith => _$AppInfoModelCopyWithImpl<A
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is AppInfoModel&&(identical(other.key, key) || other.key == key)&&(identical(other.info, info) || other.info == info)&&(identical(other.downloadLink, downloadLink) || other.downloadLink == downloadLink)); return identical(this, other) || (other.runtimeType == runtimeType&&other is AppInfoModel&&(identical(other.key, key) || other.key == key)&&(identical(other.download_link, download_link) || other.download_link == download_link)&&(identical(other.info, info) || other.info == info));
} }
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType,key,info,downloadLink); int get hashCode => Object.hash(runtimeType,key,download_link,info);
@override @override
String toString() { String toString() {
return 'AppInfoModel(key: $key, info: $info, downloadLink: $downloadLink)'; return 'AppInfoModel(key: $key, download_link: $download_link, info: $info)';
} }
@@ -49,11 +48,11 @@ abstract mixin class $AppInfoModelCopyWith<$Res> {
factory $AppInfoModelCopyWith(AppInfoModel value, $Res Function(AppInfoModel) _then) = _$AppInfoModelCopyWithImpl; factory $AppInfoModelCopyWith(AppInfoModel value, $Res Function(AppInfoModel) _then) = _$AppInfoModelCopyWithImpl;
@useResult @useResult
$Res call({ $Res call({
String key, Info info, String downloadLink String? key, String? download_link, Info? info
}); });
$InfoCopyWith<$Res> get info; $InfoCopyWith<$Res>? get info;
} }
/// @nodoc /// @nodoc
@@ -66,37 +65,170 @@ class _$AppInfoModelCopyWithImpl<$Res>
/// Create a copy of AppInfoModel /// Create a copy of AppInfoModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? key = null,Object? info = null,Object? downloadLink = null,}) { @pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? download_link = freezed,Object? info = freezed,}) {
return _then(_self.copyWith( return _then(_self.copyWith(
key: null == key ? _self.key : key // ignore: cast_nullable_to_non_nullable key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String,info: null == info ? _self.info : info // ignore: cast_nullable_to_non_nullable as String?,download_link: freezed == download_link ? _self.download_link : download_link // ignore: cast_nullable_to_non_nullable
as Info,downloadLink: null == downloadLink ? _self.downloadLink : downloadLink // ignore: cast_nullable_to_non_nullable as String?,info: freezed == info ? _self.info : info // ignore: cast_nullable_to_non_nullable
as String, as Info?,
)); ));
} }
/// Create a copy of AppInfoModel /// Create a copy of AppInfoModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$InfoCopyWith<$Res> get info { $InfoCopyWith<$Res>? get info {
if (_self.info == null) {
return $InfoCopyWith<$Res>(_self.info, (value) { return null;
}
return $InfoCopyWith<$Res>(_self.info!, (value) {
return _then(_self.copyWith(info: value)); return _then(_self.copyWith(info: value));
}); });
} }
} }
/// Adds pattern-matching-related methods to [AppInfoModel].
extension AppInfoModelPatterns on AppInfoModel {
/// 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( _AppInfoModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _AppInfoModel() 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( _AppInfoModel value) $default,){
final _that = this;
switch (_that) {
case _AppInfoModel():
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( _AppInfoModel value)? $default,){
final _that = this;
switch (_that) {
case _AppInfoModel() 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? download_link, Info? info)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _AppInfoModel() when $default != null:
return $default(_that.key,_that.download_link,_that.info);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? download_link, Info? info) $default,) {final _that = this;
switch (_that) {
case _AppInfoModel():
return $default(_that.key,_that.download_link,_that.info);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? download_link, Info? info)? $default,) {final _that = this;
switch (_that) {
case _AppInfoModel() when $default != null:
return $default(_that.key,_that.download_link,_that.info);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _AppInfoModel implements AppInfoModel { class _AppInfoModel implements AppInfoModel {
const _AppInfoModel({required this.key, required this.info, required this.downloadLink}); const _AppInfoModel({this.key, this.download_link, this.info});
factory _AppInfoModel.fromJson(Map<String, dynamic> json) => _$AppInfoModelFromJson(json); factory _AppInfoModel.fromJson(Map<String, dynamic> json) => _$AppInfoModelFromJson(json);
@override final String key; @override final String? key;
@override final Info info; @override final String? download_link;
@override final String downloadLink; @override final Info? info;
/// Create a copy of AppInfoModel /// Create a copy of AppInfoModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@@ -111,16 +243,16 @@ Map<String, dynamic> toJson() {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppInfoModel&&(identical(other.key, key) || other.key == key)&&(identical(other.info, info) || other.info == info)&&(identical(other.downloadLink, downloadLink) || other.downloadLink == downloadLink)); return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppInfoModel&&(identical(other.key, key) || other.key == key)&&(identical(other.download_link, download_link) || other.download_link == download_link)&&(identical(other.info, info) || other.info == info));
} }
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType,key,info,downloadLink); int get hashCode => Object.hash(runtimeType,key,download_link,info);
@override @override
String toString() { String toString() {
return 'AppInfoModel(key: $key, info: $info, downloadLink: $downloadLink)'; return 'AppInfoModel(key: $key, download_link: $download_link, info: $info)';
} }
@@ -131,11 +263,11 @@ abstract mixin class _$AppInfoModelCopyWith<$Res> implements $AppInfoModelCopyWi
factory _$AppInfoModelCopyWith(_AppInfoModel value, $Res Function(_AppInfoModel) _then) = __$AppInfoModelCopyWithImpl; factory _$AppInfoModelCopyWith(_AppInfoModel value, $Res Function(_AppInfoModel) _then) = __$AppInfoModelCopyWithImpl;
@override @useResult @override @useResult
$Res call({ $Res call({
String key, Info info, String downloadLink String? key, String? download_link, Info? info
}); });
@override $InfoCopyWith<$Res> get info; @override $InfoCopyWith<$Res>? get info;
} }
/// @nodoc /// @nodoc
@@ -148,12 +280,12 @@ class __$AppInfoModelCopyWithImpl<$Res>
/// Create a copy of AppInfoModel /// Create a copy of AppInfoModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? key = null,Object? info = null,Object? downloadLink = null,}) { @override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? download_link = freezed,Object? info = freezed,}) {
return _then(_AppInfoModel( return _then(_AppInfoModel(
key: null == key ? _self.key : key // ignore: cast_nullable_to_non_nullable key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String,info: null == info ? _self.info : info // ignore: cast_nullable_to_non_nullable as String?,download_link: freezed == download_link ? _self.download_link : download_link // ignore: cast_nullable_to_non_nullable
as Info,downloadLink: null == downloadLink ? _self.downloadLink : downloadLink // ignore: cast_nullable_to_non_nullable as String?,info: freezed == info ? _self.info : info // ignore: cast_nullable_to_non_nullable
as String, as Info?,
)); ));
} }
@@ -161,9 +293,12 @@ as String,
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$InfoCopyWith<$Res> get info { $InfoCopyWith<$Res>? get info {
if (_self.info == null) {
return $InfoCopyWith<$Res>(_self.info, (value) { return null;
}
return $InfoCopyWith<$Res>(_self.info!, (value) {
return _then(_self.copyWith(info: value)); return _then(_self.copyWith(info: value));
}); });
} }
@@ -173,7 +308,7 @@ $InfoCopyWith<$Res> get info {
/// @nodoc /// @nodoc
mixin _$Info { mixin _$Info {
String get version; bool get required; String get module; String? get version; String? get module; bool? get required;
/// Create a copy of Info /// Create a copy of Info
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@@ -186,16 +321,16 @@ $InfoCopyWith<Info> get copyWith => _$InfoCopyWithImpl<Info>(this as Info, _$ide
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is Info&&(identical(other.version, version) || other.version == version)&&(identical(other.required, required) || other.required == required)&&(identical(other.module, module) || other.module == module)); return identical(this, other) || (other.runtimeType == runtimeType&&other is Info&&(identical(other.version, version) || other.version == version)&&(identical(other.module, module) || other.module == module)&&(identical(other.required, required) || other.required == required));
} }
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType,version,required,module); int get hashCode => Object.hash(runtimeType,version,module,required);
@override @override
String toString() { String toString() {
return 'Info(version: $version, required: $required, module: $module)'; return 'Info(version: $version, module: $module, required: $required)';
} }
@@ -206,7 +341,7 @@ abstract mixin class $InfoCopyWith<$Res> {
factory $InfoCopyWith(Info value, $Res Function(Info) _then) = _$InfoCopyWithImpl; factory $InfoCopyWith(Info value, $Res Function(Info) _then) = _$InfoCopyWithImpl;
@useResult @useResult
$Res call({ $Res call({
String version, bool required, String module String? version, String? module, bool? required
}); });
@@ -223,28 +358,158 @@ class _$InfoCopyWithImpl<$Res>
/// Create a copy of Info /// Create a copy of Info
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? version = null,Object? required = null,Object? module = null,}) { @pragma('vm:prefer-inline') @override $Res call({Object? version = freezed,Object? module = freezed,Object? required = freezed,}) {
return _then(_self.copyWith( return _then(_self.copyWith(
version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable version: freezed == version ? _self.version : version // ignore: cast_nullable_to_non_nullable
as String,required: null == required ? _self.required : required // ignore: cast_nullable_to_non_nullable as String?,module: freezed == module ? _self.module : module // ignore: cast_nullable_to_non_nullable
as bool,module: null == module ? _self.module : module // ignore: cast_nullable_to_non_nullable as String?,required: freezed == required ? _self.required : required // ignore: cast_nullable_to_non_nullable
as String, as bool?,
)); ));
} }
} }
/// Adds pattern-matching-related methods to [Info].
extension InfoPatterns on Info {
/// 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( _Info value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Info() 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( _Info value) $default,){
final _that = this;
switch (_that) {
case _Info():
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( _Info value)? $default,){
final _that = this;
switch (_that) {
case _Info() 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? version, String? module, bool? required)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Info() when $default != null:
return $default(_that.version,_that.module,_that.required);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? version, String? module, bool? required) $default,) {final _that = this;
switch (_that) {
case _Info():
return $default(_that.version,_that.module,_that.required);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? version, String? module, bool? required)? $default,) {final _that = this;
switch (_that) {
case _Info() when $default != null:
return $default(_that.version,_that.module,_that.required);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _Info implements Info { class _Info implements Info {
const _Info({required this.version, required this.required, required this.module}); const _Info({this.version, this.module, this.required});
factory _Info.fromJson(Map<String, dynamic> json) => _$InfoFromJson(json); factory _Info.fromJson(Map<String, dynamic> json) => _$InfoFromJson(json);
@override final String version; @override final String? version;
@override final bool required; @override final String? module;
@override final String module; @override final bool? required;
/// Create a copy of Info /// Create a copy of Info
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@@ -259,16 +524,16 @@ Map<String, dynamic> toJson() {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Info&&(identical(other.version, version) || other.version == version)&&(identical(other.required, required) || other.required == required)&&(identical(other.module, module) || other.module == module)); return identical(this, other) || (other.runtimeType == runtimeType&&other is _Info&&(identical(other.version, version) || other.version == version)&&(identical(other.module, module) || other.module == module)&&(identical(other.required, required) || other.required == required));
} }
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType,version,required,module); int get hashCode => Object.hash(runtimeType,version,module,required);
@override @override
String toString() { String toString() {
return 'Info(version: $version, required: $required, module: $module)'; return 'Info(version: $version, module: $module, required: $required)';
} }
@@ -279,7 +544,7 @@ abstract mixin class _$InfoCopyWith<$Res> implements $InfoCopyWith<$Res> {
factory _$InfoCopyWith(_Info value, $Res Function(_Info) _then) = __$InfoCopyWithImpl; factory _$InfoCopyWith(_Info value, $Res Function(_Info) _then) = __$InfoCopyWithImpl;
@override @useResult @override @useResult
$Res call({ $Res call({
String version, bool required, String module String? version, String? module, bool? required
}); });
@@ -296,12 +561,12 @@ class __$InfoCopyWithImpl<$Res>
/// Create a copy of Info /// Create a copy of Info
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? version = null,Object? required = null,Object? module = null,}) { @override @pragma('vm:prefer-inline') $Res call({Object? version = freezed,Object? module = freezed,Object? required = freezed,}) {
return _then(_Info( return _then(_Info(
version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable version: freezed == version ? _self.version : version // ignore: cast_nullable_to_non_nullable
as String,required: null == required ? _self.required : required // ignore: cast_nullable_to_non_nullable as String?,module: freezed == module ? _self.module : module // ignore: cast_nullable_to_non_nullable
as bool,module: null == module ? _self.module : module // ignore: cast_nullable_to_non_nullable as String?,required: freezed == required ? _self.required : required // ignore: cast_nullable_to_non_nullable
as String, as bool?,
)); ));
} }

View File

@@ -151,8 +151,8 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
Future.delayed(const Duration(milliseconds: 250), () async { Future.delayed(const Duration(milliseconds: 250), () async {
try { try {
final isUpdateNeeded = await checkVersion(); /* final isUpdateNeeded = await checkVersion();
if (isUpdateNeeded) return; if (isUpdateNeeded) return;*/
final module = tokenService.appModule.value; final module = tokenService.appModule.value;
final target = getTargetPage(module); final target = getTargetPage(module);
@@ -178,7 +178,7 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
appInfoModel = AppInfoModel.fromJson(res.data); appInfoModel = AppInfoModel.fromJson(res.data);
if ((appInfoModel?.info.version.versionNumber ?? 0) > version) { if ((appInfoModel?.info?.version?.versionNumber ?? 0) > version) {
hasUpdated.value = !hasUpdated.value; hasUpdated.value = !hasUpdated.value;
return true; return true;
} }
@@ -191,7 +191,7 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
Future<void> fileDownload() async { Future<void> fileDownload() async {
onUpdateDownload.value = true; onUpdateDownload.value = true;
final dir = await getApplicationDocumentsDirectory(); final dir = await getApplicationDocumentsDirectory();
final filePath = "${dir.path}/app-release.apk"; final filePath = "${dir.path}/rasadyar.apk";
final file = File(filePath); final file = File(filePath);
if (await file.exists()) { if (await file.exists()) {
await file.delete(); await file.delete();
@@ -203,7 +203,7 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
while (attempts < retryCount && !success) { while (attempts < retryCount && !success) {
try { try {
await _dio.download( await _dio.download(
appInfoModel?.downloadLink ?? '', appInfoModel?.download_link ?? '',
filePath, filePath,
onReceiveProgress: (count, total) { onReceiveProgress: (count, total) {
if (total != -1 && total > 0) { if (total != -1 && total > 0) {
@@ -226,8 +226,6 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
if (success) { if (success) {
_updateFilePath.value = filePath; _updateFilePath.value = filePath;
tLog(filePath);
fLog(_updateFilePath.value);
} }
onUpdateDownload.value = false; onUpdateDownload.value = false;

View File

@@ -27,28 +27,31 @@ class AuthPage extends GetView<AuthLogic> {
} }
}, controller.authType), }, controller.authType),
/* SizedBox(height: 50), SizedBox(height: 20),
RichText( RichText(
text: TextSpan( text: TextSpan(
children: [ children: [
TextSpan( TextSpan(
text: 'مطالعه بیانیه ', text: 'مطالعه بیانیه ',
style: AppFonts.yekan14.copyWith( style: AppFonts.yekan16.copyWith(color: AppColor.darkGreyDark),
color: AppColor.darkGreyDark,
),
), ),
TextSpan( TextSpan(
recognizer: TapGestureRecognizer() recognizer: TapGestureRecognizer()
..onTap = () {}, ..onTap = () {
Get.bottomSheet(
privacyPolicyWidget(),
isScrollControlled: true,
enableDrag: true,
ignoreSafeArea: false,
);
},
text: 'حریم خصوصی', text: 'حریم خصوصی',
style: AppFonts.yekan14.copyWith( style: AppFonts.yekan16.copyWith(color: AppColor.blueNormal),
color: AppColor.blueNormal,
),
), ),
], ],
), ),
), ),
SizedBox(height: 18), /* SizedBox(height: 18),
ObxValue((types) { ObxValue((types) {
return RichText( return RichText(
@@ -92,110 +95,200 @@ class AuthPage extends GetView<AuthLogic> {
padding: EdgeInsets.symmetric(horizontal: 30, vertical: 50), padding: EdgeInsets.symmetric(horizontal: 30, vertical: 50),
child: Form( child: Form(
key: controller.formKey, key: controller.formKey,
child: Column( child: AutofillGroup(
children: [ child: Column(
RTextField( children: [
label: 'نام کاربری', RTextField(
maxLength: 11, label: 'نام کاربری',
maxLines: 1, maxLength: 11,
controller: controller.phoneNumberController.value, maxLines: 1,
keyboardType: TextInputType.number, controller: controller.phoneNumberController.value,
initText: controller.phoneNumberController.value.text, keyboardType: TextInputType.number,
onChanged: (value) async { initText: controller.phoneNumberController.value.text,
controller.phoneNumberController.value.text = value; autofillHints: [AutofillHints.username],
controller.phoneNumberController.refresh(); onChanged: (value) async {
if (value.length == 11) { controller.phoneNumberController.value.text = value;
await controller.getUserInfo(value); controller.phoneNumberController.refresh();
} if (value.length == 11) {
}, await controller.getUserInfo(value);
prefixIcon: Padding( }
padding: const EdgeInsets.fromLTRB(0, 8, 6, 8),
child: Assets.vec.callSvg.svg(width: 12, height: 12),
),
suffixIcon:
controller.phoneNumberController.value.text.trim().isNotEmpty
? clearButton(() {
controller.phoneNumberController.value.clear();
controller.phoneNumberController.refresh();
})
: null,
validator: (value) {
if (value == null || value.isEmpty) {
return '⚠️ شماره موبایل را وارد کنید';
} else if (value.length < 11) {
return '⚠️ شماره موبایل باید 11 رقم باشد';
}
return null;
},
style: AppFonts.yekan13,
errorStyle: AppFonts.yekan13.copyWith(color: AppColor.redNormal),
labelStyle: AppFonts.yekan13,
boxConstraints: const BoxConstraints(
maxHeight: 40,
minHeight: 40,
maxWidth: 40,
minWidth: 40,
),
),
const SizedBox(height: 26),
ObxValue(
(passwordController) => RTextField(
label: 'رمز عبور',
filled: false,
obscure: true,
controller: passwordController.value,
variant: RTextFieldVariant.password,
initText: passwordController.value.text,
onChanged: (value) {
passwordController.refresh();
}, },
prefixIcon: Padding(
padding: const EdgeInsets.fromLTRB(0, 8, 6, 8),
child: Assets.vec.callSvg.svg(width: 12, height: 12),
),
suffixIcon: controller.phoneNumberController.value.text.trim().isNotEmpty
? clearButton(() {
controller.phoneNumberController.value.clear();
controller.phoneNumberController.refresh();
})
: null,
validator: (value) { validator: (value) {
if (value == null || value.isEmpty) { if (value == null || value.isEmpty) {
return '⚠️ رمز عبور را وارد کنید'; return '⚠️ شماره موبایل را وارد کنید';
} else if (value.length < 11) {
return '⚠️ شماره موبایل باید 11 رقم باشد';
} }
return null; return null;
}, },
style: AppFonts.yekan13, style: AppFonts.yekan13,
errorStyle: AppFonts.yekan13.copyWith( errorStyle: AppFonts.yekan13.copyWith(color: AppColor.redNormal),
color: AppColor.redNormal,
),
labelStyle: AppFonts.yekan13, labelStyle: AppFonts.yekan13,
prefixIcon: Padding(
padding: const EdgeInsets.fromLTRB(0, 8, 8, 8),
child: Assets.vec.keySvg.svg(width: 12, height: 12),
),
boxConstraints: const BoxConstraints( boxConstraints: const BoxConstraints(
maxHeight: 34, maxHeight: 40,
minHeight: 34, minHeight: 40,
maxWidth: 34, maxWidth: 40,
minWidth: 34, minWidth: 40,
), ),
), ),
controller.passwordController, const SizedBox(height: 26),
), ObxValue(
SizedBox(height: 26), (passwordController) => RTextField(
CaptchaWidget(), label: 'رمز عبور',
SizedBox(height: 23), filled: false,
obscure: true,
controller: passwordController.value,
autofillHints: [AutofillHints.password],
variant: RTextFieldVariant.password,
initText: passwordController.value.text,
onChanged: (value) {
passwordController.refresh();
},
validator: (value) {
if (value == null || value.isEmpty) {
return '⚠️ رمز عبور را وارد کنید';
}
return null;
},
style: AppFonts.yekan13,
errorStyle: AppFonts.yekan13.copyWith(color: AppColor.redNormal),
labelStyle: AppFonts.yekan13,
prefixIcon: Padding(
padding: const EdgeInsets.fromLTRB(0, 8, 8, 8),
child: Assets.vec.keySvg.svg(width: 12, height: 12),
),
boxConstraints: const BoxConstraints(
maxHeight: 34,
minHeight: 34,
maxWidth: 34,
minWidth: 34,
),
),
controller.passwordController,
),
SizedBox(height: 26),
CaptchaWidget(),
SizedBox(height: 23),
Obx(() { Obx(() {
return RElevated( return RElevated(
text: 'ورود', text: 'ورود',
isLoading: controller.isLoading.value, isLoading: controller.isLoading.value,
onPressed: controller.isDisabled.value onPressed: controller.isDisabled.value
? null ? null
: () async { : () async {
await controller.submitLoginForm2(); await controller.submitLoginForm2();
}, },
width: Get.width, width: Get.width,
height: 48, height: 48,
); );
}), }),
], ],
),
), ),
), ),
); );
} }
Widget privacyPolicyWidget() {
return BaseBottomSheet(
child: Column(
spacing: 5,
children: [
Container(
padding: EdgeInsets.all(8.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
border: Border.all(color: AppColor.darkGreyLight, width: 1),
),
child: Column(
spacing: 3,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'بيانيه حريم خصوصی',
style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal),
),
Text(
'اطلاعات مربوط به هر شخص، حریم خصوصی وی محسوب می‌شود. حفاظت و حراست از اطلاعات شخصی در سامانه رصد یار، نه تنها موجب حفظ امنیت کاربران می‌شود، بلکه باعث اعتماد بیشتر و مشارکت آنها در فعالیت‌های جاری می‌گردد. هدف از این بیانیه، آگاه ساختن شما درباره ی نوع و نحوه ی استفاده از اطلاعاتی است که در هنگام استفاده از سامانه رصد یار ، از جانب شما دریافت می‌گردد. شرکت هوشمند سازان خود را ملزم به رعایت حریم خصوصی همه شهروندان و کاربران سامانه دانسته و آن دسته از اطلاعات کاربران را که فقط به منظور ارائه خدمات کفایت می‌کند، دریافت کرده و از انتشار آن یا در اختیار قرار دادن آن به دیگران خودداری مینماید.',
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark, height: 1.8),
),
],
),
),
Container(
padding: EdgeInsets.all(8.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
border: Border.all(color: AppColor.darkGreyLight, width: 1),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 4,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
'چگونگی جمع آوری و استفاده از اطلاعات کاربران',
style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal),
),
Text(
'''الف: اطلاعاتی که شما خود در اختيار این سامانه قرار می‌دهيد، شامل موارد زيرهستند:
اقلام اطلاعاتی شامل شماره تلفن همراه، تاریخ تولد، کد پستی و کد ملی کاربران را دریافت مینماییم که از این اقلام، صرفا جهت احراز هویت کاربران استفاده خواهد شد.
ب: برخی اطلاعات ديگر که به صورت خودکار از شما دريافت میشود شامل موارد زير می‌باشد:
⦁ دستگاهی که از طریق آن سامانه رصد یار را مشاهده می‌نمایید( تلفن همراه، تبلت، رایانه).
⦁ نام و نسخه سیستم عامل و browser کامپیوتر شما.
⦁ اطلاعات صفحات بازدید شده.
⦁ تعداد بازدیدهای روزانه در درگاه.
⦁ هدف ما از دریافت این اطلاعات استفاده از آنها در تحلیل عملکرد کاربران درگاه می باشد تا بتوانیم در خدمت رسانی بهتر عمل کنیم.
''',
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark, height: 1.8),
),
],
),
),
Container(
padding: EdgeInsets.all(8.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
border: Border.all(color: AppColor.darkGreyLight, width: 1),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 4,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
'امنیت اطلاعات',
style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal),
),
Text(
'متعهدیم که امنیت اطلاعات شما را تضمین نماییم و برای جلوگیری از هر نوع دسترسی غیرمجاز و افشای اطلاعات شما از همه شیوه‌‌های لازم استفاده می‌کنیم تا امنیت اطلاعاتی را که به صورت آنلاین گردآوری می‌کنیم، حفظ شود. لازم به ذکر است در سامانه ما، ممکن است به سایت های دیگری لینک شوید، وقتی که شما از طریق این لینک‌ها از سامانه ما خارج می‌شوید، توجه داشته باشید که ما بر دیگر سایت ها کنترل نداریم و سازمان تعهدی بر حفظ حریم شخصی آنان در سایت مقصد نخواهد داشت و مراجعه کنندگان میبایست به بیانیه حریم شخصی آن سایت ها مراجعه نمایند.',
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark, height: 1.8),
),
],
),
),
],
),
);
}
/* /*
Widget sendCodeForm() { Widget sendCodeForm() {
return ObxValue((data) { return ObxValue((data) {

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -77,6 +76,136 @@ as String?,
} }
/// Adds pattern-matching-related methods to [ChangePasswordRequestModel].
extension ChangePasswordRequestModelPatterns on ChangePasswordRequestModel {
/// 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( _ChangePasswordRequestModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ChangePasswordRequestModel() 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( _ChangePasswordRequestModel value) $default,){
final _that = this;
switch (_that) {
case _ChangePasswordRequestModel():
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( _ChangePasswordRequestModel value)? $default,){
final _that = this;
switch (_that) {
case _ChangePasswordRequestModel() 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? username, String? password)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ChangePasswordRequestModel() when $default != null:
return $default(_that.username,_that.password);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? username, String? password) $default,) {final _that = this;
switch (_that) {
case _ChangePasswordRequestModel():
return $default(_that.username,_that.password);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? username, String? password)? $default,) {final _that = this;
switch (_that) {
case _ChangePasswordRequestModel() when $default != null:
return $default(_that.username,_that.password);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -80,6 +79,136 @@ as int?,
} }
/// Adds pattern-matching-related methods to [ConformAllocation].
extension ConformAllocationPatterns on ConformAllocation {
/// 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( _ConformAllocation value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ConformAllocation() 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( _ConformAllocation value) $default,){
final _that = this;
switch (_that) {
case _ConformAllocation():
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( _ConformAllocation value)? $default,){
final _that = this;
switch (_that) {
case _ConformAllocation() 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? allocation_key, int? number_of_carcasses, int? weight_of_carcasses, int? amount, int? total_amount)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ConformAllocation() when $default != null:
return $default(_that.allocation_key,_that.number_of_carcasses,_that.weight_of_carcasses,_that.amount,_that.total_amount);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? allocation_key, int? number_of_carcasses, int? weight_of_carcasses, int? amount, int? total_amount) $default,) {final _that = this;
switch (_that) {
case _ConformAllocation():
return $default(_that.allocation_key,_that.number_of_carcasses,_that.weight_of_carcasses,_that.amount,_that.total_amount);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? allocation_key, int? number_of_carcasses, int? weight_of_carcasses, int? amount, int? total_amount)? $default,) {final _that = this;
switch (_that) {
case _ConformAllocation() when $default != null:
return $default(_that.allocation_key,_that.number_of_carcasses,_that.weight_of_carcasses,_that.amount,_that.total_amount);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -83,6 +82,136 @@ as String?,
} }
/// Adds pattern-matching-related methods to [CreateStewardFreeBar].
extension CreateStewardFreeBarPatterns on CreateStewardFreeBar {
/// 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( _CreateStewardFreeBar value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _CreateStewardFreeBar() 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( _CreateStewardFreeBar value) $default,){
final _that = this;
switch (_that) {
case _CreateStewardFreeBar():
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( _CreateStewardFreeBar value)? $default,){
final _that = this;
switch (_that) {
case _CreateStewardFreeBar() 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? productKey, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, String? date, String? barImage)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _CreateStewardFreeBar() when $default != null:
return $default(_that.productKey,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.date,_that.barImage);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? productKey, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, String? date, String? barImage) $default,) {final _that = this;
switch (_that) {
case _CreateStewardFreeBar():
return $default(_that.productKey,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.date,_that.barImage);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? productKey, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, String? date, String? barImage)? $default,) {final _that = this;
switch (_that) {
case _CreateStewardFreeBar() when $default != null:
return $default(_that.productKey,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.date,_that.barImage);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -82,6 +81,136 @@ as int?,
} }
/// Adds pattern-matching-related methods to [StewardAllocationRequest].
extension StewardAllocationRequestPatterns on StewardAllocationRequest {
/// 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( _StewardAllocationRequest value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _StewardAllocationRequest() 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( _StewardAllocationRequest value) $default,){
final _that = this;
switch (_that) {
case _StewardAllocationRequest():
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( _StewardAllocationRequest value)? $default,){
final _that = this;
switch (_that) {
case _StewardAllocationRequest() 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? checkAllocation, String? allocationKey, String? state, int? registrationCode, int? receiverRealNumberOfCarcasses, int? receiverRealWeightOfCarcasses, int? weightLossOfCarcasses)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _StewardAllocationRequest() when $default != null:
return $default(_that.checkAllocation,_that.allocationKey,_that.state,_that.registrationCode,_that.receiverRealNumberOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses);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? checkAllocation, String? allocationKey, String? state, int? registrationCode, int? receiverRealNumberOfCarcasses, int? receiverRealWeightOfCarcasses, int? weightLossOfCarcasses) $default,) {final _that = this;
switch (_that) {
case _StewardAllocationRequest():
return $default(_that.checkAllocation,_that.allocationKey,_that.state,_that.registrationCode,_that.receiverRealNumberOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses);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? checkAllocation, String? allocationKey, String? state, int? registrationCode, int? receiverRealNumberOfCarcasses, int? receiverRealWeightOfCarcasses, int? weightLossOfCarcasses)? $default,) {final _that = this;
switch (_that) {
case _StewardAllocationRequest() when $default != null:
return $default(_that.checkAllocation,_that.allocationKey,_that.state,_that.registrationCode,_that.receiverRealNumberOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -82,6 +81,136 @@ as String?,
} }
/// Adds pattern-matching-related methods to [StewardFreeSaleBarRequest].
extension StewardFreeSaleBarRequestPatterns on StewardFreeSaleBarRequest {
/// 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( _StewardFreeSaleBarRequest value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _StewardFreeSaleBarRequest() 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( _StewardFreeSaleBarRequest value) $default,){
final _that = this;
switch (_that) {
case _StewardFreeSaleBarRequest():
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( _StewardFreeSaleBarRequest value)? $default,){
final _that = this;
switch (_that) {
case _StewardFreeSaleBarRequest() 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? buyerKey, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? key)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _StewardFreeSaleBarRequest() when $default != null:
return $default(_that.buyerKey,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.key);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? buyerKey, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? key) $default,) {final _that = this;
switch (_that) {
case _StewardFreeSaleBarRequest():
return $default(_that.buyerKey,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.key);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? buyerKey, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? key)? $default,) {final _that = this;
switch (_that) {
case _StewardFreeSaleBarRequest() when $default != null:
return $default(_that.buyerKey,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.key);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -90,6 +89,136 @@ as String?,
} }
/// Adds pattern-matching-related methods to [SubmitKillHouseFreeBar].
extension SubmitKillHouseFreeBarPatterns on SubmitKillHouseFreeBar {
/// 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( _SubmitKillHouseFreeBar value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _SubmitKillHouseFreeBar() 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( _SubmitKillHouseFreeBar value) $default,){
final _that = this;
switch (_that) {
case _SubmitKillHouseFreeBar():
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( _SubmitKillHouseFreeBar value)? $default,){
final _that = this;
switch (_that) {
case _SubmitKillHouseFreeBar() 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? driverName, String? driverMobile, String? poultryName, String? poultryMobile, String? province, String? city, String? barClearanceCode, String? barImage, String? killerKey, String? date, String? buyType, String? productKey, String? car, String? numberOfCarcasses, String? weightOfCarcasses)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _SubmitKillHouseFreeBar() when $default != null:
return $default(_that.driverName,_that.driverMobile,_that.poultryName,_that.poultryMobile,_that.province,_that.city,_that.barClearanceCode,_that.barImage,_that.killerKey,_that.date,_that.buyType,_that.productKey,_that.car,_that.numberOfCarcasses,_that.weightOfCarcasses);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? driverName, String? driverMobile, String? poultryName, String? poultryMobile, String? province, String? city, String? barClearanceCode, String? barImage, String? killerKey, String? date, String? buyType, String? productKey, String? car, String? numberOfCarcasses, String? weightOfCarcasses) $default,) {final _that = this;
switch (_that) {
case _SubmitKillHouseFreeBar():
return $default(_that.driverName,_that.driverMobile,_that.poultryName,_that.poultryMobile,_that.province,_that.city,_that.barClearanceCode,_that.barImage,_that.killerKey,_that.date,_that.buyType,_that.productKey,_that.car,_that.numberOfCarcasses,_that.weightOfCarcasses);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? driverName, String? driverMobile, String? poultryName, String? poultryMobile, String? province, String? city, String? barClearanceCode, String? barImage, String? killerKey, String? date, String? buyType, String? productKey, String? car, String? numberOfCarcasses, String? weightOfCarcasses)? $default,) {final _that = this;
switch (_that) {
case _SubmitKillHouseFreeBar() when $default != null:
return $default(_that.driverName,_that.driverMobile,_that.poultryName,_that.poultryMobile,_that.province,_that.city,_that.barClearanceCode,_that.barImage,_that.killerKey,_that.date,_that.buyType,_that.productKey,_that.car,_that.numberOfCarcasses,_that.weightOfCarcasses);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -88,6 +87,136 @@ as String?,
} }
/// Adds pattern-matching-related methods to [SubmitStewardAllocation].
extension SubmitStewardAllocationPatterns on SubmitStewardAllocation {
/// 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( _SubmitStewardAllocation value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _SubmitStewardAllocation() 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( _SubmitStewardAllocation value) $default,){
final _that = this;
switch (_that) {
case _SubmitStewardAllocation():
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( _SubmitStewardAllocation value)? $default,){
final _that = this;
switch (_that) {
case _SubmitStewardAllocation() 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? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, int? totalAmount, bool? approvedPriceStatus, String? date)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _SubmitStewardAllocation() when $default != null:
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.totalAmount,_that.approvedPriceStatus,_that.date);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? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, int? totalAmount, bool? approvedPriceStatus, String? date) $default,) {final _that = this;
switch (_that) {
case _SubmitStewardAllocation():
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.totalAmount,_that.approvedPriceStatus,_that.date);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? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, int? totalAmount, bool? approvedPriceStatus, String? date)? $default,) {final _that = this;
switch (_that) {
case _SubmitStewardAllocation() when $default != null:
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.totalAmount,_that.approvedPriceStatus,_that.date);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -87,6 +86,136 @@ 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 /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -80,6 +79,136 @@ as int?,
} }
/// Adds pattern-matching-related methods to [DashboardKillHouseFreeBar].
extension DashboardKillHouseFreeBarPatterns on DashboardKillHouseFreeBar {
/// 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( _DashboardKillHouseFreeBar value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _DashboardKillHouseFreeBar() 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( _DashboardKillHouseFreeBar value) $default,){
final _that = this;
switch (_that) {
case _DashboardKillHouseFreeBar():
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( _DashboardKillHouseFreeBar value)? $default,){
final _that = this;
switch (_that) {
case _DashboardKillHouseFreeBar() 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, int? totalBarsLiveWeight, int? totalBarsNumberOfCarcasses, int? totalBarsWeightOfCarcasses)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _DashboardKillHouseFreeBar() when $default != null:
return $default(_that.totalBars,_that.totalBarsQuantity,_that.totalBarsLiveWeight,_that.totalBarsNumberOfCarcasses,_that.totalBarsWeightOfCarcasses);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, int? totalBarsLiveWeight, int? totalBarsNumberOfCarcasses, int? totalBarsWeightOfCarcasses) $default,) {final _that = this;
switch (_that) {
case _DashboardKillHouseFreeBar():
return $default(_that.totalBars,_that.totalBarsQuantity,_that.totalBarsLiveWeight,_that.totalBarsNumberOfCarcasses,_that.totalBarsWeightOfCarcasses);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, int? totalBarsLiveWeight, int? totalBarsNumberOfCarcasses, int? totalBarsWeightOfCarcasses)? $default,) {final _that = this;
switch (_that) {
case _DashboardKillHouseFreeBar() when $default != null:
return $default(_that.totalBars,_that.totalBarsQuantity,_that.totalBarsLiveWeight,_that.totalBarsNumberOfCarcasses,_that.totalBarsWeightOfCarcasses);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -91,6 +90,136 @@ $UserCopyWith<$Res>? get user {
} }
/// 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 /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -244,6 +373,136 @@ 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 /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -118,6 +117,136 @@ as int?,
} }
/// Adds pattern-matching-related methods to [InventoryModel].
extension InventoryModelPatterns on InventoryModel {
/// 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( _InventoryModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _InventoryModel() 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( _InventoryModel value) $default,){
final _that = this;
switch (_that) {
case _InventoryModel():
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( _InventoryModel value)? $default,){
final _that = this;
switch (_that) {
case _InventoryModel() 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? 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)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _InventoryModel() when $default != null:
return $default(_that.id,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.name,_that.provinceGovernmentalCarcassesQuantity,_that.provinceGovernmentalCarcassesWeight,_that.provinceFreeCarcassesQuantity,_that.provinceFreeCarcassesWeight,_that.receiveGovernmentalCarcassesQuantity,_that.receiveGovernmentalCarcassesWeight,_that.receiveFreeCarcassesQuantity,_that.receiveFreeCarcassesWeight,_that.freeBuyingCarcassesQuantity,_that.freeBuyingCarcassesWeight,_that.totalGovernmentalCarcassesQuantity,_that.totalGovernmentalCarcassesWeight,_that.totalFreeBarsCarcassesQuantity,_that.totalFreeBarsCarcassesWeight,_that.weightAverage,_that.totalCarcassesQuantity,_that.totalCarcassesWeight,_that.freezingQuantity,_that.freezingWeight,_that.lossWeight,_that.outProvinceAllocatedQuantity,_that.outProvinceAllocatedWeight,_that.provinceAllocatedQuantity,_that.provinceAllocatedWeight,_that.realAllocatedQuantity,_that.realAllocatedWeight,_that.coldHouseAllocatedWeight,_that.posAllocatedWeight,_that.segmentationWeight,_that.totalRemainQuantity,_that.totalRemainWeight,_that.freePrice,_that.approvedPrice,_that.approvedPriceStatus,_that.parentProduct,_that.killHouse,_that.guild);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? 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) $default,) {final _that = this;
switch (_that) {
case _InventoryModel():
return $default(_that.id,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.name,_that.provinceGovernmentalCarcassesQuantity,_that.provinceGovernmentalCarcassesWeight,_that.provinceFreeCarcassesQuantity,_that.provinceFreeCarcassesWeight,_that.receiveGovernmentalCarcassesQuantity,_that.receiveGovernmentalCarcassesWeight,_that.receiveFreeCarcassesQuantity,_that.receiveFreeCarcassesWeight,_that.freeBuyingCarcassesQuantity,_that.freeBuyingCarcassesWeight,_that.totalGovernmentalCarcassesQuantity,_that.totalGovernmentalCarcassesWeight,_that.totalFreeBarsCarcassesQuantity,_that.totalFreeBarsCarcassesWeight,_that.weightAverage,_that.totalCarcassesQuantity,_that.totalCarcassesWeight,_that.freezingQuantity,_that.freezingWeight,_that.lossWeight,_that.outProvinceAllocatedQuantity,_that.outProvinceAllocatedWeight,_that.provinceAllocatedQuantity,_that.provinceAllocatedWeight,_that.realAllocatedQuantity,_that.realAllocatedWeight,_that.coldHouseAllocatedWeight,_that.posAllocatedWeight,_that.segmentationWeight,_that.totalRemainQuantity,_that.totalRemainWeight,_that.freePrice,_that.approvedPrice,_that.approvedPriceStatus,_that.parentProduct,_that.killHouse,_that.guild);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? 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)? $default,) {final _that = this;
switch (_that) {
case _InventoryModel() when $default != null:
return $default(_that.id,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.name,_that.provinceGovernmentalCarcassesQuantity,_that.provinceGovernmentalCarcassesWeight,_that.provinceFreeCarcassesQuantity,_that.provinceFreeCarcassesWeight,_that.receiveGovernmentalCarcassesQuantity,_that.receiveGovernmentalCarcassesWeight,_that.receiveFreeCarcassesQuantity,_that.receiveFreeCarcassesWeight,_that.freeBuyingCarcassesQuantity,_that.freeBuyingCarcassesWeight,_that.totalGovernmentalCarcassesQuantity,_that.totalGovernmentalCarcassesWeight,_that.totalFreeBarsCarcassesQuantity,_that.totalFreeBarsCarcassesWeight,_that.weightAverage,_that.totalCarcassesQuantity,_that.totalCarcassesWeight,_that.freezingQuantity,_that.freezingWeight,_that.lossWeight,_that.outProvinceAllocatedQuantity,_that.outProvinceAllocatedWeight,_that.provinceAllocatedQuantity,_that.provinceAllocatedWeight,_that.realAllocatedQuantity,_that.realAllocatedWeight,_that.coldHouseAllocatedWeight,_that.posAllocatedWeight,_that.segmentationWeight,_that.totalRemainQuantity,_that.totalRemainWeight,_that.freePrice,_that.approvedPrice,_that.approvedPriceStatus,_that.parentProduct,_that.killHouse,_that.guild);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -77,6 +76,136 @@ 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 /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -77,6 +76,136 @@ 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 /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -133,6 +132,136 @@ 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 /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -115,6 +114,136 @@ $RequestsInfoCopyWith<$Res>? get requestsInfo {
} }
/// Adds pattern-matching-related methods to [OutProvinceCarcassesBuyer].
extension OutProvinceCarcassesBuyerPatterns on OutProvinceCarcassesBuyer {
/// 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( _OutProvinceCarcassesBuyer value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _OutProvinceCarcassesBuyer() 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( _OutProvinceCarcassesBuyer value) $default,){
final _that = this;
switch (_that) {
case _OutProvinceCarcassesBuyer():
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( _OutProvinceCarcassesBuyer value)? $default,){
final _that = this;
switch (_that) {
case _OutProvinceCarcassesBuyer() 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( Buyer? buyer, RequestsInfo? requestsInfo, String? key, bool? trash, String? fullname, String? firstName, String? lastName, String? mobile, String? unitName, String? city, String? province, String? role, bool? active, String? typeActivity, dynamic killHouse, int? steward)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _OutProvinceCarcassesBuyer() when $default != null:
return $default(_that.buyer,_that.requestsInfo,_that.key,_that.trash,_that.fullname,_that.firstName,_that.lastName,_that.mobile,_that.unitName,_that.city,_that.province,_that.role,_that.active,_that.typeActivity,_that.killHouse,_that.steward);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( Buyer? buyer, RequestsInfo? requestsInfo, String? key, bool? trash, String? fullname, String? firstName, String? lastName, String? mobile, String? unitName, String? city, String? province, String? role, bool? active, String? typeActivity, dynamic killHouse, int? steward) $default,) {final _that = this;
switch (_that) {
case _OutProvinceCarcassesBuyer():
return $default(_that.buyer,_that.requestsInfo,_that.key,_that.trash,_that.fullname,_that.firstName,_that.lastName,_that.mobile,_that.unitName,_that.city,_that.province,_that.role,_that.active,_that.typeActivity,_that.killHouse,_that.steward);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( Buyer? buyer, RequestsInfo? requestsInfo, String? key, bool? trash, String? fullname, String? firstName, String? lastName, String? mobile, String? unitName, String? city, String? province, String? role, bool? active, String? typeActivity, dynamic killHouse, int? steward)? $default,) {final _that = this;
switch (_that) {
case _OutProvinceCarcassesBuyer() when $default != null:
return $default(_that.buyer,_that.requestsInfo,_that.key,_that.trash,_that.fullname,_that.firstName,_that.lastName,_that.mobile,_that.unitName,_that.city,_that.province,_that.role,_that.active,_that.typeActivity,_that.killHouse,_that.steward);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -312,6 +441,136 @@ as int?,
} }
/// Adds pattern-matching-related methods to [Buyer].
extension BuyerPatterns on Buyer {
/// 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( _Buyer value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Buyer() 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( _Buyer value) $default,){
final _that = this;
switch (_that) {
case _Buyer():
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( _Buyer value)? $default,){
final _that = this;
switch (_that) {
case _Buyer() 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, bool? trash, String? fullname, String? firstName, String? lastName, String? mobile, String? unitName, String? city, String? province, bool? active, int? user)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Buyer() when $default != null:
return $default(_that.key,_that.trash,_that.fullname,_that.firstName,_that.lastName,_that.mobile,_that.unitName,_that.city,_that.province,_that.active,_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, bool? trash, String? fullname, String? firstName, String? lastName, String? mobile, String? unitName, String? city, String? province, bool? active, int? user) $default,) {final _that = this;
switch (_that) {
case _Buyer():
return $default(_that.key,_that.trash,_that.fullname,_that.firstName,_that.lastName,_that.mobile,_that.unitName,_that.city,_that.province,_that.active,_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, bool? trash, String? fullname, String? firstName, String? lastName, String? mobile, String? unitName, String? city, String? province, bool? active, int? user)? $default,) {final _that = this;
switch (_that) {
case _Buyer() when $default != null:
return $default(_that.key,_that.trash,_that.fullname,_that.firstName,_that.lastName,_that.mobile,_that.unitName,_that.city,_that.province,_that.active,_that.user);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -467,6 +726,136 @@ as double?,
} }
/// Adds pattern-matching-related methods to [RequestsInfo].
extension RequestsInfoPatterns on RequestsInfo {
/// 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( _RequestsInfo value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _RequestsInfo() 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( _RequestsInfo value) $default,){
final _that = this;
switch (_that) {
case _RequestsInfo():
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( _RequestsInfo value)? $default,){
final _that = this;
switch (_that) {
case _RequestsInfo() 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? numberOfRequests, int? totalQuantity, double? totalWeight)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _RequestsInfo() when $default != null:
return $default(_that.numberOfRequests,_that.totalQuantity,_that.totalWeight);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? numberOfRequests, int? totalQuantity, double? totalWeight) $default,) {final _that = this;
switch (_that) {
case _RequestsInfo():
return $default(_that.numberOfRequests,_that.totalQuantity,_that.totalWeight);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? numberOfRequests, int? totalQuantity, double? totalWeight)? $default,) {final _that = this;
switch (_that) {
case _RequestsInfo() when $default != null:
return $default(_that.numberOfRequests,_that.totalQuantity,_that.totalWeight);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -76,6 +75,136 @@ as List<ProductModel>,
} }
/// Adds pattern-matching-related methods to [RolesProductsModel].
extension RolesProductsModelPatterns on RolesProductsModel {
/// 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( _RolesProductsModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _RolesProductsModel() 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( _RolesProductsModel value) $default,){
final _that = this;
switch (_that) {
case _RolesProductsModel():
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( _RolesProductsModel value)? $default,){
final _that = this;
switch (_that) {
case _RolesProductsModel() 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<ProductModel> products)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _RolesProductsModel() when $default != null:
return $default(_that.products);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<ProductModel> products) $default,) {final _that = this;
switch (_that) {
case _RolesProductsModel():
return $default(_that.products);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<ProductModel> products)? $default,) {final _that = this;
switch (_that) {
case _RolesProductsModel() when $default != null:
return $default(_that.products);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -261,6 +390,136 @@ as int?,
} }
/// Adds pattern-matching-related methods to [ProductModel].
extension ProductModelPatterns on ProductModel {
/// 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( _ProductModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ProductModel() 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( _ProductModel value) $default,){
final _that = this;
switch (_that) {
case _ProductModel():
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( _ProductModel value)? $default,){
final _that = this;
switch (_that) {
case _ProductModel() 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? key, String? create_date, String? modify_date, 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, dynamic createdBy, dynamic modifiedBy, int? parentProduct, dynamic killHouse, int? guild)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ProductModel() when $default != null:
return $default(_that.id,_that.key,_that.create_date,_that.modify_date,_that.trash,_that.name,_that.provinceGovernmentalCarcassesQuantity,_that.provinceGovernmentalCarcassesWeight,_that.provinceFreeCarcassesQuantity,_that.provinceFreeCarcassesWeight,_that.receiveGovernmentalCarcassesQuantity,_that.receiveGovernmentalCarcassesWeight,_that.receiveFreeCarcassesQuantity,_that.receiveFreeCarcassesWeight,_that.freeBuyingCarcassesQuantity,_that.freeBuyingCarcassesWeight,_that.totalGovernmentalCarcassesQuantity,_that.totalGovernmentalCarcassesWeight,_that.totalFreeBarsCarcassesQuantity,_that.totalFreeBarsCarcassesWeight,_that.weightAverage,_that.totalCarcassesQuantity,_that.totalCarcassesWeight,_that.freezingQuantity,_that.freezingWeight,_that.lossWeight,_that.outProvinceAllocatedQuantity,_that.outProvinceAllocatedWeight,_that.provinceAllocatedQuantity,_that.provinceAllocatedWeight,_that.realAllocatedQuantity,_that.realAllocatedWeight,_that.coldHouseAllocatedWeight,_that.posAllocatedWeight,_that.segmentationWeight,_that.totalRemainQuantity,_that.totalRemainWeight,_that.freePrice,_that.approvedPrice,_that.approvedPriceStatus,_that.createdBy,_that.modifiedBy,_that.parentProduct,_that.killHouse,_that.guild);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? key, String? create_date, String? modify_date, 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, dynamic createdBy, dynamic modifiedBy, int? parentProduct, dynamic killHouse, int? guild) $default,) {final _that = this;
switch (_that) {
case _ProductModel():
return $default(_that.id,_that.key,_that.create_date,_that.modify_date,_that.trash,_that.name,_that.provinceGovernmentalCarcassesQuantity,_that.provinceGovernmentalCarcassesWeight,_that.provinceFreeCarcassesQuantity,_that.provinceFreeCarcassesWeight,_that.receiveGovernmentalCarcassesQuantity,_that.receiveGovernmentalCarcassesWeight,_that.receiveFreeCarcassesQuantity,_that.receiveFreeCarcassesWeight,_that.freeBuyingCarcassesQuantity,_that.freeBuyingCarcassesWeight,_that.totalGovernmentalCarcassesQuantity,_that.totalGovernmentalCarcassesWeight,_that.totalFreeBarsCarcassesQuantity,_that.totalFreeBarsCarcassesWeight,_that.weightAverage,_that.totalCarcassesQuantity,_that.totalCarcassesWeight,_that.freezingQuantity,_that.freezingWeight,_that.lossWeight,_that.outProvinceAllocatedQuantity,_that.outProvinceAllocatedWeight,_that.provinceAllocatedQuantity,_that.provinceAllocatedWeight,_that.realAllocatedQuantity,_that.realAllocatedWeight,_that.coldHouseAllocatedWeight,_that.posAllocatedWeight,_that.segmentationWeight,_that.totalRemainQuantity,_that.totalRemainWeight,_that.freePrice,_that.approvedPrice,_that.approvedPriceStatus,_that.createdBy,_that.modifiedBy,_that.parentProduct,_that.killHouse,_that.guild);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? key, String? create_date, String? modify_date, 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, dynamic createdBy, dynamic modifiedBy, int? parentProduct, dynamic killHouse, int? guild)? $default,) {final _that = this;
switch (_that) {
case _ProductModel() when $default != null:
return $default(_that.id,_that.key,_that.create_date,_that.modify_date,_that.trash,_that.name,_that.provinceGovernmentalCarcassesQuantity,_that.provinceGovernmentalCarcassesWeight,_that.provinceFreeCarcassesQuantity,_that.provinceFreeCarcassesWeight,_that.receiveGovernmentalCarcassesQuantity,_that.receiveGovernmentalCarcassesWeight,_that.receiveFreeCarcassesQuantity,_that.receiveFreeCarcassesWeight,_that.freeBuyingCarcassesQuantity,_that.freeBuyingCarcassesWeight,_that.totalGovernmentalCarcassesQuantity,_that.totalGovernmentalCarcassesWeight,_that.totalFreeBarsCarcassesQuantity,_that.totalFreeBarsCarcassesWeight,_that.weightAverage,_that.totalCarcassesQuantity,_that.totalCarcassesWeight,_that.freezingQuantity,_that.freezingWeight,_that.lossWeight,_that.outProvinceAllocatedQuantity,_that.outProvinceAllocatedWeight,_that.provinceAllocatedQuantity,_that.provinceAllocatedWeight,_that.realAllocatedQuantity,_that.realAllocatedWeight,_that.coldHouseAllocatedWeight,_that.posAllocatedWeight,_that.segmentationWeight,_that.totalRemainQuantity,_that.totalRemainWeight,_that.freePrice,_that.approvedPrice,_that.approvedPriceStatus,_that.createdBy,_that.modifiedBy,_that.parentProduct,_that.killHouse,_that.guild);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -107,6 +106,136 @@ $ToGuildCopyWith<$Res>? get toGuild {
} }
/// Adds pattern-matching-related methods to [SegmentationModel].
extension SegmentationModelPatterns on SegmentationModel {
/// 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( _SegmentationModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _SegmentationModel() 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( _SegmentationModel value) $default,){
final _that = this;
switch (_that) {
case _SegmentationModel():
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( _SegmentationModel value)? $default,){
final _that = this;
switch (_that) {
case _SegmentationModel() 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? productKey, String? guildKey, String? result, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _SegmentationModel() when $default != null:
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.weight,_that.buyer,_that.date,_that.toGuild);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? productKey, String? guildKey, String? result, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild) $default,) {final _that = this;
switch (_that) {
case _SegmentationModel():
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.weight,_that.buyer,_that.date,_that.toGuild);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? productKey, String? guildKey, String? result, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild)? $default,) {final _that = this;
switch (_that) {
case _SegmentationModel() when $default != null:
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.weight,_that.buyer,_that.date,_that.toGuild);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -280,6 +409,136 @@ as String?,
} }
/// Adds pattern-matching-related methods to [Buyer].
extension BuyerPatterns on Buyer {
/// 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( _Buyer value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Buyer() 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( _Buyer value) $default,){
final _that = this;
switch (_that) {
case _Buyer():
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( _Buyer value)? $default,){
final _that = this;
switch (_that) {
case _Buyer() 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? shop)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Buyer() when $default != null:
return $default(_that.fullname,_that.mobile,_that.shop);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? shop) $default,) {final _that = this;
switch (_that) {
case _Buyer():
return $default(_that.fullname,_that.mobile,_that.shop);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? shop)? $default,) {final _that = this;
switch (_that) {
case _Buyer() when $default != null:
return $default(_that.fullname,_that.mobile,_that.shop);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -435,6 +694,136 @@ $UserCopyWith<$Res>? get user {
} }
/// Adds pattern-matching-related methods to [ToGuild].
extension ToGuildPatterns on ToGuild {
/// 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( _ToGuild value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ToGuild() 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( _ToGuild value) $default,){
final _that = this;
switch (_that) {
case _ToGuild():
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( _ToGuild value)? $default,){
final _that = this;
switch (_that) {
case _ToGuild() 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, String? typeActivity, String? areaActivity, String? guildsId, bool? steward, User? user)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ToGuild() when $default != null:
return $default(_that.key,_that.guildsName,_that.typeActivity,_that.areaActivity,_that.guildsId,_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, String? typeActivity, String? areaActivity, String? guildsId, bool? steward, User? user) $default,) {final _that = this;
switch (_that) {
case _ToGuild():
return $default(_that.key,_that.guildsName,_that.typeActivity,_that.areaActivity,_that.guildsId,_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, String? typeActivity, String? areaActivity, String? guildsId, bool? steward, User? user)? $default,) {final _that = this;
switch (_that) {
case _ToGuild() when $default != null:
return $default(_that.key,_that.guildsName,_that.typeActivity,_that.areaActivity,_that.guildsId,_that.steward,_that.user);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -597,6 +986,136 @@ 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? firstName, String? lastName, String? mobile, String? nationalId, String? city)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _User() when $default != null:
return $default(_that.fullname,_that.firstName,_that.lastName,_that.mobile,_that.nationalId,_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? firstName, String? lastName, String? mobile, String? nationalId, String? city) $default,) {final _that = this;
switch (_that) {
case _User():
return $default(_that.fullname,_that.firstName,_that.lastName,_that.mobile,_that.nationalId,_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? firstName, String? lastName, String? mobile, String? nationalId, String? city)? $default,) {final _that = this;
switch (_that) {
case _User() when $default != null:
return $default(_that.fullname,_that.firstName,_that.lastName,_that.mobile,_that.nationalId,_that.city);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -125,6 +124,136 @@ $ProductCopyWith<$Res>? get product {
} }
/// Adds pattern-matching-related methods to [StewardFreeBar].
extension StewardFreeBarPatterns on StewardFreeBar {
/// 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( _StewardFreeBar value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _StewardFreeBar() 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( _StewardFreeBar value) $default,){
final _that = this;
switch (_that) {
case _StewardFreeBar():
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( _StewardFreeBar value)? $default,){
final _that = this;
switch (_that) {
case _StewardFreeBar() 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, Steward? steward, dynamic guild, Product? product, String? key, String? createDate, String? modifyDate, bool? trash, String? killHouseName, String? killHouseMobile, String? killHouseVetName, String? killHouseVetMobile, String? province, String? city, String? driverName, String? driverMobile, dynamic car, String? pelak, int? numberOfCarcasses, double? weightOfCarcasses, String? barImage, String? date, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _StewardFreeBar() when $default != null:
return $default(_that.id,_that.steward,_that.guild,_that.product,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.killHouseName,_that.killHouseMobile,_that.killHouseVetName,_that.killHouseVetMobile,_that.province,_that.city,_that.driverName,_that.driverMobile,_that.car,_that.pelak,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.barImage,_that.date,_that.temporaryTrash,_that.temporaryDeleted,_that.createdBy,_that.modifiedBy);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, Steward? steward, dynamic guild, Product? product, String? key, String? createDate, String? modifyDate, bool? trash, String? killHouseName, String? killHouseMobile, String? killHouseVetName, String? killHouseVetMobile, String? province, String? city, String? driverName, String? driverMobile, dynamic car, String? pelak, int? numberOfCarcasses, double? weightOfCarcasses, String? barImage, String? date, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy) $default,) {final _that = this;
switch (_that) {
case _StewardFreeBar():
return $default(_that.id,_that.steward,_that.guild,_that.product,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.killHouseName,_that.killHouseMobile,_that.killHouseVetName,_that.killHouseVetMobile,_that.province,_that.city,_that.driverName,_that.driverMobile,_that.car,_that.pelak,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.barImage,_that.date,_that.temporaryTrash,_that.temporaryDeleted,_that.createdBy,_that.modifiedBy);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, Steward? steward, dynamic guild, Product? product, String? key, String? createDate, String? modifyDate, bool? trash, String? killHouseName, String? killHouseMobile, String? killHouseVetName, String? killHouseVetMobile, String? province, String? city, String? driverName, String? driverMobile, dynamic car, String? pelak, int? numberOfCarcasses, double? weightOfCarcasses, String? barImage, String? date, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy)? $default,) {final _that = this;
switch (_that) {
case _StewardFreeBar() when $default != null:
return $default(_that.id,_that.steward,_that.guild,_that.product,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.killHouseName,_that.killHouseMobile,_that.killHouseVetName,_that.killHouseVetMobile,_that.province,_that.city,_that.driverName,_that.driverMobile,_that.car,_that.pelak,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.barImage,_that.date,_that.temporaryTrash,_that.temporaryDeleted,_that.createdBy,_that.modifiedBy);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -365,6 +494,136 @@ $AddressCopyWith<$Res>? get address {
} }
/// Adds pattern-matching-related methods to [Steward].
extension StewardPatterns on Steward {
/// 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( _Steward value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Steward() 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( _Steward value) $default,){
final _that = this;
switch (_that) {
case _Steward():
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( _Steward value)? $default,){
final _that = this;
switch (_that) {
case _Steward() 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( User? user, String? guildsName, bool? steward, int? allocationLimit, Address? address, String? licenseNumber, String? typeActivity, String? areaActivity, String? guildsId, String? createDate)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Steward() when $default != null:
return $default(_that.user,_that.guildsName,_that.steward,_that.allocationLimit,_that.address,_that.licenseNumber,_that.typeActivity,_that.areaActivity,_that.guildsId,_that.createDate);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( User? user, String? guildsName, bool? steward, int? allocationLimit, Address? address, String? licenseNumber, String? typeActivity, String? areaActivity, String? guildsId, String? createDate) $default,) {final _that = this;
switch (_that) {
case _Steward():
return $default(_that.user,_that.guildsName,_that.steward,_that.allocationLimit,_that.address,_that.licenseNumber,_that.typeActivity,_that.areaActivity,_that.guildsId,_that.createDate);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( User? user, String? guildsName, bool? steward, int? allocationLimit, Address? address, String? licenseNumber, String? typeActivity, String? areaActivity, String? guildsId, String? createDate)? $default,) {final _that = this;
switch (_that) {
case _Steward() when $default != null:
return $default(_that.user,_that.guildsName,_that.steward,_that.allocationLimit,_that.address,_that.licenseNumber,_that.typeActivity,_that.areaActivity,_that.guildsId,_that.createDate);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -568,6 +827,136 @@ $CityCopyWith<$Res>? get city {
} }
/// 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? firstName, String? lastName, int? baseOrder, String? mobile, String? nationalId, String? nationalCode, String? key, City? city, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _User() when $default != null:
return $default(_that.fullname,_that.firstName,_that.lastName,_that.baseOrder,_that.mobile,_that.nationalId,_that.nationalCode,_that.key,_that.city,_that.unitName,_that.unitNationalId,_that.unitRegistrationNumber,_that.unitEconomicalNumber,_that.unitProvince,_that.unitCity,_that.unitPostalCode,_that.unitAddress);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? firstName, String? lastName, int? baseOrder, String? mobile, String? nationalId, String? nationalCode, String? key, City? city, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress) $default,) {final _that = this;
switch (_that) {
case _User():
return $default(_that.fullname,_that.firstName,_that.lastName,_that.baseOrder,_that.mobile,_that.nationalId,_that.nationalCode,_that.key,_that.city,_that.unitName,_that.unitNationalId,_that.unitRegistrationNumber,_that.unitEconomicalNumber,_that.unitProvince,_that.unitCity,_that.unitPostalCode,_that.unitAddress);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? firstName, String? lastName, int? baseOrder, String? mobile, String? nationalId, String? nationalCode, String? key, City? city, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress)? $default,) {final _that = this;
switch (_that) {
case _User() when $default != null:
return $default(_that.fullname,_that.firstName,_that.lastName,_that.baseOrder,_that.mobile,_that.nationalId,_that.nationalCode,_that.key,_that.city,_that.unitName,_that.unitNationalId,_that.unitRegistrationNumber,_that.unitEconomicalNumber,_that.unitProvince,_that.unitCity,_that.unitPostalCode,_that.unitAddress);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -761,6 +1150,136 @@ as int?,
} }
/// Adds pattern-matching-related methods to [City].
extension CityPatterns on City {
/// 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( _City value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _City() 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( _City value) $default,){
final _that = this;
switch (_that) {
case _City():
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( _City value)? $default,){
final _that = this;
switch (_that) {
case _City() 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? key, String? createDate, String? modifyDate, bool? trash, int? provinceIdForeignKey, int? cityIdKey, String? name, double? productPrice, bool? provinceCenter, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, String? createdBy, String? modifiedBy, int? province)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _City() when $default != null:
return $default(_that.id,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.provinceIdForeignKey,_that.cityIdKey,_that.name,_that.productPrice,_that.provinceCenter,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName,_that.createdBy,_that.modifiedBy,_that.province);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? key, String? createDate, String? modifyDate, bool? trash, int? provinceIdForeignKey, int? cityIdKey, String? name, double? productPrice, bool? provinceCenter, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, String? createdBy, String? modifiedBy, int? province) $default,) {final _that = this;
switch (_that) {
case _City():
return $default(_that.id,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.provinceIdForeignKey,_that.cityIdKey,_that.name,_that.productPrice,_that.provinceCenter,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName,_that.createdBy,_that.modifiedBy,_that.province);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? key, String? createDate, String? modifyDate, bool? trash, int? provinceIdForeignKey, int? cityIdKey, String? name, double? productPrice, bool? provinceCenter, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, String? createdBy, String? modifiedBy, int? province)? $default,) {final _that = this;
switch (_that) {
case _City() when $default != null:
return $default(_that.id,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.provinceIdForeignKey,_that.cityIdKey,_that.name,_that.productPrice,_that.provinceCenter,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName,_that.createdBy,_that.modifiedBy,_that.province);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -953,6 +1472,136 @@ $CityCopyWith<$Res>? get city {
} }
/// Adds pattern-matching-related methods to [Address].
extension AddressPatterns on Address {
/// 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( _Address value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Address() 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( _Address value) $default,){
final _that = this;
switch (_that) {
case _Address():
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( _Address value)? $default,){
final _that = this;
switch (_that) {
case _Address() 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( Province? province, City? city, String? address, String? postalCode)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Address() when $default != null:
return $default(_that.province,_that.city,_that.address,_that.postalCode);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( Province? province, City? city, String? address, String? postalCode) $default,) {final _that = this;
switch (_that) {
case _Address():
return $default(_that.province,_that.city,_that.address,_that.postalCode);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( Province? province, City? city, String? address, String? postalCode)? $default,) {final _that = this;
switch (_that) {
case _Address() when $default != null:
return $default(_that.province,_that.city,_that.address,_that.postalCode);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -1117,6 +1766,136 @@ as String?,
} }
/// Adds pattern-matching-related methods to [Province].
extension ProvincePatterns on Province {
/// 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( _Province value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Province() 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( _Province value) $default,){
final _that = this;
switch (_that) {
case _Province():
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( _Province value)? $default,){
final _that = this;
switch (_that) {
case _Province() 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? name)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Province() when $default != null:
return $default(_that.key,_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( String? key, String? name) $default,) {final _that = this;
switch (_that) {
case _Province():
return $default(_that.key,_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( String? key, String? name)? $default,) {final _that = this;
switch (_that) {
case _Province() when $default != null:
return $default(_that.key,_that.name);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -1253,6 +2032,136 @@ as String?,
} }
/// Adds pattern-matching-related methods to [Product].
extension ProductPatterns on Product {
/// 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( _Product value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Product() 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( _Product value) $default,){
final _that = this;
switch (_that) {
case _Product():
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( _Product value)? $default,){
final _that = this;
switch (_that) {
case _Product() 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? name)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Product() when $default != null:
return $default(_that.key,_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( String? key, String? name) $default,) {final _that = this;
switch (_that) {
case _Product():
return $default(_that.key,_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( String? key, String? name)? $default,) {final _that = this;
switch (_that) {
case _Product() when $default != null:
return $default(_that.key,_that.name);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -79,6 +78,136 @@ as double?,
} }
/// Adds pattern-matching-related methods to [StewardFreeBarDashboard].
extension StewardFreeBarDashboardPatterns on StewardFreeBarDashboard {
/// 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( _StewardFreeBarDashboard value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _StewardFreeBarDashboard() 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( _StewardFreeBarDashboard value) $default,){
final _that = this;
switch (_that) {
case _StewardFreeBarDashboard():
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( _StewardFreeBarDashboard value)? $default,){
final _that = this;
switch (_that) {
case _StewardFreeBarDashboard() 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? product, int? totalBars, double? totalQuantity, double? totalWeight)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _StewardFreeBarDashboard() when $default != null:
return $default(_that.product,_that.totalBars,_that.totalQuantity,_that.totalWeight);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? product, int? totalBars, double? totalQuantity, double? totalWeight) $default,) {final _that = this;
switch (_that) {
case _StewardFreeBarDashboard():
return $default(_that.product,_that.totalBars,_that.totalQuantity,_that.totalWeight);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? product, int? totalBars, double? totalQuantity, double? totalWeight)? $default,) {final _that = this;
switch (_that) {
case _StewardFreeBarDashboard() when $default != null:
return $default(_that.product,_that.totalBars,_that.totalQuantity,_that.totalWeight);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -112,6 +111,136 @@ $BuyerCopyWith<$Res>? get buyer {
} }
/// Adds pattern-matching-related methods to [StewardFreeSaleBar].
extension StewardFreeSaleBarPatterns on StewardFreeSaleBar {
/// 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( _StewardFreeSaleBar value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _StewardFreeSaleBar() 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( _StewardFreeSaleBar value) $default,){
final _that = this;
switch (_that) {
case _StewardFreeSaleBar():
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( _StewardFreeSaleBar value)? $default,){
final _that = this;
switch (_that) {
case _StewardFreeSaleBar() 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, Buyer? buyer, String? key, String? createDate, String? modifyDate, bool? trash, String? buyerName, String? buyerMobile, String? province, String? city, String? driverName, String? driverMobile, String? typeCar, String? pelak, String? clearanceCode, int? numberOfCarcasses, double? weightOfCarcasses, String? date, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy, dynamic steward, dynamic guild, dynamic product)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _StewardFreeSaleBar() when $default != null:
return $default(_that.id,_that.buyer,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.buyerName,_that.buyerMobile,_that.province,_that.city,_that.driverName,_that.driverMobile,_that.typeCar,_that.pelak,_that.clearanceCode,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.temporaryTrash,_that.temporaryDeleted,_that.createdBy,_that.modifiedBy,_that.steward,_that.guild,_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, Buyer? buyer, String? key, String? createDate, String? modifyDate, bool? trash, String? buyerName, String? buyerMobile, String? province, String? city, String? driverName, String? driverMobile, String? typeCar, String? pelak, String? clearanceCode, int? numberOfCarcasses, double? weightOfCarcasses, String? date, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy, dynamic steward, dynamic guild, dynamic product) $default,) {final _that = this;
switch (_that) {
case _StewardFreeSaleBar():
return $default(_that.id,_that.buyer,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.buyerName,_that.buyerMobile,_that.province,_that.city,_that.driverName,_that.driverMobile,_that.typeCar,_that.pelak,_that.clearanceCode,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.temporaryTrash,_that.temporaryDeleted,_that.createdBy,_that.modifiedBy,_that.steward,_that.guild,_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, Buyer? buyer, String? key, String? createDate, String? modifyDate, bool? trash, String? buyerName, String? buyerMobile, String? province, String? city, String? driverName, String? driverMobile, String? typeCar, String? pelak, String? clearanceCode, int? numberOfCarcasses, double? weightOfCarcasses, String? date, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy, dynamic steward, dynamic guild, dynamic product)? $default,) {final _that = this;
switch (_that) {
case _StewardFreeSaleBar() when $default != null:
return $default(_that.id,_that.buyer,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.buyerName,_that.buyerMobile,_that.province,_that.city,_that.driverName,_that.driverMobile,_that.typeCar,_that.pelak,_that.clearanceCode,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.temporaryTrash,_that.temporaryDeleted,_that.createdBy,_that.modifiedBy,_that.steward,_that.guild,_that.product);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -326,6 +455,136 @@ $BuyerStewardCopyWith<$Res>? get steward {
} }
/// Adds pattern-matching-related methods to [Buyer].
extension BuyerPatterns on Buyer {
/// 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( _Buyer value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Buyer() 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( _Buyer value) $default,){
final _that = this;
switch (_that) {
case _Buyer():
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( _Buyer value)? $default,){
final _that = this;
switch (_that) {
case _Buyer() 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? fullname, String? firstName, String? lastName, String? mobile, String? unitName, String? city, String? province, bool? active, BuyerSteward? steward)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Buyer() when $default != null:
return $default(_that.key,_that.fullname,_that.firstName,_that.lastName,_that.mobile,_that.unitName,_that.city,_that.province,_that.active,_that.steward);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? fullname, String? firstName, String? lastName, String? mobile, String? unitName, String? city, String? province, bool? active, BuyerSteward? steward) $default,) {final _that = this;
switch (_that) {
case _Buyer():
return $default(_that.key,_that.fullname,_that.firstName,_that.lastName,_that.mobile,_that.unitName,_that.city,_that.province,_that.active,_that.steward);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? fullname, String? firstName, String? lastName, String? mobile, String? unitName, String? city, String? province, bool? active, BuyerSteward? steward)? $default,) {final _that = this;
switch (_that) {
case _Buyer() when $default != null:
return $default(_that.key,_that.fullname,_that.firstName,_that.lastName,_that.mobile,_that.unitName,_that.city,_that.province,_that.active,_that.steward);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -505,6 +764,136 @@ $BuyerStewardUserCopyWith<$Res>? get user {
} }
/// Adds pattern-matching-related methods to [BuyerSteward].
extension BuyerStewardPatterns on BuyerSteward {
/// 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( _BuyerSteward value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _BuyerSteward() 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( _BuyerSteward value) $default,){
final _that = this;
switch (_that) {
case _BuyerSteward():
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( _BuyerSteward value)? $default,){
final _that = this;
switch (_that) {
case _BuyerSteward() 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, BuyerStewardUser? user, String? typeActivity, String? areaActivity)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _BuyerSteward() when $default != null:
return $default(_that.key,_that.guildsName,_that.user,_that.typeActivity,_that.areaActivity);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, BuyerStewardUser? user, String? typeActivity, String? areaActivity) $default,) {final _that = this;
switch (_that) {
case _BuyerSteward():
return $default(_that.key,_that.guildsName,_that.user,_that.typeActivity,_that.areaActivity);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, BuyerStewardUser? user, String? typeActivity, String? areaActivity)? $default,) {final _that = this;
switch (_that) {
case _BuyerSteward() when $default != null:
return $default(_that.key,_that.guildsName,_that.user,_that.typeActivity,_that.areaActivity);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -665,6 +1054,136 @@ as String?,
} }
/// Adds pattern-matching-related methods to [BuyerStewardUser].
extension BuyerStewardUserPatterns on BuyerStewardUser {
/// 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( _BuyerStewardUser value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _BuyerStewardUser() 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( _BuyerStewardUser value) $default,){
final _that = this;
switch (_that) {
case _BuyerStewardUser():
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( _BuyerStewardUser value)? $default,){
final _that = this;
switch (_that) {
case _BuyerStewardUser() 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? firstName, String? lastName, String? mobile, String? nationalId, String? provinceName, String? cityName, String? password)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _BuyerStewardUser() when $default != null:
return $default(_that.fullname,_that.firstName,_that.lastName,_that.mobile,_that.nationalId,_that.provinceName,_that.cityName,_that.password);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? firstName, String? lastName, String? mobile, String? nationalId, String? provinceName, String? cityName, String? password) $default,) {final _that = this;
switch (_that) {
case _BuyerStewardUser():
return $default(_that.fullname,_that.firstName,_that.lastName,_that.mobile,_that.nationalId,_that.provinceName,_that.cityName,_that.password);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? firstName, String? lastName, String? mobile, String? nationalId, String? provinceName, String? cityName, String? password)? $default,) {final _that = this;
switch (_that) {
case _BuyerStewardUser() when $default != null:
return $default(_that.fullname,_that.firstName,_that.lastName,_that.mobile,_that.nationalId,_that.provinceName,_that.cityName,_that.password);case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -1,6 +1,5 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // 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 // 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
@@ -123,6 +122,136 @@ $UserStateCopyWith<$Res>? get state {
} }
/// 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 /// @nodoc
@JsonSerializable() @JsonSerializable()
@@ -354,6 +483,136 @@ 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 /// @nodoc
@JsonSerializable() @JsonSerializable()

View File

@@ -12,90 +12,90 @@ class AppFonts {
static const FontWeight bold = FontWeight.w600; static const FontWeight bold = FontWeight.w600;
static const double _height = 1.20; static const double _height = 1.20;
static const TextStyle yekan61 = TextStyle( static TextStyle yekan61 = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: regular, fontWeight: regular,
fontSize: 61, fontSize: 61.sp,
height: _height, height: _height,
); );
static const TextStyle yekan49 = TextStyle( static TextStyle yekan49 = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: regular, fontWeight: regular,
fontSize: 48, fontSize: 48.sp,
height: _height, height: _height,
); );
static const TextStyle yekan39 = TextStyle( static TextStyle yekan39 = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: regular, fontWeight: regular,
fontSize: 39, fontSize: 39.sp,
height: _height, height: _height,
); );
static const TextStyle yekan31 = TextStyle( static TextStyle yekan31 = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: regular, fontWeight: regular,
fontSize: 31, fontSize: 31.sp,
height: _height, height: _height,
); );
static const TextStyle yekan25 = TextStyle( static TextStyle yekan25 = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: regular, fontWeight: regular,
fontSize: 25, fontSize: 25.sp,
height: _height, height: _height,
); );
static const TextStyle yekan24 = TextStyle( static TextStyle yekan24 = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: regular, fontWeight: regular,
fontSize: 24, fontSize: 24.sp,
height: _height, height: _height,
); );
static const TextStyle yekan20 = TextStyle( static TextStyle yekan20 = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: regular, fontWeight: regular,
fontSize: 20, fontSize: 20.sp,
height: _height, height: _height,
); );
static const TextStyle yekan18 = TextStyle( static TextStyle yekan18 = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: regular, fontWeight: regular,
fontSize: 18, fontSize: 18.sp,
height: _height, height: _height,
); );
static const TextStyle yekan16 = TextStyle( static TextStyle yekan16 = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: regular, fontWeight: regular,
fontSize: 16, fontSize: 16.sp,
height: _height, height: _height,
); );
static const TextStyle yekan14 = TextStyle( static TextStyle yekan14 = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: regular, fontWeight: regular,
fontSize: 13, fontSize: 13.sp,
height: _height, height: _height,
); );
static const TextStyle yekan13 = TextStyle( static TextStyle yekan13 = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: regular, fontWeight: regular,
fontSize: 13, fontSize: 13.sp,
height: _height, height: _height,
); );
static const TextStyle yekan12 = TextStyle( static TextStyle yekan12 = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: regular, fontWeight: regular,
fontSize: 12, fontSize: 12.sp,
height: _height, height: _height,
); );
@@ -109,84 +109,84 @@ class AppFonts {
); );
static const TextStyle yekan8= TextStyle( static TextStyle yekan8= TextStyle(
// Rounded from 10.24 // Rounded from 10.24
fontFamily: yekan, fontFamily: yekan,
fontWeight: regular, fontWeight: regular,
fontSize: 8, fontSize: 8.sp,
height: _height, height: _height,
); );
static const TextStyle yekan61Bold = TextStyle( static TextStyle yekan61Bold = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: bold, // Use bold weight fontWeight: bold, // Use bold weight
fontSize: 61, fontSize: 61.sp,
height: _height, height: _height,
); );
static const TextStyle yekan49Bold = TextStyle( static TextStyle yekan49Bold = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: bold, // Use bold weight fontWeight: bold, // Use bold weight
fontSize: 48, fontSize: 48.sp,
height: _height, height: _height,
); );
static const TextStyle yekan39Bold = TextStyle( static TextStyle yekan39Bold = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: bold, // Use bold weight fontWeight: bold, // Use bold weight
fontSize: 39, fontSize: 39.sp,
height: _height, height: _height,
); );
static const TextStyle yekan31Bold = TextStyle( static TextStyle yekan31Bold = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: bold, // Use bold weight fontWeight: bold, // Use bold weight
fontSize: 31, fontSize: 31.sp,
height: _height, height: _height,
); );
static const TextStyle yekan25Bold = TextStyle( static TextStyle yekan25Bold = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: bold, // Use bold weight fontWeight: bold, // Use bold weight
fontSize: 25, fontSize: 25.sp,
height: _height, height: _height,
); );
static const TextStyle yekan24Bold = TextStyle( static TextStyle yekan24Bold = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: bold, // Use bold weight fontWeight: bold, // Use bold weight
fontSize: 24, fontSize: 24.sp,
height: _height, height: _height,
); );
static const TextStyle yekan20Bold = TextStyle( static TextStyle yekan20Bold = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: bold, // Use bold weight fontWeight: bold, // Use bold weight
fontSize: 20, fontSize: 20.sp,
height: _height, height: _height,
); );
static const TextStyle yekan16Bold = TextStyle( static TextStyle yekan16Bold = TextStyle(
// Base size bold // Base size bold
fontFamily: yekan, fontFamily: yekan,
fontWeight: bold, // Use bold weight fontWeight: bold, // Use bold weight
fontSize: 16, fontSize: 16.sp,
height: _height, height: _height,
); );
static const TextStyle yekan14Bold = TextStyle( static TextStyle yekan14Bold = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: bold, // Use bold weight fontWeight: bold, // Use bold weight
fontSize: 13, fontSize: 13.sp,
height: _height, height: _height,
); );
static const TextStyle yekan13Bold = TextStyle( static TextStyle yekan13Bold = TextStyle(
fontFamily: yekan, fontFamily: yekan,
fontWeight: bold, // Use bold weight fontWeight: bold, // Use bold weight
fontSize: 13, fontSize: 13.sp,
height: _height, height: _height,
); );

View File

@@ -1,3 +1,5 @@
// dart format width=120
/// GENERATED CODE - DO NOT MODIFY BY HAND /// GENERATED CODE - DO NOT MODIFY BY HAND
/// ***************************************************** /// *****************************************************
/// FlutterGen /// FlutterGen
@@ -5,7 +7,7 @@
// coverage:ignore-file // coverage:ignore-file
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use // ignore_for_file: deprecated_member_use,directives_ordering,implicit_dynamic_list_literal,unnecessary_import
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
@@ -658,12 +660,13 @@ class Assets {
} }
class AssetGenImage { class AssetGenImage {
const AssetGenImage(this._assetName, {this.size, this.flavors = const {}}); const AssetGenImage(this._assetName, {this.size, this.flavors = const {}, this.animation});
final String _assetName; final String _assetName;
final Size? size; final Size? size;
final Set<String> flavors; final Set<String> flavors;
final AssetGenImageAnimation? animation;
Image image({ Image image({
Key? key, Key? key,
@@ -727,6 +730,14 @@ class AssetGenImage {
String get keyName => _assetName; String get keyName => _assetName;
} }
class AssetGenImageAnimation {
const AssetGenImageAnimation({required this.isAnimation, required this.duration, required this.frames});
final bool isAnimation;
final Duration duration;
final int frames;
}
class SvgGenImage { class SvgGenImage {
const SvgGenImage(this._assetName, {this.size, this.flavors = const {}}) : _isVecFormat = false; const SvgGenImage(this._assetName, {this.size, this.flavors = const {}}) : _isVecFormat = false;
@@ -751,6 +762,7 @@ class SvgGenImage {
String? semanticsLabel, String? semanticsLabel,
bool excludeFromSemantics = false, bool excludeFromSemantics = false,
_svg.SvgTheme? theme, _svg.SvgTheme? theme,
_svg.ColorMapper? colorMapper,
ColorFilter? colorFilter, ColorFilter? colorFilter,
Clip clipBehavior = Clip.hardEdge, Clip clipBehavior = Clip.hardEdge,
@deprecated Color? color, @deprecated Color? color,
@@ -761,7 +773,13 @@ class SvgGenImage {
if (_isVecFormat) { if (_isVecFormat) {
loader = _vg.AssetBytesLoader(_assetName, assetBundle: bundle, packageName: package); loader = _vg.AssetBytesLoader(_assetName, assetBundle: bundle, packageName: package);
} else { } else {
loader = _svg.SvgAssetLoader(_assetName, assetBundle: bundle, packageName: package, theme: theme); loader = _svg.SvgAssetLoader(
_assetName,
assetBundle: bundle,
packageName: package,
theme: theme,
colorMapper: colorMapper,
);
} }
return _svg.SvgPicture( return _svg.SvgPicture(
loader, loader,

View File

@@ -1,3 +1,4 @@
// dart format width=120
/// GENERATED CODE - DO NOT MODIFY BY HAND /// GENERATED CODE - DO NOT MODIFY BY HAND
/// ***************************************************** /// *****************************************************
/// FlutterGen /// FlutterGen
@@ -5,7 +6,7 @@
// coverage:ignore-file // coverage:ignore-file
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use // ignore_for_file: deprecated_member_use,directives_ordering,implicit_dynamic_list_literal,unnecessary_import
class FontFamily { class FontFamily {
FontFamily._(); FontFamily._();

View File

@@ -48,6 +48,7 @@ class RTextField extends StatefulWidget {
final bool? enableSuggestions; final bool? enableSuggestions;
final TextInputAction? textInputAction; final TextInputAction? textInputAction;
final double? height; final double? height;
final Iterable<String>? autofillHints;
const RTextField({ const RTextField({
super.key, super.key,
@@ -71,6 +72,7 @@ class RTextField extends StatefulWidget {
this.textInputAction, this.textInputAction,
this.keyboardType, this.keyboardType,
this.focusNode, this.focusNode,
this.autofillHints,
// ⚙️ Input styling // ⚙️ Input styling
this.textAlign, this.textAlign,
@@ -219,6 +221,7 @@ class _RTextFieldState extends State<RTextField> {
autocorrect: widget.autocorrect ?? true, autocorrect: widget.autocorrect ?? true,
enableSuggestions: widget.enableSuggestions ?? true, enableSuggestions: widget.enableSuggestions ?? true,
textInputAction: widget.textInputAction, textInputAction: widget.textInputAction,
autofillHints: widget.autofillHints,
decoration: InputDecoration( decoration: InputDecoration(
contentPadding: const EdgeInsets.symmetric(horizontal: 16), contentPadding: const EdgeInsets.symmetric(horizontal: 16),
errorStyle: widget.errorStyle, errorStyle: widget.errorStyle,

View File

@@ -1,7 +1,7 @@
name: rasadyar_app name: rasadyar_app
description: "A new Flutter project." description: "A new Flutter project."
publish_to: 'none' publish_to: 'none'
version: 1.3.7+5 version: 1.3.6+4
environment: environment:
sdk: ^3.8.1 sdk: ^3.8.1