makeRefreshable method

Widget makeRefreshable()

Wraps the widget with a RefreshIndicator to make it refreshable. This assumes that the widget is inside a Stack with a ListView.

Example:

ListView().makeRefreshable();

Implementation

Widget makeRefreshable() {
  return Stack(children: [ListView(), this!]);
}