• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Flutter Resizable Container using Gestures

Resolved: Flutter Resizable Container using Gestures

0
By Isaac Tonny on 18/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I want to create a resizable container which can be resized by user using horizontal drag.
This Gif can explain the requirement:
enter image description here
I tried GestureDetector.horizontal drag but the results are way off:
enter image description here
I am looking for a way to get size change of one side using drag, also the width should decrease or increase on the basis of dragging direction and if possible the whole container can be moved as well.

Answer:

You can use Stack with Positioned widget to handle container sizing and to drag the full container I am using transform.
enter image description here
Run on dartPad
You can play with this widget.
You can wrap with if condition to avoid getting out of the screen.

If you have better answer, please add a comment about this, thank you!

dart flutter flutter-animation flutter-layout
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Sort dataframe columns value by close it to another column

27/03/2023

Resolved: PostgreSQL resample 1 minute OHLCV candle data into 5 minute OHLCV candle data

27/03/2023

Resolved: How do I navigate a table without any easily accessible distinctions?

27/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.