NativeImplementations class abstract
provides native implementations for demanding arithmetic operations in order to prevent the UI from blocking
possible implementations might be:
- native code
- another Dart isolate
- a web worker
- a dummy implementations
Rules for extension (important for noSuchMethod implementations)
- always only accept exactly one positioned argument
- catch the corresponding case in NativeImplementations.noSuchMethod
- always write a dummy implementations
Constructors
- NativeImplementations()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
calcImageMetadata(
Uint8List bytes, {bool retryInDummy = false}) → FutureOr< MatrixImageFileResizedResponse?> -
decryptFile(
EncryptedFile file, {bool retryInDummy = true}) → FutureOr< Uint8List?> -
generateUploadKeys(
GenerateUploadKeysArgs args, {bool retryInDummy = true}) → FutureOr< RoomKeys> -
keyFromPassphrase(
KeyFromPassphraseArgs args, {bool retryInDummy = true}) → FutureOr< Uint8List> -
noSuchMethod(
Invocation invocation) → dynamic -
this implementation will catch any non-implemented method
override
-
shrinkImage(
MatrixImageFileResizeArguments args, {bool retryInDummy = false}) → FutureOr< MatrixImageFileResizedResponse?> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- dummy → const NativeImplementationsDummy
- a dummy implementation executing all calls in the same thread causing the UI to likely freeze