setContent method
Parameters:
html: HTML markup to assign to the page.timeout: Maximum time in milliseconds for resources to load, defaults to 30 seconds, pass0to disable timeout. The default value can be changed by using thepage.defaultNavigationTimeoutorpage.defaultTimeout.waitWhen to consider navigation succeeded, defaults to Until.load. Given an array of event strings, navigation is considered to be successful after all events have been fired. Events can be either:- Until.load - consider navigation to be finished when the
loadevent is fired. - Until.domContentLoaded - consider navigation to be finished when the
DOMContentLoadedevent is fired. - Until.networkIdle - consider navigation to be finished when there
are no more than 0 network connections for at least
500ms. - Until.networkAlmostIdle - consider navigation to be finished when
there are no more than 2 network connections for at least
500ms.
- Until.load - consider navigation to be finished when the
Implementation
Future<void> setContent(String html, {Duration? timeout, Until? wait}) {
return _secondaryWorld.setContent(html, timeout: timeout, wait: wait);
}