iconTextHorizontal function
Widget
iconTextHorizontal({
- required Widget leading,
- required Widget trailing,
- EdgeInsets margin = EdgeInsets.zero,
- VoidCallback? onTap,
- double spaceBetween = 6,
- MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
- CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
- MainAxisSize mainAxisSize = MainAxisSize.min,
Implementation
Widget iconTextHorizontal({
required final Widget leading,
required final Widget trailing,
final EdgeInsets margin = EdgeInsets.zero,
final VoidCallback? onTap,
final double spaceBetween = 6,
final MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
final CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
final MainAxisSize mainAxisSize = MainAxisSize.min,
}) =>
GestureDetector(
onTap: onTap,
child: row(
mainAxisAlignment: mainAxisAlignment,
crossAxisAlignment: crossAxisAlignment,
mainAxisSize: mainAxisSize,
margin: margin,
children: <Widget>[leading, SizedBox(width: spaceBetween), trailing],
),
);