SelectionRules class abstract

Constraints that govern how seats may be selected on a seat map.

Available extensions
Annotations
  • @freezed

Constructors

SelectionRules({int? maxSelectable, @Default.new(false) bool requireAdjacency, @Default.new(false) bool preventSingleSeatGaps, @Default.new(false) bool restrictToSingleCategory})
Creates a SelectionRules. All fields default to "no restriction".
const
factory
SelectionRules.fromJson(Map<String, dynamic> json)
Deserializes a SelectionRules from JSON produced by SelectionRules.toJson.
factory

Properties

copyWith → $SelectionRulesCopyWith<SelectionRules>
Create a copy of SelectionRules with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
maxSelectable → int?
Maximum number of seats that may be selected at once.
no setterinherited
preventSingleSeatGaps → bool
When true, selections that would leave a single empty seat between occupied/selected seats are disallowed.
no setterinherited
requireAdjacency → bool
When true, every selected seat must be adjacent to at least one other selected seat.
no setterinherited
restrictToSingleCategory → bool
When true, all selected seats must share the same seat category.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Available on SelectionRules, provided by the SelectionRulesPatterns extension

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

Available on SelectionRules, provided by the SelectionRulesPatterns extension

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

Available on SelectionRules, provided by the SelectionRulesPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(int? maxSelectable, bool requireAdjacency, bool preventSingleSeatGaps, bool restrictToSingleCategory)?, {required TResult orElse()}) → TResult

Available on SelectionRules, provided by the SelectionRulesPatterns 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 SelectionRules to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(int? maxSelectable, bool requireAdjacency, bool preventSingleSeatGaps, bool restrictToSingleCategory)) → TResult

Available on SelectionRules, provided by the SelectionRulesPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(int? maxSelectable, bool requireAdjacency, bool preventSingleSeatGaps, bool restrictToSingleCategory)?) → TResult?

Available on SelectionRules, provided by the SelectionRulesPatterns extension

A variant of when that fallback to returning null

Operators

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