fetchNotifications method

  1. @override
Future<List<Notification>> fetchNotifications(
  1. String token
)
override

Fetches the user's notifications.

Implementation

@override
Future<List<Notification>> fetchNotifications(String token) async {
  final response = await _api.callFunction(
    token: token,
    function: 'local_lbplanner_notifications_get_all_notifications',
    body: {},
  );

  response.assertList();

  return response.asList.map(Notification.fromJson).toList();
}