internal _MenuItem( Key key = null, ValueChanged <Size> onLayout = null, DropdownMenuItem <T> item = null ) : base(key: key, child: item) { D.assert(onLayout != null); this.onLayout = onLayout; this.item = item; }
void _handleOnTap() { DropdownMenuItem <T> dropdownMenuItem = widget.route.items[widget.itemIndex ?? 0].item; if (dropdownMenuItem.onTap != null) { dropdownMenuItem.onTap(); } Navigator.pop( context, new _DropdownRouteResult <T>(dropdownMenuItem.value) ); }