Create class abstract

Operation which creates a new record.

Available extensions
Annotations
  • @freezed

Constructors

Create.new({@Default('com.atproto.repo.applyWrites#create') String $type, required String collection, String? rkey, required Map<String, dynamic> value, Map<String, dynamic>? $unknown})
const
factory
Create.fromJson(Map<String, Object?> json)
factory

Properties

$type String
no setterinherited
$unknown Map<String, dynamic>?
no setterinherited
collection String
no setterinherited
copyWith → $CreateCopyWith<Create>
Create a copy of Create with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasNotRkey bool

Available on Create, provided by the CreateExtension extension

no setter
hasRkey bool

Available on Create, provided by the CreateExtension extension

no setter
rkey String?
NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value Map<String, dynamic>
no setterinherited

Methods

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

Available on Create, provided by the CreatePatterns extension

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

Available on Create, provided by the CreatePatterns extension

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

Available on Create, provided by the CreatePatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String $type, String collection, String? rkey, Map<String, dynamic> value, Map<String, dynamic>? $unknown)?, {required TResult orElse()}) → TResult

Available on Create, provided by the CreatePatterns 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 Create to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String $type, String collection, String? rkey, Map<String, dynamic> value, Map<String, dynamic>? $unknown)) → TResult

Available on Create, provided by the CreatePatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String $type, String collection, String? rkey, Map<String, dynamic> value, Map<String, dynamic>? $unknown)?) → TResult?

Available on Create, provided by the CreatePatterns 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>