Flutter 飘动网页-无止境-如何发送邮件
我正在开发一个网站与颤振网站。 在这个网站上有一个直接从网站发送电子邮件的页面 为此,我考虑使用BackEnding: 但是,当我发送一封简单的电子邮件时,它会给我以下问题Flutter 飘动网页-无止境-如何发送邮件,flutter,email,sendmail,flutter-web,backendless,Flutter,Email,Sendmail,Flutter Web,Backendless,我正在开发一个网站与颤振网站。 在这个网站上有一个直接从网站发送电子邮件的页面 为此,我考虑使用BackEnding: 但是,当我发送一封简单的电子邮件时,它会给我以下问题 Error: PlatformException(error, Expected a value of type '(dynamic) => dynamic', but got one of type '(Object) => Object', null, null) at Object.throw_ [as
Error: PlatformException(error, Expected a value of type '(dynamic) => dynamic', but got one of type '(Object) => Object', null, null)
at Object.throw_ [as throw] (http://localhost:61993/dart_sdk.js:5032:11)
at StandardMethodCodec.decodeEnvelope (http://localhost:61993/packages/flutter/src/services/system_channels.dart.lib.js:791:19)
at MethodChannel._invokeMethod (http://localhost:61993/packages/flutter/src/services/system_channels.dart.lib.js:955:47)
at _invokeMethod.next (<anonymous>)
at http://localhost:61993/dart_sdk.js:37210:33
at _RootZone.runUnary (http://localhost:61993/dart_sdk.js:37081:59)
at _FutureListener.thenAwait.handleValue (http://localhost:61993/dart_sdk.js:32337:29)
at handleValueCallback (http://localhost:61993/dart_sdk.js:32864:49)
at Function._propagateToListeners (http://localhost:61993/dart_sdk.js:32902:17)
at _Future.new.[_completeWithValue] (http://localhost:61993/dart_sdk.js:32750:23)
at async._AsyncCallbackEntry.new.callback (http://localhost:61993/dart_sdk.js:32771:35)
at Object._microtaskLoop (http://localhost:61993/dart_sdk.js:37333:13)
at _startMicrotaskLoop (http://localhost:61993/dart_sdk.js:37339:13)
at http://localhost:61993/dart_sdk.js:33110:9
Error:PlatformException(错误,需要类型为“(动态)=>dynamic”的值,但得到类型为“(对象)=>Object”、null、null的值)
at Object.throw uu[as throw](http://localhost:61993/dart_sdk.js:5032:11)
在StandardMethodCodec.decodeEnvelope(http://localhost:61993/packages/flutter/src/services/system_channels.dart.lib.js:791:19)
在MethodChannel.\u调用方法(http://localhost:61993/packages/flutter/src/services/system_channels.dart.lib.js:955:47)
在_invokeMethod.next()
在http://localhost:61993/dart_sdk.js:37210:33
at_RootZone.runUnary(http://localhost:61993/dart_sdk.js:37081:59)
在未来的聆听者。然后等待。handleValue(http://localhost:61993/dart_sdk.js:32337:29)
在handleValueCallback(http://localhost:61993/dart_sdk.js:32864:49)
at函数。\u传播到侦听器(http://localhost:61993/dart_sdk.js:32902:17)
在_Future.new.[u completeWithValue](http://localhost:61993/dart_sdk.js:32750:23)
异步时。\u AsyncCallbackEntry.new.callback(http://localhost:61993/dart_sdk.js:32771:35)
在对象上。\u微任务循环(http://localhost:61993/dart_sdk.js:37333:13)
at_startMicrotaskLoop(http://localhost:61993/dart_sdk.js:37339:13)
在http://localhost:61993/dart_sdk.js:33110:9
下面是发送电子邮件的代码
@override
void initState() {
super.initState();
Backendless.initWebApp('**APP_ID**', '**JS_ID**');
}
Future<void> _sendMail() async {
Backendless.messaging.sendTextEmail("Reminder", "Email text body",
["my_email@gmail.com"]).then((response) {
print("Email has been sent");
});
}
@覆盖
void initState(){
super.initState();
initWebApp('**APP_ID**','**JS_ID**');
}
Future\u sendMail()异步{
backending.messaging.sendTextEmail(“提醒”,“电子邮件正文”,
[“我的_email@gmail.com“])。然后((回应){
打印(“已发送电子邮件”);
});
}
在“无止境电子邮件”设置中,所有内容都设置正确。
有人能帮我吗?
。