jmessage-flutter-plugin
jmessage-flutter-plugin copied to clipboard
未适配flutter2.0的null safe
yaml文件中的dart sdk要求大于2.12.0 但lib中的dart文件未适配null safe 该插件暂时无法使用 @skill20 @raoxudong
2.1.2 已适配
@skill20 登录抛异常,未适配
Future<JMUserInfo?> login({
@required String? username,
@required String? password,
}) async {
if (username == null || password == null) {
throw ("username or password was passed null");
}
print("Action - login: username=$username,pw=$password");
// line: 446
Map userJson = await _channel
.invokeMethod('login', {'username': username, 'password': password});
if (userJson == null) {
return null;
} else {
return JMUserInfo.fromJson(userJson);
}
}
exception = {_TypeError} type 'Null' is not a subtype of type 'Map<dynamic, dynamic>' _stackTrace = null _url = "package:jmessage_flutter/jmessage_flutter.dart" _line = 446 _column = 9 _message = "type 'Null' is not a subtype of type 'Map<dynamic, dynamic>'"