decoration static method

BoxDecoration decoration(
  1. BuildContext context, [
  2. double shadowOpacity = 0.2
])

Implementation

static BoxDecoration decoration(BuildContext context,
    [double shadowOpacity = 0.2]) {
  return BoxDecoration(
    color: Theme.of(context).cardColor,
    borderRadius: BorderRadius.circular(borderRadius),
    boxShadow: shadowOpacity == 0
        ? null
        : [
            BoxShadow(
              blurRadius: 4,
              color:
                  Theme.of(context).primaryColor.withOpacity(shadowOpacity),
              offset: const Offset(0, 2),
            ),
          ],
  );
}