public override Widget build(BuildContext context) { D.assert(this.widget.builder != null); return(new MetaData( metaData: this, behavior: HitTestBehavior.translucent, child: this.widget.builder(context, DragUtils._mapAvatarsToData(this._candidateAvatars), DragUtils._mapAvatarsToData(this._rejectedAvatars)))); }
private bool InitMovieTitle(DragEventArgs e) { if (HasImageFile || HasImageUri) { return(false); } var movieTitle = (DragUtils.GetUnicodeText(e) ?? "").Trim(); if (string.IsNullOrWhiteSpace(movieTitle)) { return(false); } MovieTitle = movieTitle; return(true); }
private bool InitImageUri(DragEventArgs e) { if (HasImageFile) { return(false); } var imageUri = DragUtils.GetUnicodeText(e); if (IsImageFilePath(imageUri)) { ImageUri = imageUri; return(true); } if (Uri.IsWellFormedUriString(imageUri, UriKind.Absolute)) { ImageUri = imageUri; return(true); } return(false); }
private static string GetFirstBDROMDirectory(DragEventArgs e) { return(DragUtils.GetPaths(e).Select(BDFileUtils.GetBDROMDirectory).FirstOrDefault(s => s != null)); }
private bool InitImageFiles(DragEventArgs e) { ImageFiles = DragUtils.GetFilesWithExtension(e, _imageExtensions); return(ImageFiles.Any()); }