ReviewCardModel class abstract

Available extensions
Annotations

Constructors

ReviewCardModel({required String id, required String userId, required String topicId, String? chunkId, required String cardType, required String front, required String back, @Default(2.5) double easinessFactor, @Default(0) int intervalDays, @Default(0) int repetitions, required DateTime nextReviewAt, DateTime? lastReviewAt, int? lastQuality, double? stability, double? difficulty, @Default('new') String state, double? lastElapsedDays, int? scheduledDays, @Default('sm2') String algorithm, Map<String, dynamic>? cardData})
const
factory
ReviewCardModel.fromEntity(ReviewCard entity)
factory
ReviewCardModel.fromJson(Map<String, dynamic> json)
factory

Properties

algorithm String
no setterinherited
back String
no setterinherited
cardData Map<String, dynamic>?
no setterinherited
cardType String
no setterinherited
chunkId String?
no setterinherited
copyWith → $ReviewCardModelCopyWith<ReviewCardModel>
Create a copy of ReviewCardModel with the given fields replaced by the non-null parameter values.
no setterinherited
difficulty double?
no setterinherited
easinessFactor double
no setterinherited
front String
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
no setterinherited
intervalDays int
no setterinherited
lastElapsedDays double?
no setterinherited
lastQuality int?
no setterinherited
lastReviewAt DateTime?
no setterinherited
nextReviewAt DateTime
no setterinherited
repetitions int
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheduledDays int?
no setterinherited
stability double?
no setterinherited
state String
no setterinherited
topicId String
no setterinherited
userId String
no setterinherited

Methods

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

Available on ReviewCardModel, provided by the ReviewCardModelPatterns extension

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

Available on ReviewCardModel, provided by the ReviewCardModelPatterns extension

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

Available on ReviewCardModel, provided by the ReviewCardModelPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String id, String userId, String topicId, String? chunkId, String cardType, String front, String back, double easinessFactor, int intervalDays, int repetitions, DateTime nextReviewAt, DateTime? lastReviewAt, int? lastQuality, double? stability, double? difficulty, String state, double? lastElapsedDays, int? scheduledDays, String algorithm, Map<String, dynamic>? cardData)?, {required TResult orElse()}) → TResult

Available on ReviewCardModel, provided by the ReviewCardModelPatterns 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
toEntity() ReviewCard
toInsertJson() Map<String, dynamic>
JSON for insert — omits id so the DB generates it via gen_random_uuid().
toJson() Map<String, dynamic>
Serializes this ReviewCardModel to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String id, String userId, String topicId, String? chunkId, String cardType, String front, String back, double easinessFactor, int intervalDays, int repetitions, DateTime nextReviewAt, DateTime? lastReviewAt, int? lastQuality, double? stability, double? difficulty, String state, double? lastElapsedDays, int? scheduledDays, String algorithm, Map<String, dynamic>? cardData)) → TResult

Available on ReviewCardModel, provided by the ReviewCardModelPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String id, String userId, String topicId, String? chunkId, String cardType, String front, String back, double easinessFactor, int intervalDays, int repetitions, DateTime nextReviewAt, DateTime? lastReviewAt, int? lastQuality, double? stability, double? difficulty, String state, double? lastElapsedDays, int? scheduledDays, String algorithm, Map<String, dynamic>? cardData)?) → TResult?

Available on ReviewCardModel, provided by the ReviewCardModelPatterns extension

A variant of when that fallback to returning null

Operators

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