cardWidget method

Widget cardWidget({
  1. required Widget child,
  2. dynamic onTap()?,
  3. Color? color,
})

Implementation

Widget cardWidget({required Widget child, Function()? onTap, Color? color}) =>
    Padding(
      padding: DI.theme().cardPadding,
      child: Container(
          decoration: BoxDecoration(
            color: color ?? DI.theme().colors().minorBackground,
            borderRadius: DI.theme().cardRadius,
            boxShadow: [
              BoxShadow(
                  color: (color ?? DI.theme().colors().minorBackground)
                      .withOpacity(0.5),
                  spreadRadius: 3,
                  blurRadius: 3,
                  offset: const Offset(0, 3)),
            ],
          ),
          child: Material(
            color: Colors.transparent,
            child: InkWell(
                onTap: onTap,
                borderRadius: DI.theme().cardRadius,
                child: Padding(
                  padding: DI.theme().internalCardPadding,
                  child: child,
                )),
          )),
    );