getIsContent static method
Determines whether a given source
should be treated as inline content.
- Runs through all registered AssetResourceContentDetector functions.
- If any return
true
, thesource
is considered inline content. - Falls back to
_AssetResource.getIsContent(source)
if none match.
Example
final isContent = AssetResource.getIsContent('{"key": "value"}');
print(isContent); // true
Implementation
static bool getIsContent(Object source) {
for (final d in _contentDetectors) {
try {
if (d(source)) return true;
} catch (_) {
// ignore detector errors
}
}
return _AssetResource.getIsContent(source);
}