lannodev / we_slide

A backdrop animated widget
MIT License
77 stars 25 forks source link

height based on content #18

Open shahmirzali49 opened 2 years ago

shahmirzali49 commented 2 years ago

Can you add a feature, panel's height be relative based on content

lannodev commented 2 years ago

Hi @Shahmirzali-Huseynov 👋 to set the panel size, use panelMinSize and panelMaxSize properties

shahmirzali49 commented 2 years ago

@luciano-work thanks for replying, but I don't want to set the height myself, is it calculated the height based on the content?

lannodev commented 2 years ago

You can define using media query:

final double _panelMinSize = 130.0;
final double _panelMaxSize = MediaQuery.of(context).size.height;

https://dartpad.dev/?id=6a833cba62679260bf1a556a4fdc9043

shahmirzali49 commented 2 years ago

@luciano-work I mean like this -> https://pub.dev/packages/bottom_sheet

but this is bottom_sheet. I want to draggable sheet like what you did, but height based on the content or child widget height.

Screen Shot 2022-08-11 at 00 34 11
lannodev commented 2 years ago

@Shahmirzali-Huseynov I will analyze your suggestion and see if it possible to implement ;)