center method

Widget center()

Centers the widget

Example:

Text('Hello').center()

Implementation

Widget center() {
  return Center(child: this);
}