DoubleDecoder class
double 类型处理中间件 用法: @JsonKey(fromJson:DoubleDecoder.decodeOrNull) double? price;
- Inheritance
-
- Object
- BaseDecoder
- DoubleDecoder
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
decodeOrDefault(
dynamic value) → double - 策略2 异常情况解析默认值,比@JsonKey(defaultValue: 0.0)更健壮
-
decodeOrException(
dynamic value) → double - 策略3 尝试解析异常情况报错并给出错误值
-
decodeOrNull(
dynamic json) → double? - 策略1 异常情况解析为空