register method

Future<void> register()

Register the resource with the Nitric server. Handles shutting down the channel.

Implementation

Future<void> register() async {
  var res = asRequest();

  await _client.declare(res);

  await ClientChannelSingleton.instance.release();

  _registrationCompletion.complete(res.id);
}