buttonCard static method
Widget
buttonCard(
{ - required String title,
- String? subtitle,
- required IconData iconData,
- required VoidCallback handler,
- bool isTrailing = false,
- bool underlined = true,
- Color? textColor,
- required Color iconColor,
- double? iconSize,
- double? arrowSize,
- bool showBadge = false,
})
Implementation
static Widget buttonCard({
required String title,
String? subtitle,
required IconData iconData,
required VoidCallback handler,
bool isTrailing = false,
bool underlined = true,
Color? textColor,
required Color iconColor,
double? iconSize,
double? arrowSize,
bool showBadge = false,
}) {
return Column(
children: [
InkWell(
onTap: handler,
child: Container(
margin: EdgeInsets.all(10.spMin),
padding: EdgeInsets.all(10.spMin),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Icon(
iconData,
color: iconColor,
size: iconSize,
),
SizedBox(
width: 20.w,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts.body1(
title,
color: textColor,
),
SizedBox(
height: 5.h,
),
subtitle != null
? Texts.body2(
subtitle,
color: Colors.grey,
)
: const SizedBox(),
],
),
],
),
isTrailing
? badges.Badge(
showBadge: showBadge,
child: Icon(
Icons.chevron_right,
size: arrowSize,
),
)
: const SizedBox(),
],
),
),
),
underlined
? Divider(
height: 0.h,
thickness: .5,
)
: const SizedBox(),
],
);
}