addHandlerWithFunc abstract method
AddHandlerWithFunc registers the given handler to be invoked when the provided match function returns true.
The match function will be invoked with an incoming protocol ID string, and should return true if the handler supports the protocol. Note that the protocol ID argument is not used for matching; if you want to match the protocol ID string exactly, you must check for it in your match function.
Implementation
Future<void> addHandlerWithFunc(ProtocolID protocol, bool Function(ProtocolID) match, HandlerFunc handler);