doIt method

  1. @override
void doIt(
  1. BuildContext context,
  2. double x,
  3. double y
)
override

Implementation

@override
void doIt(
  BuildContext context,
  double x,
  double y,
) async {
  var items = doThis
      .map((value) => MenuItemAttributes(
          label: value.label, isActive: true, onTap: () => value.doThis()))
      .toList();

  StyleRegistry.registry()
      .styleWithApp(app)
      .frontEndStyle()
      .menuStyle()
      .openMenu(
        app,
        context,
        position: RelativeRect.fromLTRB(x, y, x, y),
        menuItems: items,
      );

/*
  var value = await showMenu(
    context: context,
    color: Colors.red,
    position: RelativeRect.fromLTRB(x, y, x, y),
    items: doThis
        .map((value) => popupMenuItem<String>(
        app, context,
            label: value.label, value: value.label))
        .toList(),
    elevation: 8.0,
  );
  for (var item in doThis) {
    if (item.label == value) {
      item.doThis();
    }
  }
*/
}