registerNotificationHandler<T extends Notification?> method

void registerNotificationHandler<T extends Notification?>(
  1. String name,
  2. void impl(
    1. T
    )
)
inherited

Registers a notification handler named name on this server.

Implementation

void registerNotificationHandler<T extends Notification?>(
  String name,
  void Function(T) impl,
) => _peer.registerMethod(
  name,
  (Parameters? p) => impl((p?.value as Map?)?.cast<String, Object?>() as T),
);