ArcaneFormattedInput.phone constructor
ArcaneFormattedInput.phone({})
Implementation
factory ArcaneFormattedInput.phone({
String? initialAreaCode,
String? initialPrefix,
String? initialLine,
void Function(FormattedValue value)? onChanged,
String? label,
String? error,
bool disabled = false,
}) {
return ArcaneFormattedInput(
initialValue: FormattedValue([
const InputPart.static('('),
const InputPart.editable(length: 3, width: 45, placeholder: '000', inputType: 'tel')
.withValue(initialAreaCode ?? ''),
const InputPart.static(') '),
const InputPart.editable(length: 3, width: 45, placeholder: '000', inputType: 'tel')
.withValue(initialPrefix ?? ''),
const InputPart.static('-'),
const InputPart.editable(length: 4, width: 55, placeholder: '0000', inputType: 'tel')
.withValue(initialLine ?? ''),
]),
onChanged: onChanged,
label: label ?? 'Phone',
error: error,
disabled: disabled,
);
}