button method
Widget
button(
- AppModel app,
- BuildContext context, {
- Icon? icon,
- required String label,
- VoidCallback? onPressed,
override
Implementation
@override
Widget button(AppModel app, BuildContext context,
{Icon? icon, required String label, VoidCallback? onPressed}) {
if (icon != null) {
return ElevatedButton.icon(
onPressed: onPressed,
icon: icon,
label: Text(label),
);
} else {
return ElevatedButton(
onPressed: onPressed,
child: Text(label),
);
}
}