onPullRefresh method

Future<void> onPullRefresh()

Implementation

Future<void> onPullRefresh() async {
  People item = Dummy.getPeopleData()[0];
  await Future.delayed(Duration(seconds: 2));
  setState(() {
    adapter.addItem(item);
  });
}