insertSpaces property
bool
get
insertSpaces
Meaningful only if the maxLength property is set and the multiline, isPassword properties are false.
If set, the field is automatically divided into as many equally spaced positions, or combs, as the value of maxLength, and the text is laid out into those combs.
The default value is false.
Implementation
bool get insertSpaces {
final List<FieldFlags> flags = _helper.flags;
_insertSpaces = flags.contains(FieldFlags.comb) &&
!flags.contains(FieldFlags.multiline) &&
!flags.contains(FieldFlags.password) &&
!flags.contains(FieldFlags.fileSelect);
if (_helper.isLoadedField) {
_insertSpaces = _insertSpaces ||
(_helper.isFlagPresent(FieldFlags.comb) &&
!_helper.isFlagPresent(FieldFlags.multiline) &&
!_helper.isFlagPresent(FieldFlags.password) &&
!_helper.isFlagPresent(FieldFlags.fileSelect));
}
return _insertSpaces;
}
set
insertSpaces
(bool value)
Implementation
set insertSpaces(bool value) {
if (insertSpaces != value) {
_insertSpaces = value;
_insertSpaces
? _helper.flags.add(FieldFlags.comb)
: _helper.isLoadedField
? _helper.removeFlag(FieldFlags.comb)
: _helper.flags.remove(FieldFlags.comb);
}
}