button method

  1. @override
Widget button(
  1. AppModel app,
  2. BuildContext context, {
  3. Icon? icon,
  4. required String label,
  5. 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),
    );
  }
}