A Controller for currency text input
Follow this guide
Import the library
import 'package:currency_textfield/currency_textfield.dart';
Create the Controller
CurrencyTextFieldController controller = CurrencyTextFieldController()
It's possible to customize leftSymbol
, decimal
and thousand
separators:
var controller = CurrencyTextFieldController(leftSymbol: "RR", decimalSymbol: ".", thousandSymbol: ",");
To get the number value from controller, use the doubleValue
property:
final double val = controller.doubleValue;