feat : new ui and fix bug's

This commit is contained in:
2025-10-06 10:57:46 +03:30
parent a4c7fa87a3
commit 887aff27ae
44 changed files with 842 additions and 206 deletions

View File

@@ -5,6 +5,7 @@ import 'package:rasadyar_chicken/data/models/request/steward_free_sale_bar/stewa
import 'package:rasadyar_chicken/data/models/request/submit_steward_allocation/submit_steward_allocation.dart';
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
import 'package:rasadyar_chicken/data/models/response/bar_information/bar_information.dart';
import 'package:rasadyar_chicken/data/models/response/broadcast_price/broadcast_price.dart';
import 'package:rasadyar_chicken/data/models/response/dashboard_kill_house_free_bar/dashboard_kill_house_free_bar.dart';
import 'package:rasadyar_chicken/data/models/response/guild/guild_model.dart';
import 'package:rasadyar_chicken/data/models/response/guild_profile/guild_profile.dart';
@@ -152,4 +153,7 @@ abstract class ChickenRemoteDatasource {
Future<void> editSegmentation({required String token, required SegmentationModel model});
Future<SegmentationModel?> deleteSegmentation({required String token, required String key});
Future<BroadcastPrice?> getBroadcastPrice({required String token});
}

View File

@@ -1,4 +1,3 @@
import 'package:rasadyar_chicken/data/models/request/change_password/change_password_request_model.dart';
import 'package:rasadyar_chicken/data/models/request/conform_allocation/conform_allocation.dart';
import 'package:rasadyar_chicken/data/models/request/create_steward_free_bar/create_steward_free_bar.dart';
@@ -6,6 +5,7 @@ import 'package:rasadyar_chicken/data/models/request/steward_free_sale_bar/stewa
import 'package:rasadyar_chicken/data/models/request/submit_steward_allocation/submit_steward_allocation.dart';
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
import 'package:rasadyar_chicken/data/models/response/bar_information/bar_information.dart';
import 'package:rasadyar_chicken/data/models/response/broadcast_price/broadcast_price.dart';
import 'package:rasadyar_chicken/data/models/response/dashboard_kill_house_free_bar/dashboard_kill_house_free_bar.dart';
import 'package:rasadyar_chicken/data/models/response/guild/guild_model.dart';
import 'package:rasadyar_chicken/data/models/response/guild_profile/guild_profile.dart';
@@ -482,4 +482,16 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
return res.data;
}
@override
Future<BroadcastPrice?> getBroadcastPrice({required String token}) async {
var res = await _httpClient.get(
'/broadcast-price/',
headers: {'Authorization': 'Bearer $token'},
fromJson: (json) => BroadcastPrice.fromJson(json),
);
return res.data;
}
}

View File

@@ -0,0 +1,16 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'broadcast_price.freezed.dart';
part 'broadcast_price.g.dart';
@freezed
abstract class BroadcastPrice with _$BroadcastPrice {
const factory BroadcastPrice({
bool? active,
int? killHousePrice,
int? stewardPrice,
int? guildPrice,
}) = _BroadcastPrice;
factory BroadcastPrice.fromJson(Map<String, dynamic> json) => _$BroadcastPriceFromJson(json);
}

View File

