width method

Widget width(
  1. double width, {
  2. Key? key,
  3. bool animate = false,
})

Implementation

Widget width(
  double width, {
  Key? key,
  bool animate = false,
}) =>
    animate
        ? _StyledAnimatedBuilder(
            key: key,
            builder: (animation) {
              return _AnimatedConstrainedBox(
                child: this,
                constraints: BoxConstraints.tightFor(width: width),
                duration: animation.duration,
                curve: animation.curve,
              );
            },
          )
        : ConstrainedBox(
            key: key,
            child: this,
            constraints: BoxConstraints.tightFor(width: width),
          );