preventBlocking property

bool preventBlocking
final

Parsing is executed in an isolate to prevent blocking of the UI if set to true, except on the web where isolates are not supported.

Using an isolate has the adverse effect of adding an overhead, resulting in a slightly longer execution, but it is sometimes better than the main thread getting blocked.

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;