PlatformData class final

Client-side BrowserPlatform implementation.

Constructors

PlatformData()
Returns the current instance of PlatformData.
factory

Properties

baseUrl → String
Base URL.
no setter
currentPath → String
Current page path without the baseUrl.
no setter
device → String
Device name.
no setter
hashCode → int
The hash code for this object.
no setterinherited
height → int
Browser screen height.
no setter
isAndroid → bool
Returns true if the platform is Android.
no setter
isDesktop → bool
Returns true if the platform is a desktop or laptop.
no setter
isiOS → bool
Returns true if the platform is iOS.
no setter
isiPad → bool
Returns true if the platform is an iPad.
no setter
isIphone → bool
Returns true if the platform is an iPhone.
no setter
isMacOS → bool
Returns true if the platform is MacOS.
no setter
isMobile → bool
Returns true if the platform is mobile.
no setter
isMobileBrowser → bool
Returns true if the application is running on a mobile browser but not as a PWA.
no setter
isPWA → bool
Returns true if the application is running as a Progressive Web App.
no setter
isTablet → bool
Returns true if the platform is tablet.
no setter
isWindows → bool
Returns true if the platform is Windows.
no setter
language → String
Language.
no setter
location → Location
latefinal
name → String
Browser name.
no setter
os → String
Operating System name.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
userAgent → String
User agent.
no setter
width → int
Browser screen width.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Convert the platform data to a JSON map.
inherited
toString() → String
Convert the platform data to a JSON string.
inherited

Operators

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

Static Properties

current → PlatformData
Returns the current instance of PlatformData.
no setter

Static Methods

init({String? baseUrl, String? currentPath, String? userAgent, int? width, int? height, String? language}) → void
Initializes the PlatformData instance with the given values, falling back to the browser's values for any that are omitted.