phoneWithLength static method

List<TextInputFormatter> phoneWithLength([
  1. int exactLength = 11
])

Creates a formatter for phone with exact length exactLength - Exact required length (default: 11)

Implementation

static List<TextInputFormatter> phoneWithLength([int exactLength = 11]) =>
    <TextInputFormatter>[...phoneField, ...lengthLimit(exactLength)];