APIPlatform class abstract
The current API platform.
Constructors
Properties
- capability → APIPlatformCapability
-
The capabilities of this platforms.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The name of the platform.
no setter
-
propertiesKeys
→ Iterable<
String> -
Returns the platform properties keys.
See getProperty and setProperty.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → APIPlatformType
-
The platform type.
no setter
Methods
-
getProperty(
String? key, {String? defaultValue, bool caseSensitive = false}) → String? - Returns a platform property. See setProperty.
-
getPropertyAs<
T> (String? key, {String? defaultValue, bool caseSensitive = false}) → T? -
Alias to getProperty with a casting to
T
. -
log(
Object? message, [Object? error, StackTrace? stackTrace]) → void -
logError(
Object? message, [Object? error, StackTrace? stackTrace]) → void -
logInfo(
Object? message, [Object? error, StackTrace? stackTrace]) → void -
logWarning(
Object? message, [Object? error, StackTrace? stackTrace]) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readFileAsBytes(
String filePath) → FutureOr< Uint8List?> -
Reads a
filePath
data asUint8List
. -
readFileAsString(
String filePath) → FutureOr< String?> -
Reads a
filePath
data asString
. -
resolveFilePath(
String filePath, {String? parentPath}) → String? -
Resolves
filePath
to the platform actual file path. -
setProperty(
String key, String value) → String? - Overwrites a platform property. Returns the previous value. See getProperty.
-
stderr(
Object? o) → void -
stderrLn(
Object? o) → void -
stdout(
Object? o) → void -
stdoutLn(
Object? o) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
) → APIPlatform - Returns the static APIPlatform instance for the current platform.