A Controller with mask for currency text input, basead on the currency_textfield package.
Import the library
import 'package:currency_text_input_mask/currency_text_input_mask.dart';
Create the Controller
CurrencyTextInputMaskController controller = CurrencyTextInputMaskController()
It's possible to customize leftSymbol
, decimal
and thousand
separators:
var controller = CurrencyTextInputMaskController(leftSymbol: "R\$", decimalSymbol: ".", thousandSymbol: ",");
To get the number value from controller, use the doubleValue
property:
final double val = controller.doubleValue;