TextFormField(
decoration: const InputDecoration(
labelText: 'Contact No',
),
keyboardType: TextInputType.number,
),
You can specify the number as keyboardType for the TextField using:
keyboardType: TextInputType.number
// Learn Flutter inside VS Code at sideguide.dev/courses/flutter?ref=grepper