flutter_inner_drawer icon indicating copy to clipboard operation
flutter_inner_drawer copied to clipboard

Drawer width doesn't reflect the offset parameter

Open vegidio opened this issue 5 years ago • 6 comments
trafficstars

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

vegidio avatar Jun 19 '20 07:06 vegidio

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 avatar Jun 19 '20 08:06 Dn-a

@vegidio am I unclear?

Dn-a avatar Jun 20 '20 17:06 Dn-a

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

CoderCxb avatar Jun 23 '20 07:06 CoderCxb

@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.

Dn-a avatar Jun 23 '20 15:06 Dn-a

@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.

TejaDroid avatar Oct 22 '20 09:10 TejaDroid

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

Dn-a avatar Oct 22 '20 11:10 Dn-a