Emi*_*iri 4 flutter flutter-test flutter-local-notification
嘿伙计们,当我在flutter_local_notification中使用 onDidReceiveBackgroundNotificationResponse 时,我收到错误有人可以帮助我吗?
实际上我想在用户在后台模式下选择我的通知后导航到第二页,但我遇到了这个问题
将用作backgroundHandler 的函数的定义放在任何类之外。
例如:
// If in main.dart
main() {
// ...
}
ClassABC {
void getLetter() => print('a and b');
}
// Notice how this is outside of classABC scope and main scope.
backgroundHandler() {
// Put handling code here.
}
Run Code Online (Sandbox Code Playgroud)
为了更清楚起见,您可以发布整个页面的代码吗?
| 归档时间: |
|
| 查看次数: |
5373 次 |
| 最近记录: |