Commit cd92e11f authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Use the actual pipeline owner for this assert. (#7400)

parent 84cf5489
......@@ -382,11 +382,7 @@ class RawGestureDetectorState extends State<RawGestureDetector> {
/// the gesture detector should be enabled.
void replaceGestureRecognizers(Map<Type, GestureRecognizerFactory> gestures) {
assert(() {
// TODO kgiesing This assert will trigger if the owner of the current
// tree is different from the owner assigned to the renderer instance.
// Once elements have a notion of owners this assertion can be written
// more clearly.
if (!RendererBinding.instance.pipelineOwner.debugDoingLayout) {
if (!context.findRenderObject().owner.debugDoingLayout) {
throw new FlutterError(
'Unexpected call to replaceGestureRecognizers() method of RawGestureDetectorState.\n'
'The replaceGestureRecognizers() method can only be called during the layout phase. '
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment