setData method

dynamic setData(
  1. dynamic response
)

Implementation

setData(response) {
  data = response
      .where((obj) => obj.title != null && obj.category != null)
      .toList();
  notifyListeners();
}