void _pickImage() { var items = new List <ActionSheetItem> { new ActionSheetItem( "拍照", onTap: () => PickImagePlugin.PickImage( source: ImageSource.camera, pickImage => { this._pickedImage = Convert.ToBase64String(inArray: pickImage); this.setState(() => { }); }, maxSize: 100 * 1024 ) ), new ActionSheetItem( "从相册选择", onTap: () => PickImagePlugin.PickImage( source: ImageSource.gallery, pickImage => { this._pickedImage = Convert.ToBase64String(inArray: pickImage); this.setState(() => { }); }, maxSize: 100 * 1024 ) ), new ActionSheetItem("取消", type: ActionType.cancel) }; ActionSheetUtils.showModalActionSheet(new ActionSheet( title: "修改头像", items: items )); }
void _pickImage() { var items = new List <ActionSheetItem> { new ActionSheetItem( "拍照", onTap: () => PickImagePlugin.PickImage( source: ImageSource.camera, pickImage => { this._pickedImage = pickImage; this.setState(() => { }); } ) ), new ActionSheetItem( "从相册选择", onTap: () => PickImagePlugin.PickImage( source: ImageSource.gallery, pickImage => { this._pickedImage = pickImage; this.setState(() => { }); } ) ), new ActionSheetItem("取消", type: ActionType.cancel) }; ActionSheetUtils.showModalActionSheet(new ActionSheet( title: "修改头像", items: items )); }