Services

Custom Service

Introduction

The custom service file provides developers with the flexibility to implement their own internal notifications service according to their specific requirements. Developers can customize and extend this file to integrate their preferred custom service for internal notifications.

This service has to be implemented by developer depending on what custom service they want to use.

Implementation

Customize the implementation of each method and property according to the requirements of your custom service. This may involve integrating with external APIs, databases, or other relevant components.

Souce Code

import 'dart:async';

import './base_service.dart';
import '../../models/notification.dart';

class InternalNotificationsWithCustomService implements InternalNotificationsService {
  @override
  final Stream<int> pendingNotificationsCountStream = const Stream.empty();

  @override
  final Stream<List<InternalNotification>> notificationsStream = const Stream.empty();

  @override
  List<InternalNotification> get notifications => [];

  @override
  Future<void> init() async {}

  @override
  Future<void> dispose() async {}

  @override
  Future<void> subscribe() async {}

  @override
  Future<void> unsubscribe() async {}

  @override
  Future<void> push(List<String> userIds, InternalNotification notification) async {}
}

Copyright © 2024