Answers for "allow only integer input dart"

2

allow only integer input flutter

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
 ),
Posted by: Guest on May-20-2021

Browse Popular Code Answers by Language