DataURLBase64 class
Represent a Data URL in Base-64
Constructors
- DataURLBase64(String payloadBase64, [String? mimeType])
- DataURLBase64.from(Object payload, [Object? mimeType])
-
Instantiates a DataURLBase64 automatically resolving
payload
andmimeType
.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- mimeType → MimeType?
-
The MIME-Type of parsed Data URL.
final
- mimeTypeAsString → String
-
Returns mimeType as String. Returns '' if null.
no setter
- payload → String
-
The decoded payload as String.
no setter
- payloadArrayBuffer → Uint8List
-
The decoded payload as array buffer.
no setter
- payloadBase64 → String
-
The Base-64 paylod/content of the parsed Data URL.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
asDataURLString(
) → String - Returns a Data URL string.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
matches(
String s) → bool -
Returns true if
s
is in Data URL (Base-64) format. -
parse(
String? s, {String? defaultMimeType}) → DataURLBase64? -
Constructor that parses a Data URL
s
-
parseMimeType(
String s, {String? defaultMimeType}) → MimeType? -
Parses only the MimeType of the Data URL
s
. -
parseMimeTypeAsString(
String? s, {String? defaultMimeType}) → String? -
Parses only the MIME-Type of the Data URL
s
as string. -
parsePayloadAsArrayBuffer(
String dataURL) → Uint8List? - Parses the Data URL to am array buffer.
-
parsePayloadAsBase64(
String? dataURL) → String? - Parses the Data URL to a Base-64 string.
-
parsePayloadAsString(
String dataURL) → String? - Parses the Data URL to decoded string.