Field constructor Null safety

const Field(
  1. {required String id,
  2. required DateTime created,
  3. required DateTime updated,
  4. required FieldType type,
  5. required String name,
  6. required bool system,
  7. required bool required,
  8. required bool unique,
  9. required Collection collection,
  10. @JsonExtra() @Default({}) Map<String, dynamic> extra}
)

Implementation

const factory Field({
  /// [id] is unself unique identifier for the [Field].
  required String id,

  /// [created] is the date and time when the [Field] was created inside unself app.
  required DateTime created,

  /// [updated] is the date and time when the [Field] was last updated inside unself app.
  required DateTime updated,

  /// [type] is the data type of the [Field].
  required FieldType type,

  /// [name] is the name of the [Field].
  required String name,

  /// [system] is a flag that indicates if the [Field] is a system field.
  required bool system,

  /// [required] is a flag that indicates if the [Field] is required.
  required bool required,

  /// [unique] is a flag that indicates if the [Field] must be unique.
  required bool unique,

  /// [collection] is the [Collection] that the [Field] belongs to.
  required Collection collection,

  /// [extra] is a map of additional properties.
  @JsonExtra() @Default({}) Map<String, dynamic> extra,
}) = _Field;