glassStyle static method

InputDecoration glassStyle({
  1. required BuildContext context,
  2. String? hint,
})

Glassmorphism-inspired frosted field

Implementation

static InputDecoration glassStyle({
  required BuildContext context,
  String? hint,
}) {
  return InputDecoration(
    hintText: hint,
    filled: true,
    fillColor: Theme.of(context).colorScheme.surface.withValues(alpha: 0.2),
    border: InputForm.flatBorder(context, color: Colors.white24, radius: 16),
    enabledBorder: InputForm.flatBorder(
      context,
      color: Colors.white24,
      radius: 16,
    ),
    focusedBorder: InputForm.flatBorder(
      context,
      color: Colors.white60,
      radius: 16,
    ),
    contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
  );
}