buildPrimaryDecoration method

Decoration buildPrimaryDecoration(
  1. bool focused
)

Implementation

Decoration buildPrimaryDecoration(bool focused) {
  return ShapeDecoration(
    shape: RoundedRectangleBorder(
      borderRadius: borderRadius ?? BorderRadius.zero,
      side: !focused ? BorderSide.none : primaryBorder ?? BorderSide.none,
    ),
    shadows: focused && glowFactor != 0 && glowColor != null
        ? [
            BoxShadow(
              offset: const Offset(1, 1),
              color: glowColor!,
              spreadRadius: glowFactor!,
              blurRadius: glowFactor! * 2.5,
            ),
            BoxShadow(
              offset: const Offset(-1, -1),
              color: glowColor!,
              spreadRadius: glowFactor!,
              blurRadius: glowFactor! * 2.5,
            ),
            BoxShadow(
              offset: const Offset(-1, 1),
              color: glowColor!,
              spreadRadius: glowFactor!,
              blurRadius: glowFactor! * 2.5,
            ),
            BoxShadow(
              offset: const Offset(1, -1),
              color: glowColor!,
              spreadRadius: glowFactor!,
              blurRadius: glowFactor! * 2.5,
            ),
          ]
        : null,
  );
}