Probability class abstract

The probability of precipitation.

Available extensions
Annotations
  • @freezed

Constructors

Probability({required int percent, required String type})
factory
Probability.fromJson(Map<String, dynamic> json)
factory

Properties

copyWith → $ProbabilityCopyWith<Probability>
Create a copy of Probability with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
percent int
The probability in percent.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
The type of probability.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_Probability value)) → TResult

Available on Probability, provided by the ProbabilityPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_Probability value)?) → TResult?

Available on Probability, provided by the ProbabilityPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_Probability value)?, {required TResult orElse()}) → TResult

Available on Probability, provided by the ProbabilityPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(int percent, String type)?, {required TResult orElse()}) → TResult

Available on Probability, provided by the ProbabilityPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this Probability to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(int percent, String type)) → TResult

Available on Probability, provided by the ProbabilityPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(int percent, String type)?) → TResult?

Available on Probability, provided by the ProbabilityPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) bool
The equality operator.
inherited