Esempio n. 1
0
 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;
 }
Esempio n. 2
0
        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)
                );
        }