Option class abstract

Available extensions
Annotations
  • @freezed

Constructors

Option({@Default.new('tools.ozone.setting.defs#option') String $type, required String key, required String did, required Map<String, dynamic> value, String? description, @JsonKey.new(toJson: iso8601) DateTime? createdAt, @JsonKey.new(toJson: iso8601) DateTime? updatedAt, @OptionManagerRoleConverter() OptionManagerRole? managerRole, @OptionScopeConverter() required OptionScope scope, required String createdBy, required String lastUpdatedBy, Map<String, dynamic>? $unknown})
const
factory
Option.fromJson(Map<String, Object?> json)
factory

Properties

$type → String
no setterinherited
$unknown → Map<String, dynamic>?
no setterinherited
copyWith → $OptionCopyWith<Option>
Create a copy of Option with the given fields replaced by the non-null parameter values.
no setterinherited
createdAt → DateTime?
no setterinherited
createdBy → String
no setterinherited
description → String?
no setterinherited
did → String
no setterinherited
hasCreatedAt → bool

Available on Option, provided by the OptionExtension extension

no setter
hasDescription → bool

Available on Option, provided by the OptionExtension extension

no setter
hashCode → int
The hash code for this object.
no setterinherited
hasManagerRole → bool

Available on Option, provided by the OptionExtension extension

no setter
hasNotCreatedAt → bool

Available on Option, provided by the OptionExtension extension

no setter
hasNotDescription → bool

Available on Option, provided by the OptionExtension extension

no setter
hasNotManagerRole → bool

Available on Option, provided by the OptionExtension extension

no setter
hasNotUpdatedAt → bool

Available on Option, provided by the OptionExtension extension

no setter
hasUpdatedAt → bool

Available on Option, provided by the OptionExtension extension

no setter
key → String
no setterinherited
lastUpdatedBy → String
no setterinherited
managerRole → OptionManagerRole?
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope → OptionScope
no setterinherited
updatedAt → DateTime?
no setterinherited
value → Map<String, dynamic>
no setterinherited

Methods

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

Available on Option, provided by the OptionPatterns extension

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

Available on Option, provided by the OptionPatterns extension

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

Available on Option, provided by the OptionPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String $type, String key, String did, Map<String, dynamic> value, String? description, DateTime? createdAt, DateTime? updatedAt, OptionManagerRole? managerRole, OptionScope scope, String createdBy, String lastUpdatedBy, Map<String, dynamic>? $unknown)?, {required TResult orElse()}) → TResult

Available on Option, provided by the OptionPatterns 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 Option to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String $type, String key, String did, Map<String, dynamic> value, String? description, DateTime? createdAt, DateTime? updatedAt, OptionManagerRole? managerRole, OptionScope scope, String createdBy, String lastUpdatedBy, Map<String, dynamic>? $unknown)) → TResult

Available on Option, provided by the OptionPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String $type, String key, String did, Map<String, dynamic> value, String? description, DateTime? createdAt, DateTime? updatedAt, OptionManagerRole? managerRole, OptionScope scope, String createdBy, String lastUpdatedBy, Map<String, dynamic>? $unknown)?) → TResult?

Available on Option, provided by the OptionPatterns extension

A variant of when that fallback to returning null

Operators

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

Static Methods

validate(Map<String, dynamic> object) → bool

Constants

knownProps → const List<String>