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

can't using left/right gesture #37

Open
programmerElephant opened this issue Jun 2, 2020 · 3 comments
Open

can't using left/right gesture #37

programmerElephant opened this issue Jun 2, 2020 · 3 comments

Comments

@programmerElephant
Copy link

when i set offset:IDOffset.horizontal(1),
i can't use gesture to swipe back
can you help me
thanks

@Dn-a
Copy link
Owner

Dn-a commented Jun 2, 2020

@programmerElephant more details please. Share your code

@akashicrecorder
Copy link

akashicrecorder commented Jun 21, 2020

@Dn-a i have the same issue. how to use gesture to swipe back when offset is 1 and leftChild is opened

@override
  Widget build(BuildContext context) {
    return InnerDrawer(
      offset: IDOffset.only(left: 1),
      leftChild: Container(
        alignment: Alignment.center,
        child: Text("data"),
      ),
      scaffold: Scaffold(
        body: Container(
          alignment: Alignment.center,
          child: Text("body"),
        ),
      ),
    );
  }

@Dn-a
Copy link
Owner

Dn-a commented Jun 21, 2020

@akashicrecorder

InnerDrawer(key: _innerDrawerKey,...);

  final GlobalKey<InnerDrawerState> _innerDrawerKey = GlobalKey<InnerDrawerState>();    

You have three possibilities

_innerDrawerKey.currentState.open(              
        direction: InnerDrawerDirection.end  // optional
       );

    _innerDrawerKey.currentState.close();
       
    _innerDrawerKey.currentState.toggle();

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

No branches or pull requests

3 participants