debugLockDelegate method
Locks the delegate to a single context during debugging to detect
conflicting menu owners.
Implementation
@override
bool debugLockDelegate(BuildContext context) {
assert(() {
if (_lockedContext != null && _lockedContext != context) {
return false;
}
_lockedContext = context;
return true;
}());
return true;
}