Google dart 中的云消息传递

Google Cloud Messaging in dart

我正在尝试使用 dart 中的此代码连接到 Google 云消息传递

  senderIds.add("api-project-testid");
  chrome.gcm.register(senderIds).then(registerCallback);

但是我有这个错误:

Exception: Uncaught Error: Profile was not signed in.

我认为错误是因为chromium没有关联任何账户。有人知道怎么解决吗?

好的... DartEditor 中使用的 Dartium 版本是 39.0.2171.0 要在没有用户登录的情况下使用 chrome.gcm.register (senderIds) 必须至少具有版本 40。您必须在更新的包中导入包chrome.

版本

希望对大家有帮助,不然我就删了。