79200819

Date: 2024-11-18 17:18:31
Score: 2
Natty:
Report link

If you use SetState inside the onSelected help you?

      onSelected: (SampleItem item) {
        setState(() {
          selectedItem = item;
        });
      },

Need to be StateFull.

More here: https://api.flutter.dev/flutter/material/PopupMenuButton-class.html

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Alexandre B.