centered method

Widget centered({
  1. Key? key,
})

Extension method to directly access Center with any widget without wrapping or with dot operator.

Implementation

Widget centered({Key? key}) => Center(key: key, child: this);