NumberEditingTextController.integer constructor

NumberEditingTextController.integer({
  1. String? locale,
  2. num? value,
  3. String? groupSeparator,
  4. bool allowNegative = true,
})

Creates a controller instance suitable for formatting input as an integer

locale - locale to be used for number formatting, defaults to Intl.getCurrentLocale() value - optional initial value groupSeparator - symbol used to group number allowNegative - allow negative number input

Implementation

NumberEditingTextController.integer({
  String? locale,
  num? value,
  String? groupSeparator,
  bool allowNegative = true,
}) : _format = ParsedNumberFormat.integer(
        locale: locale,
        groupSeparator: groupSeparator,
        allowNegative: allowNegative,
      ) {
  number = value;
}