Nux class abstract

A new user experiences (NUX) storage object

Available extensions
Annotations
  • @freezed

Constructors

Nux.new({@Default('app.bsky.actor.defs#nux') String $type, required String id, @Default(false) bool completed, String? data, DateTime? expiresAt, Map<String, dynamic>? $unknown})
const
factory
Nux.fromJson(Map<String, Object?> json)
factory

Properties

$type String
no setterinherited
$unknown Map<String, dynamic>?
no setterinherited
completed bool
no setterinherited
copyWith → $NuxCopyWith<Nux>
Create a copy of Nux with the given fields replaced by the non-null parameter values.
no setterinherited
data String?
Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.
no setterinherited
expiresAt DateTime?
The date and time at which the NUX will expire and should be considered completed.
no setterinherited
hasData bool

Available on Nux, provided by the NuxExtension extension

no setter
hasExpiresAt bool

Available on Nux, provided by the NuxExtension extension

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

Available on Nux, provided by the NuxExtension extension

no setter
hasNotExpiresAt bool

Available on Nux, provided by the NuxExtension extension

no setter
id String
no setterinherited
isCompleted bool

Available on Nux, provided by the NuxExtension extension

no setter
isNotCompleted bool

Available on Nux, provided by the NuxExtension extension

no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Available on Nux, provided by the NuxPatterns extension

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

Available on Nux, provided by the NuxPatterns extension

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

Available on Nux, provided by the NuxPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String $type, String id, bool completed, String? data, DateTime? expiresAt, Map<String, dynamic>? $unknown)?, {required TResult orElse()}) → TResult

Available on Nux, provided by the NuxPatterns 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 Nux to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String $type, String id, bool completed, String? data, DateTime? expiresAt, Map<String, dynamic>? $unknown)) → TResult

Available on Nux, provided by the NuxPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String $type, String id, bool completed, String? data, DateTime? expiresAt, Map<String, dynamic>? $unknown)?) → TResult?

Available on Nux, provided by the NuxPatterns 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>