title: How to make range number value on TextField() Flutter
body: <p>This is my code :</p>
  
  <pre><code>            Padding(
                padding: const EdgeInsets.only(left: 8.0),
                child: TextField(
                  inputFormatters: [
                    LengthLimitingTextInputFormatter(2),
                    WhitelistingTextInputFormatter.digitsOnly,
                  ],
                  keyboardType: TextInputType.number,
                  decoration: new InputDecoration(
                      icon: Icon(Icons.assessment),
                      hintText: "Nilai",
                      border: InputBorder.none),
                  onChanged: (String str) {
                    nilai = str;
                  },
                ),
              ),
  </code></pre>
  
  <blockquote>
    <p>How to make the input number like only range 1 - 20?</p>
  </blockquote>
  
  <p>I'm try to using</p>
  
  <pre><code>WhitelistingTextInputFormatter(RegExp("[1-20]")),
  </code></pre>
  
  <p>but, because this WhitelistingTextInputFormatter RegExp type is string, then I can still type 22 because 2 is allowed there.</p>