void _onFollow(UserType userType, string userId) { if (this.isLoggedIn) { if (userType == UserType.follow) { ActionSheetUtils.showModalActionSheet( new ActionSheet( title: "确定不再关注?", items: new List <ActionSheetItem> { new ActionSheetItem("确定", type: ActionType.normal, () => this.unFollowUser?.Invoke(text: userId)), new ActionSheetItem("取消", type: ActionType.cancel) } ) ); } if (userType == UserType.unFollow) { this.followUser?.Invoke(text: userId); } } else { this.pushToLogin?.Invoke(); } }
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 )); }
public static void showShareView( Widget child ) { ActionSheetUtils.showModalActionSheet(child: child); }