register method
Registers the application with FCM. The registration ID will be returned
by the callback. If register is called again with the same list of
senderIds, the same registration ID will be returned.
senderIds A list of server IDs that are allowed to send messages to
the application. It should contain at least one and no more than 100
sender IDs.
returns Function called when registration completes. It should check
runtime.lastError for error when registrationId is empty.
Implementation
Future<String> register(List<String> senderIds) async {
var $res = await promiseToFuture<String>(
$js.chrome.gcm.register(senderIds.toJSArray((e) => e)));
return $res;
}