Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

未适配flutter2.0的null safe #133

Open
fcloud89 opened this issue May 21, 2021 · 2 comments
Open

未适配flutter2.0的null safe #133

fcloud89 opened this issue May 21, 2021 · 2 comments

Comments

@fcloud89
Copy link

yaml文件中的dart sdk要求大于2.12.0
但lib中的dart文件未适配null safe
该插件暂时无法使用
@skill20 @raoxudong

@skill20
Copy link
Contributor

skill20 commented May 26, 2021

2.1.2 已适配

@jing-pei
Copy link

jing-pei commented Jul 4, 2021

@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>'"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants