Dn-a / flutter_inner_drawer

Inner Drawer is an easy way to create an internal side section (left/right) where you can insert a list-menu or other.
https://pub.dartlang.org/packages/flutter_inner_drawer
MIT License
516 stars 130 forks source link

Drawer width doesn't reflect the offset parameter #40

Open vegidio opened 4 years ago

vegidio commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

@vegidio am I unclear?

CoderCxb commented 4 years ago

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

Dn-a commented 4 years ago

@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 commented 4 years ago

@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 commented 4 years ago

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