AssetResourceContentDetector typedef
A function signature for detecting whether a given source should be treated as content rather than a file path.
The function receives a source
which may be:
The function should return:
true
if the source represents inline content.false
if the source represents a file path or non-content.
You can register custom detectors using:
AssetResource.registerContentDetector((source) {
if (source is String && source.trim().startsWith('<html>')) {
return true;
}
return false;
});
Implementation
typedef AssetResourceContentDetector = bool Function(Object source);