withLength method
Puts a constraint on the minimum and maximum length of text that can be stored in this column.
Both min
and max
are inclusive. This constraint will be validated in
Dart, it doesn't have an impact on the database schema. If min
is not
null and one tries to write a string which String.length is
strictly less than min
, an exception will be thrown. Similarly, you
can't insert strings with a length strictly greater than max
.
Implementation
ColumnBuilder<T> withLength({int? min, int? max}) => _isGenerated();