bool isFileFromURL(String filePath) { if (filePath.startsWith('http://') || filePath.startsWith('https://')) { return true; //From URL } else { // local cached file return false; } }