flutter
Posted xiaopenzai
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了flutter相关的知识,希望对你有一定的参考价值。
上传头像
Future getImage() async { var image = await ImagePicker.pickImage(source: ImageSource.gallery); ItemDao.UpLoad(image).then((res){ if(res[‘resultCode‘] == ‘ok‘){ setState(() { url = res[‘fileId‘]; }); }else{ Fluttertoast.showToast( msg: res[‘codeDesc‘], backgroundColor: Color(GSYColors.toastBg), textColor: Color(GSYColors.titleBlack)); return; } }).catchError((e){ print(e.toString()); }); setState(() { if (image != null) _image = image; }); }
以上是关于flutter的主要内容,如果未能解决你的问题,请参考以下文章
Flutterflutter doctor 报错Android license status unknown. Run `flutter doctor --android-licenses‘(代码片段
flutter解决 dart:html 只支持 flutter_web 其他平台编译报错 Avoid using web-only libraries outside Flutter web(代码片段
Flutter 报错 DioError [DioErrorType.DEFAULT]: Bad state: Insecure HTTP is not allowed by platform(代码片段