@@ -0,0 +1,286 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'broadcast_price.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$BroadcastPrice {
bool? get active; int? get killHousePrice; int? get stewardPrice; int? get guildPrice;
/// Create a copy of BroadcastPrice
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$BroadcastPriceCopyWith<BroadcastPrice> get copyWith => _$BroadcastPriceCopyWithImpl<BroadcastPrice>(this as BroadcastPrice, _$identity);
/// Serializes this BroadcastPrice to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is BroadcastPrice&&(identical(other.active, active) || other.active == active)&&(identical(other.killHousePrice, killHousePrice) || other.killHousePrice == killHousePrice)&&(identical(other.stewardPrice, stewardPrice) || other.stewardPrice == stewardPrice)&&(identical(other.guildPrice, guildPrice) || other.guildPrice == guildPrice));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,active,killHousePrice,stewardPrice,guildPrice);
@override
String toString() {
return 'BroadcastPrice(active: $active, killHousePrice: $killHousePrice, stewardPrice: $stewardPrice, guildPrice: $guildPrice)';
}
}
/// @nodoc
abstract mixin class $BroadcastPriceCopyWith<$Res> {
factory $BroadcastPriceCopyWith(BroadcastPrice value, $Res Function(BroadcastPrice) _then) = _$BroadcastPriceCopyWithImpl;
@useResult
$Res call({
bool? active, int? killHousePrice, int? stewardPrice, int? guildPrice
});
}
/// @nodoc
class _$BroadcastPriceCopyWithImpl<$Res>
implements $BroadcastPriceCopyWith<$Res> {
_$BroadcastPriceCopyWithImpl(this._self, this._then);
final BroadcastPrice _self;
final $Res Function(BroadcastPrice) _then;
/// Create a copy of BroadcastPrice
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? active = freezed,Object? killHousePrice = freezed,Object? stewardPrice = freezed,Object? guildPrice = freezed,}) {
return _then(_self.copyWith(
active: freezed == active ? _self.active : active // ignore: cast_nullable_to_non_nullable
as bool?,killHousePrice: freezed == killHousePrice ? _self.killHousePrice : killHousePrice // ignore: cast_nullable_to_non_nullable
as int?,stewardPrice: freezed == stewardPrice ? _self.stewardPrice : stewardPrice // ignore: cast_nullable_to_non_nullable
as int?,guildPrice: freezed == guildPrice ? _self.guildPrice : guildPrice // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
/// Adds pattern-matching-related methods to [BroadcastPrice].
extension BroadcastPricePatterns on BroadcastPrice {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _BroadcastPrice value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _BroadcastPrice() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _BroadcastPrice value) $default,){
final _that = this;
switch (_that) {
case _BroadcastPrice():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _BroadcastPrice value)? $default,){
final _that = this;
switch (_that) {
case _BroadcastPrice() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool? active, int? killHousePrice, int? stewardPrice, int? guildPrice)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _BroadcastPrice() when $default != null:
return $default(_that.active,_that.killHousePrice,_that.stewardPrice,_that.guildPrice);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool? active, int? killHousePrice, int? stewardPrice, int? guildPrice) $default,) {final _that = this;
switch (_that) {
case _BroadcastPrice():
return $default(_that.active,_that.killHousePrice,_that.stewardPrice,_that.guildPrice);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool? active, int? killHousePrice, int? stewardPrice, int? guildPrice)? $default,) {final _that = this;
switch (_that) {
case _BroadcastPrice() when $default != null:
return $default(_that.active,_that.killHousePrice,_that.stewardPrice,_that.guildPrice);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _BroadcastPrice implements BroadcastPrice {
const _BroadcastPrice({this.active, this.killHousePrice, this.stewardPrice, this.guildPrice});
factory _BroadcastPrice.fromJson(Map<String, dynamic> json) => _$BroadcastPriceFromJson(json);
@override final bool? active;
@override final int? killHousePrice;
@override final int? stewardPrice;
@override final int? guildPrice;
/// Create a copy of BroadcastPrice
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$BroadcastPriceCopyWith<_BroadcastPrice> get copyWith => __$BroadcastPriceCopyWithImpl<_BroadcastPrice>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$BroadcastPriceToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _BroadcastPrice&&(identical(other.active, active) || other.active == active)&&(identical(other.killHousePrice, killHousePrice) || other.killHousePrice == killHousePrice)&&(identical(other.stewardPrice, stewardPrice) || other.stewardPrice == stewardPrice)&&(identical(other.guildPrice, guildPrice) || other.guildPrice == guildPrice));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,active,killHousePrice,stewardPrice,guildPrice);
@override
String toString() {
return 'BroadcastPrice(active: $active, killHousePrice: $killHousePrice, stewardPrice: $stewardPrice, guildPrice: $guildPrice)';
}
}
/// @nodoc
abstract mixin class _$BroadcastPriceCopyWith<$Res> implements $BroadcastPriceCopyWith<$Res> {
factory _$BroadcastPriceCopyWith(_BroadcastPrice value, $Res Function(_BroadcastPrice) _then) = __$BroadcastPriceCopyWithImpl;
@override @useResult
$Res call({
bool? active, int? killHousePrice, int? stewardPrice, int? guildPrice
});
}
/// @nodoc
class __$BroadcastPriceCopyWithImpl<$Res>
implements _$BroadcastPriceCopyWith<$Res> {
__$BroadcastPriceCopyWithImpl(this._self, this._then);
final _BroadcastPrice _self;
final $Res Function(_BroadcastPrice) _then;
/// Create a copy of BroadcastPrice
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? active = freezed,Object? killHousePrice = freezed,Object? stewardPrice = freezed,Object? guildPrice = freezed,}) {
return _then(_BroadcastPrice(
active: freezed == active ? _self.active : active // ignore: cast_nullable_to_non_nullable
as bool?,killHousePrice: freezed == killHousePrice ? _self.killHousePrice : killHousePrice // ignore: cast_nullable_to_non_nullable
as int?,stewardPrice: freezed == stewardPrice ? _self.stewardPrice : stewardPrice // ignore: cast_nullable_to_non_nullable
as int?,guildPrice: freezed == guildPrice ? _self.guildPrice : guildPrice // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
// dart format on

View File

@@ -0,0 +1,23 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'broadcast_price.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_BroadcastPrice _$BroadcastPriceFromJson(Map<String, dynamic> json) =>
_BroadcastPrice(
active: json['active'] as bool?,
killHousePrice: (json['kill_house_price'] as num?)?.toInt(),
stewardPrice: (json['steward_price'] as num?)?.toInt(),
guildPrice: (json['guild_price'] as num?)?.toInt(),
);
Map<String, dynamic> _$BroadcastPriceToJson(_BroadcastPrice instance) =>
<String, dynamic>{
'active': instance.active,
'kill_house_price': instance.killHousePrice,
'steward_price': instance.stewardPrice,
'guild_price': instance.guildPrice,
};

View File

@@ -11,6 +11,8 @@ abstract class SegmentationModel with _$SegmentationModel {
String? productKey,
String? guildKey,
String? result,
String? quota,
String? saleType,
int? weight,
Buyer? buyer,
DateTime? date,

View File

@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
/// @nodoc
mixin _$SegmentationModel {
String? get key; String? get productKey; String? get guildKey; String? get result; int? get weight; Buyer? get buyer; DateTime? get date; ToGuild? get toGuild;
String? get key; String? get productKey; String? get guildKey; String? get result; String? get quota; String? get saleType; int? get weight; Buyer? get buyer; DateTime? get date; ToGuild? get toGuild;
/// Create a copy of SegmentationModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -28,16 +28,16 @@ $SegmentationModelCopyWith<SegmentationModel> get copyWith => _$SegmentationMode
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild));
return identical(this, other) || (other.runtimeType == runtimeType&&other is SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,weight,buyer,date,toGuild);
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild);
@override
String toString() {
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild)';
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild)';
}
@@ -48,7 +48,7 @@ abstract mixin class $SegmentationModelCopyWith<$Res> {
factory $SegmentationModelCopyWith(SegmentationModel value, $Res Function(SegmentationModel) _then) = _$SegmentationModelCopyWithImpl;
@useResult
$Res call({
String? key, String? productKey, String? guildKey, String? result, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild
String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild
});
@@ -65,12 +65,14 @@ class _$SegmentationModelCopyWithImpl<$Res>
/// Create a copy of SegmentationModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,}) {
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,}) {
return _then(_self.copyWith(
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
as String?,guildKey: freezed == guildKey ? _self.guildKey : guildKey // ignore: cast_nullable_to_non_nullable
as String?,result: freezed == result ? _self.result : result // ignore: cast_nullable_to_non_nullable
as String?,quota: freezed == quota ? _self.quota : quota // ignore: cast_nullable_to_non_nullable
as String?,saleType: freezed == saleType ? _self.saleType : saleType // ignore: cast_nullable_to_non_nullable
as String?,weight: freezed == weight ? _self.weight : weight // ignore: cast_nullable_to_non_nullable
as int?,buyer: freezed == buyer ? _self.buyer : buyer // ignore: cast_nullable_to_non_nullable
as Buyer?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
@@ -184,10 +186,10 @@ return $default(_that);case _:
/// }
/// ```
@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;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, 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 $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild);case _:
return orElse();
}
@@ -205,10 +207,10 @@ return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.wei
/// }
/// ```
@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;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, 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 _:
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild);case _:
throw StateError('Unexpected subclass');
}
@@ -225,10 +227,10 @@ return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.wei
/// }
/// ```
@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;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, 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 $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild);case _:
return null;
}
@@ -240,13 +242,15 @@ return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.wei
@JsonSerializable()
class _SegmentationModel implements SegmentationModel {
const _SegmentationModel({this.key, this.productKey, this.guildKey, this.result, this.weight, this.buyer, this.date, this.toGuild});
const _SegmentationModel({this.key, this.productKey, this.guildKey, this.result, this.quota, this.saleType, this.weight, this.buyer, this.date, this.toGuild});
factory _SegmentationModel.fromJson(Map<String, dynamic> json) => _$SegmentationModelFromJson(json);
@override final String? key;
@override final String? productKey;
@override final String? guildKey;
@override final String? result;
@override final String? quota;
@override final String? saleType;
@override final int? weight;
@override final Buyer? buyer;
@override final DateTime? date;
@@ -265,16 +269,16 @@ Map<String, dynamic> toJson() {
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,weight,buyer,date,toGuild);
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild);
@override
String toString() {
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild)';
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild)';
}
@@ -285,7 +289,7 @@ abstract mixin class _$SegmentationModelCopyWith<$Res> implements $SegmentationM
factory _$SegmentationModelCopyWith(_SegmentationModel value, $Res Function(_SegmentationModel) _then) = __$SegmentationModelCopyWithImpl;
@override @useResult
$Res call({
String? key, String? productKey, String? guildKey, String? result, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild
String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild
});
@@ -302,12 +306,14 @@ class __$SegmentationModelCopyWithImpl<$Res>
/// Create a copy of SegmentationModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,}) {
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,}) {
return _then(_SegmentationModel(
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
as String?,guildKey: freezed == guildKey ? _self.guildKey : guildKey // ignore: cast_nullable_to_non_nullable
as String?,result: freezed == result ? _self.result : result // ignore: cast_nullable_to_non_nullable
as String?,quota: freezed == quota ? _self.quota : quota // ignore: cast_nullable_to_non_nullable
as String?,saleType: freezed == saleType ? _self.saleType : saleType // ignore: cast_nullable_to_non_nullable
as String?,weight: freezed == weight ? _self.weight : weight // ignore: cast_nullable_to_non_nullable
as int?,buyer: freezed == buyer ? _self.buyer : buyer // ignore: cast_nullable_to_non_nullable
as Buyer?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable

View File

@@ -12,6 +12,8 @@ _SegmentationModel _$SegmentationModelFromJson(Map<String, dynamic> json) =>
productKey: json['product_key'] as String?,
guildKey: json['guild_key'] as String?,
result: json['result'] as String?,
quota: json['quota'] as String?,
saleType: json['sale_type'] as String?,
weight: (json['weight'] as num?)?.toInt(),
buyer: json['buyer'] == null
? null
@@ -30,6 +32,8 @@ Map<String, dynamic> _$SegmentationModelToJson(_SegmentationModel instance) =>
'product_key': instance.productKey,
'guild_key': instance.guildKey,
'result': instance.result,
'quota': instance.quota,
'sale_type': instance.saleType,
'weight': instance.weight,
'buyer': instance.buyer,
'date': instance.date?.toIso8601String(),

View File

@@ -5,6 +5,7 @@ import 'package:rasadyar_chicken/data/models/request/steward_free_sale_bar/stewa
import 'package:rasadyar_chicken/data/models/request/submit_steward_allocation/submit_steward_allocation.dart';
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
import 'package:rasadyar_chicken/data/models/response/bar_information/bar_information.dart';
import 'package:rasadyar_chicken/data/models/response/broadcast_price/broadcast_price.dart';
import 'package:rasadyar_chicken/data/models/response/dashboard_kill_house_free_bar/dashboard_kill_house_free_bar.dart';
import 'package:rasadyar_chicken/data/models/response/guild/guild_model.dart';
import 'package:rasadyar_chicken/data/models/response/guild_profile/guild_profile.dart';
@@ -158,6 +159,7 @@ abstract class ChickenRepository {
Future<SegmentationModel?> deleteSegmentation({required String token, required String key});
Future<BroadcastPrice?> getBroadcastPrice({required String token});
//endregion

View File

@@ -8,6 +8,7 @@ import 'package:rasadyar_chicken/data/models/request/steward_free_sale_bar/stewa
import 'package:rasadyar_chicken/data/models/request/submit_steward_allocation/submit_steward_allocation.dart';
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
import 'package:rasadyar_chicken/data/models/response/bar_information/bar_information.dart';
import 'package:rasadyar_chicken/data/models/response/broadcast_price/broadcast_price.dart';
import 'package:rasadyar_chicken/data/models/response/dashboard_kill_house_free_bar/dashboard_kill_house_free_bar.dart';
import 'package:rasadyar_chicken/data/models/response/guild/guild_model.dart';
import 'package:rasadyar_chicken/data/models/response/guild_profile/guild_profile.dart';
@@ -323,6 +324,12 @@ class ChickenRepositoryImp implements ChickenRepository {
return res;
}
@override
Future<BroadcastPrice?> getBroadcastPrice({required String token}) async {
var res = await remote.getBroadcastPrice(token: token);
return res;
}
//endregion
//region local
@@ -330,6 +337,7 @@ class ChickenRepositoryImp implements ChickenRepository {
WidelyUsedLocalModel? getAllWidely() => local.getAllWidely();
@override
Future<void> initWidleyUsed() async => local.initWidleyUsed();
Future<void> initWidleyUsed() async {}
//endregion
}