constrained property
Whether the normal size constraints at this point in the widget tree are applied to the child.
If set to false, then the child will be given infinite constraints. This is often useful when a child should be bigger than the InteractiveViewer.
For example, for a child which is bigger than the viewport but can be panned to reveal parts that were initially offscreen, constrained must be set to false to allow it to size itself properly. If constrained is true and the child can only size itself to the viewport, then areas initially outside of the viewport will not be able to receive user interaction events. If experiencing regions of the child that are not receptive to user gestures, make sure constrained is false and the child is sized properly.
Defaults to true.
To create a local project with this code sample, run:
flutter create --sample=widgets.InteractiveViewer.constrained.1 mysample
Implementation
final bool constrained;