如何限制在Flutter的文本框中不应该将“0”放在第一个字符位置?下面是示例dart代码。
TextField(
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter.allow(
RegExp("[0-9\u0660-\u0669]")),
],
keyboardType: TextInputType.number,
focusNode: _nodeText1,
controller: mobileNumber,
decoration: InputDecoration.collapsed(
fillColor: TuxedoColor.whiteColor,
hintText: "5xxxxxxxx"),
),