glowBorder static method

InputBorder glowBorder(
  1. BuildContext context, {
  2. Color? color,
  3. double radius = 12,
  4. double width = 2,
})

Glowing outline border (good for OTP fields or focused states).

Implementation

static InputBorder glowBorder(
  BuildContext context, {
  Color? color,
  double radius = 12,
  double width = 2,
}) {
  final glowColor =
      (color ?? Theme.of(context).colorScheme.primary).withValues(alpha: 0.6);
  return OutlineInputBorder(
    borderRadius: BorderRadius.circular(radius.r),
    borderSide: BorderSide(color: glowColor, width: width),
  );
}