preventBlocking property

bool preventBlocking
final

Whether to use an isolate for parsing to avoid blocking of the UI.

If set to true, parsing with the default parser is executed in an isolate to prevent blocking of the main thread and the UI.

This option does not work for the web where isolates are not supported. Also, this does not affect an external parser.

Note that using an isolate adds an overhead, resulting in a slightly longer execution time, during which the raw text is shown without decorations since CustomText is yet to know which definition should be used for which portion of text.

How long parsing takes depends on the text length, the number and complexity of match patterns, the device performance, etc. Try both true and false to see which is suitable if you are unsure.

Implementation

final bool preventBlocking;