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

小优化,iOS端用户未选择图片时最好判空 #3

Closed
aiyouBug opened this issue Sep 10, 2020 · 1 comment
Closed

小优化,iOS端用户未选择图片时最好判空 #3

aiyouBug opened this issue Sep 10, 2020 · 1 comment
Labels
good first issue Good for newcomers

Comments

@aiyouBug
Copy link

image
Future getImage() async {
pickedFile = await picker.getImage(source: ImageSource.gallery);

if(pickedFile != null && pickedFile.path.length > 0) { //判空
  setState(() {
    _imageBg = File(pickedFile.path);
    print(pickedFile.path);
  });
}
@xieyezi xieyezi added the good first issue Good for newcomers label Sep 10, 2020
@xieyezi
Copy link
Owner

xieyezi commented Sep 10, 2020

Hi, @aiyouBug

谢谢提建议,已经优化!!

@xieyezi xieyezi closed this as completed Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants