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

初始化child为空的Point时,会报错 #5

Closed
addelete opened this issue Feb 24, 2019 · 1 comment
Closed

初始化child为空的Point时,会报错 #5

addelete opened this issue Feb 24, 2019 · 1 comment

Comments

@addelete
Copy link

版本:0.1.8

重现:

Result result = await CityPickers.showCityPicker(
      height: 300,
      locationCode: '429021', // 湖北-神农架林区
      context: context,
    );

https://github.com/hanxu317317/city_pickers/blob/master/lib/src/base/base.dart#L120
这一行,_city.child.first 会抛出一个错误,因为此时的_city.child可能为空List,我看到下面的代码你有验证isEmpty,这里不知道是不是疏忽了

@hanxu317317
Copy link
Owner

之前. 未考虑过. 会有某市级下. 区级为空的状态. 已经加入判断. 并修复了.

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

2 participants