feat : chicken root page , inventory , sale in province

This commit is contained in:
MrM
2025-06-05 23:26:44 +03:30
parent 5849466e3b
commit 1cfcf9fa8f
68 changed files with 16615 additions and 126 deletions

View File

@@ -0,0 +1,28 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'guild_model.freezed.dart';
part 'guild_model.g.dart';
@freezed
abstract class GuildModel with _$GuildModel {
const factory GuildModel({
String? key,
String? guildsName,
bool? steward,
User? user,
}) = _GuildModel;
factory GuildModel.fromJson(Map<String, dynamic> json) =>
_$GuildModelFromJson(json);
}
@freezed
abstract class User with _$User {
const factory User({
String? fullname,
String? mobile,
String? city,
}) = _User;
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
}

View File

@@ -0,0 +1,320 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'guild_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$GuildModel {
String? get key; String? get guildsName; bool? get steward; User? get user;
/// Create a copy of GuildModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$GuildModelCopyWith<GuildModel> get copyWith => _$GuildModelCopyWithImpl<GuildModel>(this as GuildModel, _$identity);
/// Serializes this GuildModel to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is GuildModel&&(identical(other.key, key) || other.key == key)&&(identical(other.guildsName, guildsName) || other.guildsName == guildsName)&&(identical(other.steward, steward) || other.steward == steward)&&(identical(other.user, user) || other.user == user));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,key,guildsName,steward,user);
@override
String toString() {
return 'GuildModel(key: $key, guildsName: $guildsName, steward: $steward, user: $user)';
}
}
/// @nodoc
abstract mixin class $GuildModelCopyWith<$Res> {
factory $GuildModelCopyWith(GuildModel value, $Res Function(GuildModel) _then) = _$GuildModelCopyWithImpl;
@useResult
$Res call({
String? key, String? guildsName, bool? steward, User? user
});
$UserCopyWith<$Res>? get user;
}
/// @nodoc
class _$GuildModelCopyWithImpl<$Res>
implements $GuildModelCopyWith<$Res> {
_$GuildModelCopyWithImpl(this._self, this._then);
final GuildModel _self;
final $Res Function(GuildModel) _then;
/// Create a copy of GuildModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? guildsName = freezed,Object? steward = freezed,Object? user = freezed,}) {
return _then(_self.copyWith(
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String?,guildsName: freezed == guildsName ? _self.guildsName : guildsName // ignore: cast_nullable_to_non_nullable
as String?,steward: freezed == steward ? _self.steward : steward // ignore: cast_nullable_to_non_nullable
as bool?,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
as User?,
));
}
/// Create a copy of GuildModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserCopyWith<$Res>? get user {
if (_self.user == null) {
return null;
}
return $UserCopyWith<$Res>(_self.user!, (value) {
return _then(_self.copyWith(user: value));
});
}
}
/// @nodoc
@JsonSerializable()
class _GuildModel implements GuildModel {
const _GuildModel({this.key, this.guildsName, this.steward, this.user});
factory _GuildModel.fromJson(Map<String, dynamic> json) => _$GuildModelFromJson(json);
@override final String? key;
@override final String? guildsName;
@override final bool? steward;
@override final User? user;
/// Create a copy of GuildModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$GuildModelCopyWith<_GuildModel> get copyWith => __$GuildModelCopyWithImpl<_GuildModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$GuildModelToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GuildModel&&(identical(other.key, key) || other.key == key)&&(identical(other.guildsName, guildsName) || other.guildsName == guildsName)&&(identical(other.steward, steward) || other.steward == steward)&&(identical(other.user, user) || other.user == user));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,key,guildsName,steward,user);
@override
String toString() {
return 'GuildModel(key: $key, guildsName: $guildsName, steward: $steward, user: $user)';
}
}
/// @nodoc
abstract mixin class _$GuildModelCopyWith<$Res> implements $GuildModelCopyWith<$Res> {
factory _$GuildModelCopyWith(_GuildModel value, $Res Function(_GuildModel) _then) = __$GuildModelCopyWithImpl;
@override @useResult
$Res call({
String? key, String? guildsName, bool? steward, User? user
});
@override $UserCopyWith<$Res>? get user;
}
/// @nodoc
class __$GuildModelCopyWithImpl<$Res>
implements _$GuildModelCopyWith<$Res> {
__$GuildModelCopyWithImpl(this._self, this._then);
final _GuildModel _self;
final $Res Function(_GuildModel) _then;
/// Create a copy of GuildModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? guildsName = freezed,Object? steward = freezed,Object? user = freezed,}) {
return _then(_GuildModel(
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String?,guildsName: freezed == guildsName ? _self.guildsName : guildsName // ignore: cast_nullable_to_non_nullable
as String?,steward: freezed == steward ? _self.steward : steward // ignore: cast_nullable_to_non_nullable
as bool?,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
as User?,
));
}
/// Create a copy of GuildModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserCopyWith<$Res>? get user {
if (_self.user == null) {
return null;
}
return $UserCopyWith<$Res>(_self.user!, (value) {
return _then(_self.copyWith(user: value));
});
}
}
/// @nodoc
mixin _$User {
String? get fullname; String? get mobile; String? get city;
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$UserCopyWith<User> get copyWith => _$UserCopyWithImpl<User>(this as User, _$identity);
/// Serializes this User to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is User&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.city, city) || other.city == city));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,fullname,mobile,city);
@override
String toString() {
return 'User(fullname: $fullname, mobile: $mobile, city: $city)';
}
}
/// @nodoc
abstract mixin class $UserCopyWith<$Res> {
factory $UserCopyWith(User value, $Res Function(User) _then) = _$UserCopyWithImpl;
@useResult
$Res call({
String? fullname, String? mobile, String? city
});
}
/// @nodoc
class _$UserCopyWithImpl<$Res>
implements $UserCopyWith<$Res> {
_$UserCopyWithImpl(this._self, this._then);
final User _self;
final $Res Function(User) _then;
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? fullname = freezed,Object? mobile = freezed,Object? city = freezed,}) {
return _then(_self.copyWith(
fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
@JsonSerializable()
class _User implements User {
const _User({this.fullname, this.mobile, this.city});
factory _User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
@override final String? fullname;
@override final String? mobile;
@override final String? city;
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$UserCopyWith<_User> get copyWith => __$UserCopyWithImpl<_User>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$UserToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _User&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.city, city) || other.city == city));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,fullname,mobile,city);
@override
String toString() {
return 'User(fullname: $fullname, mobile: $mobile, city: $city)';
}
}
/// @nodoc
abstract mixin class _$UserCopyWith<$Res> implements $UserCopyWith<$Res> {
factory _$UserCopyWith(_User value, $Res Function(_User) _then) = __$UserCopyWithImpl;
@override @useResult
$Res call({
String? fullname, String? mobile, String? city
});
}
/// @nodoc
class __$UserCopyWithImpl<$Res>
implements _$UserCopyWith<$Res> {
__$UserCopyWithImpl(this._self, this._then);
final _User _self;
final $Res Function(_User) _then;
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? fullname = freezed,Object? mobile = freezed,Object? city = freezed,}) {
return _then(_User(
fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on

View File

@@ -0,0 +1,36 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'guild_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_GuildModel _$GuildModelFromJson(Map<String, dynamic> json) => _GuildModel(
key: json['key'] as String?,
guildsName: json['guilds_name'] as String?,
steward: json['steward'] as bool?,
user: json['user'] == null
? null
: User.fromJson(json['user'] as Map<String, dynamic>),
);
Map<String, dynamic> _$GuildModelToJson(_GuildModel instance) =>
<String, dynamic>{
'key': instance.key,
'guilds_name': instance.guildsName,
'steward': instance.steward,
'user': instance.user,
};
_User _$UserFromJson(Map<String, dynamic> json) => _User(
fullname: json['fullname'] as String?,
mobile: json['mobile'] as String?,
city: json['city'] as String?,
);
Map<String, dynamic> _$UserToJson(_User instance) => <String, dynamic>{
'fullname': instance.fullname,
'mobile': instance.mobile,
'city': instance.city,
};