debugLockDelegate method

  1. @override
bool debugLockDelegate(
  1. BuildContext context
)
override

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;
}