if (isPraticeChecked)
TextFormField(
decoration:
const InputDecoration(labelText: 'No.of Questions'),
controller: noOfquestionController,
keyboardType: TextInputType.number,
inputFormatters: [
FilteringTextInputFormatter.digitsOnly
],
validator: (value) {
final isNum = num.tryParse(value!);
if (isNum == null ||
int.parse(value) < 1 ||
int.parse(value) > 30) {
return 'No. of question must be 1 to 30.';
}
return null;
this is the textformfield keyboardtype.number this kb only receiving num if user enter other then num like "-",",",".," it is giving blank page