FieldModel.from constructor

FieldModel.from(
  1. BaseModel another
)

Constructs a new instance of FieldModel, from the fields of another instance. Throws if the conversion fails.

Implementation

factory FieldModel.from(
  BaseModel another,
) {
  try {
    return fromOrNull(another)!;
  } catch (e) {
    assert(false, '$FieldModel.from: $e');
    rethrow;
  }
}