IdentifiableEntity constructor

IdentifiableEntity({
  1. String? id,
  2. required bool dirty,
  3. String? name,
  4. String? displayName,
  5. String? shortName,
  6. String? lastUpdated,
  7. String? created,
  8. String? code,
  9. dynamic translations,
  10. bool? skipDateUpdate,
})

Implementation

IdentifiableEntity(
    {String? id,
    required bool dirty,
    this.name,
    this.displayName,
    this.shortName,
    String? lastUpdated,
    String? created,
    this.code,
    this.translations,
    bool? skipDateUpdate})
    : super(
          id: id,
          dirty: dirty,
          created: created,
          lastUpdated: lastUpdated,
          skipDateUpdate: skipDateUpdate) {
  if (this.translations != null) {
    this.translations = translations is String
        ? jsonDecode(this.translations)
        : this.translations;
  }
}