BrowserDetection class

The core Browser Detection functionality from the Flutter web engine.

Properties

browserEngine BrowserEngine
Returns the BrowserEngine used by the current browser.
no setter
debugBrowserEngineOverride BrowserEngine?
Override the value of browserEngine.
getter/setter pair
debugOperatingSystemOverride OperatingSystem?
Override the value of operatingSystem.
getter/setter pair
debugUserAgentOverride String?
Override value for userAgent.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isChromium bool
Whether the current browserEngine is BrowserEngine.blink (Chrom(e|ium)).
no setter
isDesktop bool
A flag to check if the current operatingSystem is a laptop/desktop operating system.
no setter
isEdge bool
Whether the current browser is Edge.
no setter
isFirefox bool
Whether the current browserEngine is BrowserEngine.firefox.
no setter
isMobile bool
A flag to check if the current browser is running on a mobile device.
no setter
isSafari bool
Whether the current browserEngine is BrowserEngine.webkit (Safari).
no setter
isWasm bool
Whether we are running from a wasm module compiled with dart2wasm.
no setter
operatingSystem OperatingSystem
Returns the OperatingSystem the current browsers works on.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userAgent String
Returns the User Agent of the current browser.
no setter

Methods

detectBrowserEngineByVendorAgent(String vendor, String agent) BrowserEngine
Detects browser engine for a given vendor and agent string.
detectOperatingSystem({String? overridePlatform, int? overrideMaxTouchPoints}) OperatingSystem
Detects operating system using platform and UA used for unit testing.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance BrowserDetection
The singleton instance of the BrowserDetection class.
final