responsiveButton static method
Widget
responsiveButton(
- BuildContext context, {
- required Widget child,
- required VoidCallback onTap,
- double height = 48,
- double horizontalPadding = 16,
Implementation
static Widget responsiveButton(
BuildContext context, {
required Widget child,
required VoidCallback onTap,
double height = 48,
double horizontalPadding = 16,
}) {
return SizedBox(
height: height.h(context),
child: ElevatedButton(
onPressed: onTap,
style: ElevatedButton.styleFrom(
padding: EdgeInsets.symmetric(
horizontal: horizontalPadding.s(context)),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.r(context)),
),
),
child: child,
),
);
}