FakePlatform class final
Fake class for test needs
Constructors
- FakePlatform({BuildMode? buildMode, HostPlatformType? type, OperatingSystem? operatingSystem, String? version, String? locale, int? numberOfProcessors})
- Fake constructor for test needs
Properties
- buildMode → BuildMode
-
Build mode
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAndroid → bool
-
Whether the operating system is a version of
Android
no setterinherited
- isCupertino → bool
-
Is cupertino (MacOS, iOS)
finalinherited
- isDesktop → bool
-
Is desktop device (Windows, MacOS, Fuchsia)
finalinherited
- isFuchsia → bool
-
Whether the operating system is a version of
Fuchsia
no setterinherited
- isIO → bool
-
Is I/O supporting for non-web applications
no setterinherited
- isIOS → bool
-
Whether the operating system is a version of
iOS
no setterinherited
- isLinux → bool
-
Whether the operating system is a version of
Linux
no setterinherited
- isMacOS → bool
-
Whether the operating system is a version of
macOS
no setterinherited
- isMaterial → bool
-
Is material (Android, Fuchsia)
finalinherited
- isMobile → bool
-
Is mobile device (Android, iOS)
finalinherited
- isOperatingSystemKnown → bool
-
Operating system is known type
finalinherited
- isWeb → bool
-
Is web-based applications
no setterinherited
- isWindows → bool
-
Whether the operating system is a version of
Microsoft Windows.
no setterinherited
- locale → String
-
Locale string
no setterinherited
- numberOfProcessors → int
-
The number of individual execution units of the machine
Returns 0 if unknown or not available
Use
.clamp(1, double.infinity)
if you need a quantity greater than 0no setterinherited - operatingSystem → OperatingSystem
-
Operation system
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → HostPlatformType
-
Host platform type
no setterinherited
- version → String
-
Version
in i/o - operating system version
in Web - user agent string
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
PlatformResult> ({PlatformResult fuchsia()?, PlatformResult windows()?, PlatformResult android()?, PlatformResult iOS()?, PlatformResult macOS()?, PlatformResult linux()?, PlatformResult unknown()?, PlatformResult material()?, PlatformResult cupertino()?, PlatformResult mobile()?, PlatformResult desktop()?, PlatformResult io()?, PlatformResult web()?, PlatformResult release()?, PlatformResult profile()?, PlatformResult debug()?, PlatformResult orElse()?}) → PlatformResult? -
Run functions that satisfy the current state of the platform.
You can use nested methods to compose more complex queries.
Can return null, if
orElse
not set and any callback was not called.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited