shadowButton method

Widget shadowButton(
  1. BuildContext context,
  2. String? text,
  3. Function? onPressed, {
  4. IconData? icon,
  5. Widget? leading,
  6. Widget? trailing,
  7. Widget? content,
  8. Color? color,
  9. bool loading = false,
  10. double? borderRadius,
})

Implementation

Widget shadowButton(BuildContext context, String? text, Function? onPressed,
    {IconData? icon,
    Widget? leading,
    Widget? trailing,
    Widget? content,
    Color? color,
    bool loading = false,
    double? borderRadius}) {
  Color bgColor = color ?? Theme.of(context).textTheme.bodyMedium!.color!;
  return CustomButton(
    text: text,
    onPressed: onPressed,
    icon: icon,
    leading: leading,
    trailing: trailing,
    content: content,
    color: bgColor.withOpacity(0.1),
    textColor: color ?? Theme.of(context).textTheme.bodyMedium!.color,
    loading: loading,
    borderRadius: borderRadius,
  );
}