showPopupMenuWithAllActions static method

void showPopupMenuWithAllActions(
  1. AppModel app,
  2. BuildContext context,
  3. String extraLabel,
  4. VoidCallback callback,
  5. List<MemberActionModel>? memberActions,
  6. String memberId,
)

Implementation

static void showPopupMenuWithAllActions(
    AppModel app,
    BuildContext context,
    String extraLabel,
    VoidCallback callback,
    List<MemberActionModel>? memberActions,
    String memberId) async {
  List<Widget> buttons = [];

  buttons.add(button1(app, context, extraLabel, callback));
  if (memberActions != null) {
    for (var memberAction in memberActions) {
      buttons.add(button2(app, context, memberAction, memberId));
    }
  }
  var contents =
      ListView(shrinkWrap: true, physics: ScrollPhysics(), children: buttons);

  openComplexDialog(app, context, '${app.documentID}/memberactions',
      title: "Member Actions", child: contents);
}