I am trying to do a container that will fill the height with the size of the screen.
Container(
color: Colors.yellow, //Theme.of(context).colorScheme.primary
width: 200.0,
height: double.infinity,
),
Also is possible using Flexible or Expanded…
But the problem is I wan to do this container draggable.
If I use a height: 200.0 for instance, work fine but, when I try to use these methods to get a container with the height as the same of the screen I always get errors.
We can fix it?
I am using Chrome to deploy but also Windows.
Thank you!
Flexible(
child: Draggable(
feedback: Container(
color: Colors.red, //Theme.of(context).colorScheme.primary
width: 200.0,
height: double.infinity,
),
child: Container(
color: Colors.yellow, //Theme.of(context).colorScheme.primary
width: 200.0,
height: double.infinity,
),
),
);
This will render the yellow container but when I try to drag it, errors are fired.
With this code works fine only if i keep the height in the feedback as fixed like 300.0.
Flexible(
child: Draggable(
feedback: Container(
color: Colors.red, //Theme.of(context).colorScheme.primary
width: 200.0,
height: 300.0//double.maxFinite,
),
child: Container(
color: Colors.yellow, //Theme.of(context).colorScheme.primary
width: 200.0,
height: double.maxFinite,
),
),
);
1