outlineInputStyle function

InputDecoration outlineInputStyle(
  1. BuildContext context, [
  2. string? label,
  3. IconData? icon,
  4. void onIconTap()?,
  5. Color? color,
  6. dynamic suffixIcon,
  7. void onSuffixIconTap()?,
  8. InputDecoration? other,
])

Implementation

InputDecoration outlineInputStyle(BuildContext context, [string? label, IconData? icon, void Function()? onIconTap, Color? color, dynamic suffixIcon, void Function()? onSuffixIconTap, InputDecoration? other]) {
  other = other ?? const InputDecoration();
  return other.copyWith(
    fillColor: Colors.transparent,
    label: label.asNullableText(),
    icon: icon == null ? null : forceWidget(icon, style: TextStyle(color: color ?? context.colorScheme.onSurface))?.onTap(onIconTap),
    suffixIcon: suffixIcon == null ? null : forceWidget(suffixIcon, style: TextStyle(color: color ?? context.colorScheme.onSurface))?.onTap(onSuffixIconTap),
    border: OutlineInputBorder(
      borderRadius: const BorderRadius.all(Radius.circular(5)),
      borderSide: BorderSide(color: color ?? context.colorScheme.primary, width: 20),
    ),
    filled: true,
  );
}