inputDouble static method

Future<double?> inputDouble({
  1. double? value,
  2. required String title,
  3. String? label,
  4. String? message,
  5. double? minValue,
  6. double? maxValue,
  7. bool signed = true,
})

Implementation

static Future<double?> inputDouble({
  double? value,
  required String title,
  String? label,
  String? message,
  double? minValue,
  double? maxValue,
  bool signed = true,
}) async {
  String? s = await inputText(
    value: value?.toString(),
    title: title,
    label: label,
    message: message,
    allowExp: Regs.reals,
    maxLength: 64,
    tips: _rangeTip(minValue, maxValue),
    validator: NumValidator(minValue: minValue, maxValue: maxValue).call,
    width: DialogWidth.small,
    keyboardType: TextInputType.numberWithOptions(decimal: true, signed: signed),
  );
  return s?.trim().toDouble;
}