onPressed property

(dynamic Function(BuildContext?)?) onPressed
final

If you want custom behavior on a press of a NavBar item like display a modal screen, you can declare your logic here.

NOTE: This will override the default tab switiching behavior for this particular item.

Implementation

final Function(BuildContext?)? onPressed;