registerDevice static method

Future registerDevice(
  1. String apiKey,
  2. void successCallback(
    1. bool
    ),
  3. void failureCallback(
    1. dynamic
    )
)

Implementation

static Future registerDevice(
  String apiKey,
  void Function(bool) successCallback,
  void Function(dynamic) failureCallback,
) async {
  dynamic unReadMessagesResponse =
      await _channel.invokeMethod('registerDevice', {'apiKey': apiKey});
  if (unReadMessagesResponse is bool) {
    successCallback(unReadMessagesResponse);
  } else {
    failureCallback(unReadMessagesResponse);
  }
}