CONVERT KEY TO SUPER PARAMETER KYS

This commit is contained in:
Kima
2023-12-09 15:42:02 +01:00
parent e243b5c186
commit 51a6492477
71 changed files with 235 additions and 219 deletions

View File

@@ -4,11 +4,11 @@ import 'package:flutter/material.dart';
class MaterialActionButton extends StatelessWidget {
const MaterialActionButton({
Key? key,
super.key,
required this.child,
this.onPressed,
this.backgroundColor,
}) : super(key: key);
});
final Widget child;
final Function()? onPressed;
@@ -19,17 +19,17 @@ class MaterialActionButton extends StatelessWidget {
return RawMaterialButton(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
shape: const StadiumBorder(),
child: DefaultTextStyle(
child: child,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontWeight: FontWeight.w600,
color: backgroundColor != null ? ColorUtils.foregroundColor(backgroundColor!) : null,
),
),
fillColor: backgroundColor ?? AppColors.of(context).text.withOpacity(.15),
elevation: 0,
highlightElevation: 0,
onPressed: onPressed,
child: DefaultTextStyle(
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontWeight: FontWeight.w600,
color: backgroundColor != null ? ColorUtils.foregroundColor(backgroundColor!) : null,
),
child: child,
),
);
}
}