HtmlCharacterEntities class Null safety

A utility class containing a map, characters, of key/value pairs for every HTML 4.01 character entity, including ASCII codes, and a method, parse, to parse strings for those character entities.

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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

Static Methods

decode(String string) String
Parses a string and replaces all valid HTML character entities with their respective characters.
encode(String string, {String? characters = '&<>"\'', bool defaultToAsciiCode = false, bool defaultToHexCode = false, bool checkAmpsForEntities = true}) String
Parses a string and replaces every character included in the characters string with their corresponding character entity. [...]

Constants

asciiCodes → const Map<String, String>
A map of all symbols with an ASCII code character entity. [...]
<String, String>{'!' : '&#33;', '"' : '&#34;', '#' : '&#35;', '\$' : '&#36;', '%' : '&#37;…
characters → const Map<String, String>
A map of all HTML 4.01 character entities and their corresponding characters.
<String, String>{'&#32;' : ' ', '&#x20;' : ' ', '&#33;' : '!', '&#x21;' : '!', '&#34;' : '"&#…
entities → const Map<String, String>
A map of all symbols with their corresponding non-ASCII code charcter entities. [...]
<String, String>{'"' : '&quot;', '&' : '&amp;', '\'' : '&apos;', '<' : '&lt;', '>' : &#…
hexCodes → const Map<String, String>
A map of all symbols with a hex code character entities.
<String, String>{'!' : '&#x21;', '"' : '&#x22;', '#' : '&#x23;', '\$' : '&#x24;', '%' : '&#x2…