[英] Currency is not updated when Flutter currency_text_input_formatter showModalBottomSheet is opened
我正在try 制作一个TextFormField,以便在currency_text_input_formatter包裹中输入钱.我把它放在showModalBottomSheet
.
这就是我打开showModalBottomSheet
的时候发生的事情:
使用键盘进行更改时:
正如你所看到的,这一次TRY
元货币的图标已经到来.当我打开showModalBottomSheet
时,我希望TRY
货币图标出现.我需要在键盘上做一个更改,以便显示实际货币TRY
.当showModalBottomSheet
打开时,我希望它正确显示(TRY
)图标.
我怎样才能解决这个问题?
textFormField
码:
TextFormField(
style: TextStyle(fontSize: 19),
decoration: InputDecoration(
border: OutlineInputBorder(),
),
initialValue: _fiyat.format(snapshot.data!.docs[index].data()["urunFiyati"]),
inputFormatters: <TextInputFormatter>[
CurrencyTextInputFormatter(
locale: 'tr_TR',
decimalDigits: 2,
symbol: '₺',
),
],
keyboardType: TextInputType.number,
),
提前感谢您的帮助:)