feat: experimental settings to allow patch on any app version.

This commit is contained in:
Aunali321
2022-11-01 15:26:15 +05:30
parent 293f7150f1
commit ba5234e850
6 changed files with 86 additions and 13 deletions

View File

@ -5,22 +5,25 @@ class CustomCard extends StatelessWidget {
final Widget child;
final Function()? onTap;
final EdgeInsetsGeometry? padding;
final Color? backgroundColor;
const CustomCard({
Key? key,
this.isFilled = true,
required this.child,
this.onTap,
this.padding,
}) : super(key: key);
const CustomCard(
{Key? key,
this.isFilled = true,
required this.child,
this.onTap,
this.padding,
this.backgroundColor})
: super(key: key);
@override
Widget build(BuildContext context) {
return Material(
type: isFilled ? MaterialType.card : MaterialType.transparency,
color: isFilled
? Theme.of(context).colorScheme.secondaryContainer.withOpacity(0.4)
: Colors.transparent,
? backgroundColor?.withOpacity(0.4) ??
Theme.of(context).colorScheme.secondaryContainer.withOpacity(0.4)
: backgroundColor ?? Colors.transparent,
borderRadius: BorderRadius.circular(16),
child: InkWell(
onTap: onTap,