Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slidable freezes on tab bar only in release mode #25

Closed
git-elliot opened this issue Aug 22, 2018 · 3 comments
Closed

Slidable freezes on tab bar only in release mode #25

git-elliot opened this issue Aug 22, 2018 · 3 comments

Comments

@git-elliot
Copy link

Steps to Reproduce

  1. Create a Tab Widget
  2. Switch between tabs
  3. Now do a slidable.
  4. Switch between tabs.
  5. Do slidable again and now it freezes.

Exception

[ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter (26409): NoSuchMethodError: The method 'contains' was called on null.
E/flutter (26409): Receiver: null
E/flutter (26409): Tried calling: contains()
E/flutter (26409): #0      RenderBox.hitTest (package:flutter/src/rendering/box.dart:1862)
E/flutter (26409): #1      _RenderSliverMultiBoxAdaptor&RenderSliver&ContainerRenderObjectMixin&RenderSliverHelpers.hitTestBoxChild (package:flutter/src/rendering/sliver.dart:1475)
E/flutter (26409): #2      RenderSliverMultiBoxAdaptor.hitTestChildren (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:455)
E/flutter (26409): #3      RenderSliver.hitTest (package:flutter/src/rendering/sliver.dart:1137)
E/flutter (26409): #4      RenderSliverPadding.hitTestChildren (package:flutter/src/rendering/sliver_padding.dart:266)
E/flutter (26409): #5      RenderSliver.hitTest (package:flutter/src/rendering/sliver.dart:1137)
E/flutter (26409): #6      RenderViewportBase.hitTestChildren (package:flutter/src/rendering/viewport.dart:503)
E/flutter (26409): #7      RenderBox.hitTest (package:flutter/src/rendering/box.dart:1863)
E/flutter (26409): #8      _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:118)
E/flutter (26409): #9      RenderBox.hitTest (package:flutter/src/rendering/box.dart:1863)
E/flutter (26409): #10     RenderIgnorePointer.hitTest (package:flutter/src/rendering/proxy_box.dart:2727)
E/flutter (26409): #11     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:118)
E/flutter (26409): #12     RenderBox.hitTest (package:flutter/src/rendering/box.dart:1863)
E/flutter (26409): #13     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:118)
E/flutter (26409): #14     RenderProxyBoxWithHitTestBehavior.hitTest (package:flutter/src/rendering/proxy_box.dart:165)
E/flutter (26409): #15     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:118)
E/flutter (26409): #16     RenderBox.hitTest (package:flutter/src/rendering/box.dart:1863)
E/flutter (26409): #17     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:118)
E/flutter (26409): #18     RenderBox.hitTest (package:flutter/src/rendering/box.dart:1863)
E/flutter (26409): #19     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:118)
E/flutter (26409): #20     RenderBox.hitTest (package:flutter/src/rendering/box.dart:1863)
E/flutter (26409): #21     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:118)
E/flutter (26409): #22     RenderCustomPaint.hitTestChildren (package:flutter/src/rendering/custom_paint.dart:500)
E/flutter (26409): #23     RenderBox.hitTest (package:flutter/src/rendering/box.dart:1863)
E/flutter (26409): #24     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:118)
E/flutter (26409): #25     RenderBox.hitTest (package:flutter/src/rendering/box.dart:1863)
E/flutter (26409): #26     _RenderFlex&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultHitTestChildren (package:flutter/src/rendering/box.dart:2190)
E/flutter (26409): #27     RenderFlex.hitTestChildren (package:flutter/src/rendering/flex.dart:925)
E/flutter (26409): #28     RenderBox.hitTest (package:flutter/src/rendering/box.dart:1863)
E/flutter (26409): #29     _RenderCustomMultiChildLayoutBox&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultHitTestChildren (package:flutter/src/rendering/box.dart:2190)
E/flutter (26409): #30     RenderCustomMultiChildLayoutBox.hitTestChildren (package:flutter/src/rendering/custom_layout.dart:365)
E/flutter (26409): #31     RenderBox.hitTest (package:flutter/src/rendering/box.dart:1863)
E/flutter (26409): #32     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:118)
E/flutter (26409): #33     RenderBox.hitTest (package:flutter/src/rendering/box.dart:1863)
E/flutter (26409): #34     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:118)
E/flutter (26409): #35     RenderBox.hitTest (package:flutter/src/rendering/box.dart:1863)
E/flutter (26409): #36     RenderPhysicalMode

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.17134.228], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.0-rc2)
[√] Android Studio (version 3.1)
[√] IntelliJ IDEA Community Edition (version 2018.1)
[√] Connected devices (1 available)

• No issues found!

Workarounds already done

  1. Use NeverScrollablePhysics for tab bar.
@git-elliot git-elliot changed the title Slidable freezes in tab bar Slidable freezes on tab bar only in release mode Aug 22, 2018
@letsar
Copy link
Owner

letsar commented Aug 23, 2018

Hi @parasthekoder,
I tried to reproduce this by changing the build method of my example with the following code but I couldn't reproduce:

Widget build(BuildContext context) {
    return DefaultTabController(
      length: 3,
      child: Scaffold(
        appBar: AppBar(
          bottom: TabBar(
            tabs: [
              Tab(icon: Icon(Icons.directions_car)),
              Tab(icon: Icon(Icons.directions_transit)),
              Tab(icon: Icon(Icons.directions_bike)),
            ],
          ),
          title: Text('Tabs Demo'),
        ),
        body: TabBarView(
          children: [
            _buildList(context, Axis.vertical),
            _buildList(context, Axis.vertical),
            _buildList(context, Axis.vertical),
          ],
        ),
      ),
    );
  }

Can you paste here the the minimal code sample to reproduce this issue please?
But if it happens only on release mode, I'm not sure this issue is caused by the Slidable widget.

@JeffersonCarvalh0
Copy link

I'm experiencing a similar issue here, but in my case, it does not show any error message.The swipe between tabs simply don't work when I try to do it in the area of the slidable widgets, and it happens both in debug and release modes. Also, I'm using NestedScrollView instead of TabBarView

@letsar
Copy link
Owner

letsar commented Nov 8, 2020

You cannot use Slidable in a TabView with the same scroll direction. How can we know if you want to swipe the Slidable or the page?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants