ConstraintsTransformBox

This widget motivated by ConstraintsTransformBox in Flutter.

A container widget that applies an arbitrary transform to its constraints, and sizes its child using the resulting BoxConstraints, optionally clipping, or treating the overflow as an error.

This container sizes its child using a BoxConstraints created by applying constraintsTransform to its own constraints. This container will then attempt to adopt the same size, within the limits of its own constraints. If it ends up with a different size, it will align the child based on alignment. If the container cannot expand enough to accommodate the entire child, the child will be clipped if clipBehavior is not Clip.none.

See: https://api.flutter.dev/flutter/widgets/ConstraintsTransformBox-class.html

Props

constraintsTransfrom

Value: (constraints: Constraints) => Constraints

alignment

Value: Alignment (default: Alignment.center)

clipped

Value: boolean (default: false)

child

Value: Widget | undefined

Examples

Basic