Transportable Encoded Data (TED) - encoded binary data for transport.
Represents binary data encoded as a string for easy transmission, implementing TransportableResource for serialization.
Supported formats:
0. Pure Base64 string: "{BASE64_ENCODE}"
- Data URI format:
"data:image/png;base64,{BASE64_ENCODE}"
- Implemented types
Properties
- bytes → Uint8List?
-
Gets the original raw binary data (plaintext) before encoding.
no setter
-
codeUnits
→ List<
int> -
An unmodifiable list of the UTF-16 code units of this string.
no setterinherited
- encoding → String?
-
encode algorithms
Gets the encoding algorithm name (e.g., 'base64').
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
Whether this data is empty.
no setteroverride
- isNotEmpty → bool
-
Whether this data is not empty.
no setteroverride
- length → int
-
The length of the string.
no setterinherited
- lengthInBytes → int
-
Gets the size of the raw binary data in bytes.
no setter
- runes → Runes
-
An Iterable of Unicode code-points of this string.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
allMatches(
String string, [int start = 0]) → Iterable< Match> -
Matches this pattern against the string repeatedly.
inherited
-
codeUnitAt(
int index) → int -
Returns the 16-bit UTF-16 code unit at the given
index.inherited -
compareTo(
String other) → int -
Compares this object to another object.
inherited
-
contains(
Pattern other, [int startIndex = 0]) → bool -
Whether this string contains a match of
other.inherited -
endsWith(
String other) → bool -
Whether this string ends with
other.inherited -
indexOf(
Pattern pattern, [int start = 0]) → int -
Returns the position of the first match of
patternin this string, starting atstart, inclusive:inherited -
lastIndexOf(
Pattern pattern, [int? start]) → int -
The starting position of the last match
patternin this string.inherited -
matchAsPrefix(
String string, [int start = 0]) → Match? -
Matches this pattern against the start of
string.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
padLeft(
int width, [String padding = ' ']) → String -
Pads this string on the left if it is shorter than
width.inherited -
padRight(
int width, [String padding = ' ']) → String -
Pads this string on the right if it is shorter than
width.inherited -
replaceAll(
Pattern from, String replace) → String -
Replaces all substrings that match
fromwithreplace.inherited -
replaceAllMapped(
Pattern from, String replace(Match match)) → String -
Replace all substrings that match
fromby a computed string.inherited -
replaceFirst(
Pattern from, String to, [int startIndex = 0]) → String -
Creates a new string with the first occurrence of
fromreplaced byto.inherited -
replaceFirstMapped(
Pattern from, String replace(Match match), [int startIndex = 0]) → String -
Replace the first occurrence of
fromin this string.inherited -
replaceRange(
int start, int? end, String replacement) → String -
Replaces the substring from
starttoendwithreplacement.inherited -
serialize(
) → Object -
Serializes this TED to a transportable string (same as toString).
override
-
split(
Pattern pattern) → List< String> -
Splits the string at matches of
patternand returns a list of substrings.inherited -
splitMapJoin(
Pattern pattern, {String onMatch(Match)?, String onNonMatch(String)?}) → String -
Splits the string, converts its parts, and combines them into a new
string.
inherited
-
startsWith(
Pattern pattern, [int index = 0]) → bool -
Whether this string starts with a match of
pattern.inherited -
substring(
int start, [int? end]) → String -
The substring of this string from
start, inclusive, toend, exclusive.inherited -
toLowerCase(
) → String -
Converts all characters in this string to lower case.
inherited
-
toString(
) → String -
Returns the encoded string representation of the data.
override
-
toUpperCase(
) → String -
Converts all characters in this string to upper case.
inherited
-
trim(
) → String -
The string without any leading and trailing whitespace.
inherited
-
trimLeft(
) → String -
The string without any leading whitespace.
inherited
-
trimRight(
) → String -
The string without any trailing whitespace.
inherited
Operators
-
operator *(
int times) → String -
Creates a new string by concatenating this string with itself a number
of times.
inherited
-
operator +(
String other) → String -
Creates a new string by concatenating this string with
other.inherited -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
int index) → String -
The character (as a single-code-unit String) at the given
index.inherited
Static Methods
-
getFactory(
) → TransportableDataFactory? -
parse(
Object? ted) → TransportableData? -
setFactory(
TransportableDataFactory factory) → void