assetString top-level constant
Rule
const assetString
rootBundle.loadString, which decodes large assets on an isolate.
Implementation
const assetString = Rule(
id: 'asset-string',
severity: Severity.info,
title:
'Awaits AssetBundle.loadString, which uses an isolate for large '
'assets',
why:
'AssetBundle.loadString decodes assets of 50 KB or more with compute(), '
'which runs on another isolate. Small assets work, so the test hangs '
'only once the asset grows past the limit.',
fix:
'Wrap the call in `await tester.runAsync(() => ...)`, or load the bytes '
'with `load` and decode them with utf8.decode.',
);