button2 static method

Widget button2(
  1. AppModel app,
  2. BuildContext context,
  3. MemberActionModel action,
  4. String memberId,
)

Implementation

static Widget button2(AppModel app, BuildContext context,
    MemberActionModel action, String memberId) {
  String text;
  if (action.text != null) {
    text = action.text!;
    if (action.description != null) {
      text = '$text - ${action.description!}';
    }
  } else {
    if (action.description != null) {
      text = action.description!;
    } else {
      text = '?';
    }
  }
  return button(app, context,
      label: text,
      onPressed: () => eliudrouter.Router.navigateTo(context, action.action!,
          parameters: {'memberId': memberId}));
}