chat has been updated

This commit is contained in:
Username1548
2025-03-18 14:33:51 +07:00
parent b6d4911c2e
commit fa817548d9
140 changed files with 16501 additions and 14065 deletions

View File

@@ -12,7 +12,8 @@ part of 'create_plan_model.dart';
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
/// @nodoc
mixin _$CreatePlanModel {
@@ -34,17 +35,19 @@ mixin _$CreatePlanModel {
/// @nodoc
abstract class $CreatePlanModelCopyWith<$Res> {
factory $CreatePlanModelCopyWith(
CreatePlanModel value, $Res Function(CreatePlanModel) then) =
_$CreatePlanModelCopyWithImpl<$Res, CreatePlanModel>;
CreatePlanModel value,
$Res Function(CreatePlanModel) then,
) = _$CreatePlanModelCopyWithImpl<$Res, CreatePlanModel>;
@useResult
$Res call(
{String? name,
String? details,
String? state,
int? duration,
List<bool> type,
XFile? image,
List<PacketOptions> options});
$Res call({
String? name,
String? details,
String? state,
int? duration,
List<bool> type,
XFile? image,
List<PacketOptions> options,
});
}
/// @nodoc
@@ -70,55 +73,67 @@ class _$CreatePlanModelCopyWithImpl<$Res, $Val extends CreatePlanModel>
Object? image = freezed,
Object? options = null,
}) {
return _then(_value.copyWith(
name: freezed == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String?,
details: freezed == details
? _value.details
: details // ignore: cast_nullable_to_non_nullable
as String?,
state: freezed == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String?,
duration: freezed == duration
? _value.duration
: duration // ignore: cast_nullable_to_non_nullable
as int?,
type: null == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as List<bool>,
image: freezed == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as XFile?,
options: null == options
? _value.options
: options // ignore: cast_nullable_to_non_nullable
as List<PacketOptions>,
) as $Val);
return _then(
_value.copyWith(
name:
freezed == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String?,
details:
freezed == details
? _value.details
: details // ignore: cast_nullable_to_non_nullable
as String?,
state:
freezed == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String?,
duration:
freezed == duration
? _value.duration
: duration // ignore: cast_nullable_to_non_nullable
as int?,
type:
null == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as List<bool>,
image:
freezed == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as XFile?,
options:
null == options
? _value.options
: options // ignore: cast_nullable_to_non_nullable
as List<PacketOptions>,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$CreatePlanModelImplCopyWith<$Res>
implements $CreatePlanModelCopyWith<$Res> {
factory _$$CreatePlanModelImplCopyWith(_$CreatePlanModelImpl value,
$Res Function(_$CreatePlanModelImpl) then) =
__$$CreatePlanModelImplCopyWithImpl<$Res>;
factory _$$CreatePlanModelImplCopyWith(
_$CreatePlanModelImpl value,
$Res Function(_$CreatePlanModelImpl) then,
) = __$$CreatePlanModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{String? name,
String? details,
String? state,
int? duration,
List<bool> type,
XFile? image,
List<PacketOptions> options});
$Res call({
String? name,
String? details,
String? state,
int? duration,
List<bool> type,
XFile? image,
List<PacketOptions> options,
});
}
/// @nodoc
@@ -126,8 +141,9 @@ class __$$CreatePlanModelImplCopyWithImpl<$Res>
extends _$CreatePlanModelCopyWithImpl<$Res, _$CreatePlanModelImpl>
implements _$$CreatePlanModelImplCopyWith<$Res> {
__$$CreatePlanModelImplCopyWithImpl(
_$CreatePlanModelImpl _value, $Res Function(_$CreatePlanModelImpl) _then)
: super(_value, _then);
_$CreatePlanModelImpl _value,
$Res Function(_$CreatePlanModelImpl) _then,
) : super(_value, _then);
/// Create a copy of CreatePlanModel
/// with the given fields replaced by the non-null parameter values.
@@ -142,53 +158,62 @@ class __$$CreatePlanModelImplCopyWithImpl<$Res>
Object? image = freezed,
Object? options = null,
}) {
return _then(_$CreatePlanModelImpl(
name: freezed == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String?,
details: freezed == details
? _value.details
: details // ignore: cast_nullable_to_non_nullable
as String?,
state: freezed == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String?,
duration: freezed == duration
? _value.duration
: duration // ignore: cast_nullable_to_non_nullable
as int?,
type: null == type
? _value._type
: type // ignore: cast_nullable_to_non_nullable
as List<bool>,
image: freezed == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as XFile?,
options: null == options
? _value._options
: options // ignore: cast_nullable_to_non_nullable
as List<PacketOptions>,
));
return _then(
_$CreatePlanModelImpl(
name:
freezed == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String?,
details:
freezed == details
? _value.details
: details // ignore: cast_nullable_to_non_nullable
as String?,
state:
freezed == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String?,
duration:
freezed == duration
? _value.duration
: duration // ignore: cast_nullable_to_non_nullable
as int?,
type:
null == type
? _value._type
: type // ignore: cast_nullable_to_non_nullable
as List<bool>,
image:
freezed == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as XFile?,
options:
null == options
? _value._options
: options // ignore: cast_nullable_to_non_nullable
as List<PacketOptions>,
),
);
}
}
/// @nodoc
class _$CreatePlanModelImpl extends _CreatePlanModel {
const _$CreatePlanModelImpl(
{this.name,
this.details,
this.state,
this.duration,
required final List<bool> type,
this.image,
required final List<PacketOptions> options})
: _type = type,
_options = options,
super._();
const _$CreatePlanModelImpl({
this.name,
this.details,
this.state,
this.duration,
required final List<bool> type,
this.image,
required final List<PacketOptions> options,
}) : _type = type,
_options = options,
super._();
@override
final String? name;
@@ -238,14 +263,15 @@ class _$CreatePlanModelImpl extends _CreatePlanModel {
@override
int get hashCode => Object.hash(
runtimeType,
name,
details,
state,
duration,
const DeepCollectionEquality().hash(_type),
image,
const DeepCollectionEquality().hash(_options));
runtimeType,
name,
details,
state,
duration,
const DeepCollectionEquality().hash(_type),
image,
const DeepCollectionEquality().hash(_options),
);
/// Create a copy of CreatePlanModel
/// with the given fields replaced by the non-null parameter values.
@@ -254,18 +280,21 @@ class _$CreatePlanModelImpl extends _CreatePlanModel {
@pragma('vm:prefer-inline')
_$$CreatePlanModelImplCopyWith<_$CreatePlanModelImpl> get copyWith =>
__$$CreatePlanModelImplCopyWithImpl<_$CreatePlanModelImpl>(
this, _$identity);
this,
_$identity,
);
}
abstract class _CreatePlanModel extends CreatePlanModel {
const factory _CreatePlanModel(
{final String? name,
final String? details,
final String? state,
final int? duration,
required final List<bool> type,
final XFile? image,
required final List<PacketOptions> options}) = _$CreatePlanModelImpl;
const factory _CreatePlanModel({
final String? name,
final String? details,
final String? state,
final int? duration,
required final List<bool> type,
final XFile? image,
required final List<PacketOptions> options,
}) = _$CreatePlanModelImpl;
const _CreatePlanModel._() : super._();
@override

View File

@@ -12,7 +12,8 @@ part of 'create_plan_state.dart';
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
/// @nodoc
mixin _$CreatePlanState {
@@ -32,15 +33,17 @@ mixin _$CreatePlanState {
/// @nodoc
abstract class $CreatePlanStateCopyWith<$Res> {
factory $CreatePlanStateCopyWith(
CreatePlanState value, $Res Function(CreatePlanState) then) =
_$CreatePlanStateCopyWithImpl<$Res, CreatePlanState>;
CreatePlanState value,
$Res Function(CreatePlanState) then,
) = _$CreatePlanStateCopyWithImpl<$Res, CreatePlanState>;
@useResult
$Res call(
{bool isLoading,
String? errorMessage,
CreatePlanModel planData,
int? durationIndex,
int? selectedOptionIndex});
$Res call({
bool isLoading,
String? errorMessage,
CreatePlanModel planData,
int? durationIndex,
int? selectedOptionIndex,
});
$CreatePlanModelCopyWith<$Res> get planData;
}
@@ -66,28 +69,36 @@ class _$CreatePlanStateCopyWithImpl<$Res, $Val extends CreatePlanState>
Object? durationIndex = freezed,
Object? selectedOptionIndex = freezed,
}) {
return _then(_value.copyWith(
isLoading: null == isLoading
? _value.isLoading
: isLoading // ignore: cast_nullable_to_non_nullable
as bool,
errorMessage: freezed == errorMessage
? _value.errorMessage
: errorMessage // ignore: cast_nullable_to_non_nullable
as String?,
planData: null == planData
? _value.planData
: planData // ignore: cast_nullable_to_non_nullable
as CreatePlanModel,
durationIndex: freezed == durationIndex
? _value.durationIndex
: durationIndex // ignore: cast_nullable_to_non_nullable
as int?,
selectedOptionIndex: freezed == selectedOptionIndex
? _value.selectedOptionIndex
: selectedOptionIndex // ignore: cast_nullable_to_non_nullable
as int?,
) as $Val);
return _then(
_value.copyWith(
isLoading:
null == isLoading
? _value.isLoading
: isLoading // ignore: cast_nullable_to_non_nullable
as bool,
errorMessage:
freezed == errorMessage
? _value.errorMessage
: errorMessage // ignore: cast_nullable_to_non_nullable
as String?,
planData:
null == planData
? _value.planData
: planData // ignore: cast_nullable_to_non_nullable
as CreatePlanModel,
durationIndex:
freezed == durationIndex
? _value.durationIndex
: durationIndex // ignore: cast_nullable_to_non_nullable
as int?,
selectedOptionIndex:
freezed == selectedOptionIndex
? _value.selectedOptionIndex
: selectedOptionIndex // ignore: cast_nullable_to_non_nullable
as int?,
)
as $Val,
);
}
/// Create a copy of CreatePlanState
@@ -104,17 +115,19 @@ class _$CreatePlanStateCopyWithImpl<$Res, $Val extends CreatePlanState>
/// @nodoc
abstract class _$$CreatePlanStateImplCopyWith<$Res>
implements $CreatePlanStateCopyWith<$Res> {
factory _$$CreatePlanStateImplCopyWith(_$CreatePlanStateImpl value,
$Res Function(_$CreatePlanStateImpl) then) =
__$$CreatePlanStateImplCopyWithImpl<$Res>;
factory _$$CreatePlanStateImplCopyWith(
_$CreatePlanStateImpl value,
$Res Function(_$CreatePlanStateImpl) then,
) = __$$CreatePlanStateImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{bool isLoading,
String? errorMessage,
CreatePlanModel planData,
int? durationIndex,
int? selectedOptionIndex});
$Res call({
bool isLoading,
String? errorMessage,
CreatePlanModel planData,
int? durationIndex,
int? selectedOptionIndex,
});
@override
$CreatePlanModelCopyWith<$Res> get planData;
@@ -125,8 +138,9 @@ class __$$CreatePlanStateImplCopyWithImpl<$Res>
extends _$CreatePlanStateCopyWithImpl<$Res, _$CreatePlanStateImpl>
implements _$$CreatePlanStateImplCopyWith<$Res> {
__$$CreatePlanStateImplCopyWithImpl(
_$CreatePlanStateImpl _value, $Res Function(_$CreatePlanStateImpl) _then)
: super(_value, _then);
_$CreatePlanStateImpl _value,
$Res Function(_$CreatePlanStateImpl) _then,
) : super(_value, _then);
/// Create a copy of CreatePlanState
/// with the given fields replaced by the non-null parameter values.
@@ -139,40 +153,48 @@ class __$$CreatePlanStateImplCopyWithImpl<$Res>
Object? durationIndex = freezed,
Object? selectedOptionIndex = freezed,
}) {
return _then(_$CreatePlanStateImpl(
isLoading: null == isLoading
? _value.isLoading
: isLoading // ignore: cast_nullable_to_non_nullable
as bool,
errorMessage: freezed == errorMessage
? _value.errorMessage
: errorMessage // ignore: cast_nullable_to_non_nullable
as String?,
planData: null == planData
? _value.planData
: planData // ignore: cast_nullable_to_non_nullable
as CreatePlanModel,
durationIndex: freezed == durationIndex
? _value.durationIndex
: durationIndex // ignore: cast_nullable_to_non_nullable
as int?,
selectedOptionIndex: freezed == selectedOptionIndex
? _value.selectedOptionIndex
: selectedOptionIndex // ignore: cast_nullable_to_non_nullable
as int?,
));
return _then(
_$CreatePlanStateImpl(
isLoading:
null == isLoading
? _value.isLoading
: isLoading // ignore: cast_nullable_to_non_nullable
as bool,
errorMessage:
freezed == errorMessage
? _value.errorMessage
: errorMessage // ignore: cast_nullable_to_non_nullable
as String?,
planData:
null == planData
? _value.planData
: planData // ignore: cast_nullable_to_non_nullable
as CreatePlanModel,
durationIndex:
freezed == durationIndex
? _value.durationIndex
: durationIndex // ignore: cast_nullable_to_non_nullable
as int?,
selectedOptionIndex:
freezed == selectedOptionIndex
? _value.selectedOptionIndex
: selectedOptionIndex // ignore: cast_nullable_to_non_nullable
as int?,
),
);
}
}
/// @nodoc
class _$CreatePlanStateImpl implements _CreatePlanState {
const _$CreatePlanStateImpl(
{required this.isLoading,
required this.errorMessage,
required this.planData,
this.durationIndex,
this.selectedOptionIndex});
const _$CreatePlanStateImpl({
required this.isLoading,
required this.errorMessage,
required this.planData,
this.durationIndex,
this.selectedOptionIndex,
});
@override
final bool isLoading;
@@ -208,8 +230,14 @@ class _$CreatePlanStateImpl implements _CreatePlanState {
}
@override
int get hashCode => Object.hash(runtimeType, isLoading, errorMessage,
planData, durationIndex, selectedOptionIndex);
int get hashCode => Object.hash(
runtimeType,
isLoading,
errorMessage,
planData,
durationIndex,
selectedOptionIndex,
);
/// Create a copy of CreatePlanState
/// with the given fields replaced by the non-null parameter values.
@@ -218,16 +246,19 @@ class _$CreatePlanStateImpl implements _CreatePlanState {
@pragma('vm:prefer-inline')
_$$CreatePlanStateImplCopyWith<_$CreatePlanStateImpl> get copyWith =>
__$$CreatePlanStateImplCopyWithImpl<_$CreatePlanStateImpl>(
this, _$identity);
this,
_$identity,
);
}
abstract class _CreatePlanState implements CreatePlanState {
const factory _CreatePlanState(
{required final bool isLoading,
required final String? errorMessage,
required final CreatePlanModel planData,
final int? durationIndex,
final int? selectedOptionIndex}) = _$CreatePlanStateImpl;
const factory _CreatePlanState({
required final bool isLoading,
required final String? errorMessage,
required final CreatePlanModel planData,
final int? durationIndex,
final int? selectedOptionIndex,
}) = _$CreatePlanStateImpl;
@override
bool get isLoading;

View File

@@ -26,11 +26,11 @@ class _CreatePlanService implements CreatePlanService {
_data.addAll(model);
final _options = _setStreamType<void>(
Options(
method: 'POST',
headers: _headers,
extra: _extra,
contentType: 'multipart/form-data',
)
method: 'POST',
headers: _headers,
extra: _extra,
contentType: 'multipart/form-data',
)
.compose(
_dio.options,
'/api/plans/create',