verifyMaximumDecimal method

dynamic verifyMaximumDecimal(
  1. String curValue,
  2. String oldValue,
  3. int digit,
  4. dynamic call(
    1. String,
    2. bool
    )?,
)
inherited

Implementation

verifyMaximumDecimal(
  String curValue,
  String oldValue,
  int digit,
  Function(String, bool)? call,
) {
  late String result = curValue;
  late bool res = false;
  final List<String> resList = curValue.split('.');
  if (resList.length >= 2) {
    if (resList.last.length > digit) {
      result = oldValue;
      res = true;
    }
  }
  call?.call(result, res);
}