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

Drawer width doesn't reflect the offset parameter #40

Open
vegidio opened this issue Jun 19, 2020 · 6 comments
Open

Drawer width doesn't reflect the offset parameter #40

vegidio opened this issue Jun 19, 2020 · 6 comments

Comments

@vegidio
Copy link

vegidio commented Jun 19, 2020

I'm not sure if I'm doing something wrong or if the document is not very clear, but I'm trying to create a drawer that will fill 25% of the screen width. I created the following code:

  @override
  Widget build(BuildContext context) {
    return InnerDrawer(
      scaffold: Scaffold(
        appBar: AppBar(title: Text('GoTV')),
      ),
      leftChild: Text('Left Child'),
      offset: IDOffset.only(left: 0.25),
    );
  }

But instead my drawer is filling a lot more than half of the screen:

Simulator Screen Shot - iPhone 11 - 2020-06-19 at 09 04 42

@Dn-a
Copy link
Owner

Dn-a commented Jun 19, 2020

Hi @vegidio, the offset works on 50% of the screen. In your case you will have width50%+width50%*25%.

I will add a more accurate description to improve the usage.

@Dn-a
Copy link
Owner

Dn-a commented Jun 20, 2020

@vegidio am I unclear?

@CoderCxb
Copy link

Can i set width to a specific value? I just need width equals 100.0,but offset doesn't work.

@Dn-a
Copy link
Owner

Dn-a commented Jun 23, 2020

@cxblovecw No and it wouldn't make sense, because different devices have different screen sizes. If necessary, in the next releases, I could extend the offset on 100% of the screen, allowing more control.

@TejaDroid
Copy link

@Dn-a , Is there any update? I'm also facing same issue with using right side drawer view. I just make a small upto 50% to right view with respect the screen size.

@Dn-a
Copy link
Owner

Dn-a commented Oct 22, 2020

Hi @TejaDroid, you will find it in the next releases.

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

4 participants