centered method

Widget centered({
  1. bool horizontal = true,
  2. bool vertical = true,
})

Implementation

Widget centered({bool horizontal = true, bool vertical = true}) => Center(
  widthFactor: horizontal ? null : 1.0,
  heightFactor: vertical ? null : 1.0,
  child: this,
);