AndroidContentProviderMessageCodec class

The codec utilized to encode data back and forth between the Dart and the native platform.

Extends the default Flutter StandartMessageCodec, adding a support for these classes:

  • Uri - when sending from native, converts it to String. Sending from Dart is not allowed and will throw.
  • Bundle - when sending from native, converts it to BundleMap. Sending from Dart is not allowed and will throw.
  • ContentValues - also treats all numeric types like Byte, Short, etc. literally, converting them into native counterparts.

Decoded values will use List<Object?> and Map<Object?, Object?> irrespective of content.

Inheritance

Constructors

AndroidContentProviderMessageCodec()
Creates the codec.
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

decodeMessage(ByteData? message) → dynamic
Decodes the specified message from binary.
inherited
encodeMessage(Object? message) ByteData?
Encodes the specified message in binary.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readSize(ReadBuffer buffer) int
Reads a non-negative int from buffer as written by writeSize.
inherited
readValue(ReadBuffer buffer) Object?
Reads a value from buffer as written by writeValue.
inherited
readValueOfType(int type, ReadBuffer buffer) Object?
Reads a value of the indicated type from buffer.
override
toString() String
A string representation of this object.
inherited
writeSize(WriteBuffer buffer, int value) → void
Writes a non-negative 32-bit integer value to buffer using an expanding 1-5 byte encoding that optimizes for small values.
inherited
writeValue(WriteBuffer buffer, Object? value) → void
Writes value to buffer by first writing a type discriminator byte, then the value itself.
override

Operators

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