amount static method

TextDynamicInput<double> amount({
  1. required String hintText,
  2. double? initialValue,
  3. ValueChanged<double?>? onChanged,
  4. bool enabled = true,
  5. String? errorText,
})

Implementation

static TextDynamicInput<double> amount({
  required String hintText,
  double? initialValue,
  ValueChanged<double?>? onChanged,
  bool enabled = true,
  String? errorText,
}) {
  return TextDynamicInput<double>(
    hintText: hintText,
    initialValue: initialValue,
    onChanged: (value) {
      onChanged?.call(value);
    },
    enabled: enabled,
    formatters: [DecimalFormatter()],
    keyboardType: const TextInputType.numberWithOptions(decimal: true),
    decoration: InputDecoration(
      prefixIcon: const Icon(Icons.euro),
      prefixIconColor: SepteoColors.blue.shade900,
    ),
    errorText: errorText,
  );
}