printInputDecoration function

InputDecoration printInputDecoration(
  1. String label, {
  2. String? helperText,
})

Text field look of the print screens: outlined, with its label always above the value, so it reads well whatever the app theme does.

Implementation

InputDecoration printInputDecoration(String label, {String? helperText}) =>
    InputDecoration(
      labelText: label,
      helperText: helperText,
      border: const OutlineInputBorder(),
      floatingLabelBehavior: FloatingLabelBehavior.always,
      contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 14),
    );