get method

Future<List<QBEvent?>> get({
  1. int page = 1,
  2. int perPage = 10,
})

Implementation

Future<List<QBEvent?>> get({int page = 1, int perPage = 10}) async {
  Map<String, Object> data = Map();

  data["page"] = page;
  data["perPage"] = perPage;

  List<Object?> list =
      await _notificationModule.invokeMethod(GET_METHOD, data);

  List<QBEvent?> eventsList = [];

  for (final item in list) {
    QBEvent? event =
        QBEventMapper.mapToQBEvent(item as Map<dynamic, dynamic>);
    eventsList.add(event);
  }

  return eventsList;
}