示例#1
0
        void _pickImage()
        {
            var imageUrl  = this.widget.urls[this.currentIndex];
            var imagePath = SQLiteDBManager.instance.GetCachedFilePath(imageUrl);

            if (imagePath.isEmpty())
            {
                return;
            }

            var items = new List <ActionSheetItem> {
                new ActionSheetItem(
                    "保存图片",
                    onTap: () => {
                    if (imagePath.isNotEmpty())
                    {
                        var imageStr = CImageUtils.readImage(imagePath);
                        PickImagePlugin.SaveImage(imagePath, imageStr);
                    }
                }
                    ),
                new ActionSheetItem("取消", type: ActionType.cancel)
            };

            ActionSheetUtils.showModalActionSheet(new ActionSheet(
                                                      title: "",
                                                      items: items
                                                      ));
        }