List<dynamic>? returnedStatus(List<dynamic>? data) { if (data == null) { return []; } return data.where((element) => element['status'] == 'Returned').toList(); }