aligned method

Widget aligned({
  1. Key? key,
  2. AlignmentGeometry alignment = Alignment.center,
  3. double? widthFactor,
  4. double? heightFactor,
})

A widget that aligns its child within itself and optionally sizes itself based on the child's size.

Implementation

Widget aligned({
  Key? key,
  AlignmentGeometry alignment = Alignment.center,
  double? widthFactor,
  double? heightFactor,
}) {
  return Align(
    key: key,
    alignment: alignment,
    widthFactor: widthFactor,
    heightFactor: heightFactor,
    child: this,
  );
}