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