userAgent property

String userAgent

When null the platform's webview default is used for the User-Agent header.

When the WebView is rebuilt with a different userAgent, the page reloads and the request uses the new User Agent.

When WebViewController.goBack is called after changing userAgent the previous userAgent value is used until the page is reloaded.

This field is ignored on iOS versions prior to 9 as the platform does not support a custom user agent.

By default userAgent is null.


final String userAgent;