xxxxxxxxxx
//number keyboard input
TextField(
keyboardType: TextInputType.number,
)
//Only numbers can be entered from 0-9 input
import 'package:flutter/services.dart';
TextField(
decoration: InputDecoration(labelText: "Enter number"),
keyboardType: TextInputType.number,
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter.digitsOnly
],
),
xxxxxxxxxx
import 'package:flutter/services.dart';
new TextField(
decoration: new InputDecoration(labelText: "Enter any number"),
keyboardType: TextInputType.number,
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter.digitsOnly
], // Only numbers can be entered in this input field
),