File selectFile; showModalBottomSheet( context: context, builder: (BuildContext context) { return new Column( mainAxisSize: MainAxisSize.min, children: <Widget>[ new ListTile( leading: new Icon(Icons.photo_camera), title: new Text("拍照"), onTap: () async { selectFile = await ImagePicker.pickImage( source: ImageSource.camera); // print('拍照返回:' + selectFile.path); Navigator.pop(context, selectFile); }, ), new ListTile( leading: new Icon(Icons.photo_library),
flutter showModalBottomSheet传值
最新推荐文章于 2022-08-18 15:05:06 发布