buildMaterialDecoration method

InputDecoration buildMaterialDecoration(
  1. BuildContext context,
  2. FieldBindingController fbc, {
  3. bool includeLabel = true,
  4. bool includeHelper = true,
  5. bool includeHint = true,
})

Implementation

InputDecoration buildMaterialDecoration(
  BuildContext context,
  FieldBindingController fbc, {
  bool includeLabel = true,
  bool includeHelper = true,
  bool includeHint = true,
}) {
  var (inputTheme, style, theme) = resolveTheme(context);
  final decoration = InputDecoration()
      .applyDefaults(inputTheme)
      .copyWith(
        labelText: includeLabel ? label : null,
        hintText: includeHint ? hint : null,
        helperText: includeHelper ? helper : null,
        prefix: prefix,
        suffix: suffix,
      );
  return decoration;
}