center method

Widget center()

Aligns this widget to the top.

This is equivalent to wrapping this widget with an Align widget with Alignment.topCenter.

Implementation

Widget center() => Align(child: this);