helpers/helpers library

Classes

ColorHelper
ImageHelper
Json
Xml
XML Helpers

Extensions

Ex on double
String Helpers
URI on Uri

Properties

hasAlpha ↔ RegExp
getter/setter pair

Functions

addChild(Model model, List arguments) → Future<void>
byteListToHexString(List<int> bytes) → String
byteToInt8(int b) → int
Convert a byte length int value to an int value, for example a byte of 00000010 -> 2
deleteInHashmap(HashMap map, int index) → void
elementAt(Object list, int index) → dynamic
List Item
excludeFromTemplate(XmlElement node, Scope? scope) → bool
fromBase64(dynamic s) → String?
fromBase64() but safe to use on null
fromEnum(Object? e) → String?
Returns a String name given an Enum Type
fromMap(Map? map, dynamic key, {dynamic defaultValue}) → dynamic
Returns a key value pair from a map if it exists, otherwise optionally return a default value else null
fromMapAsBool(Map? map, dynamic key, {bool? defaultValue}) → bool?
Returns the value from fromMap as a bool if it is a bool
fromMapAsDouble(Map map, dynamic key, {double? defaultValue}) → double?
Returns a value from fromMap as a double if it is numeric
fromMapAsInt(Map? map, dynamic key, {int? defaultValue}) → int?
Returns the value from fromMap as an int if it is numeric
fromXmlNode(Model parent, XmlElement node, Scope? scope, dynamic data) → Model?
insertInHashmap(HashMap map, int index) → void
isBool(dynamic b, {List<String> allow = const ['true', 'false', '1', '0', 'yes', 'no']}) → bool
Dynamic check for a boolean from a String/bool
isNull(dynamic value) → bool
Takes in a String/List and returns true if it is null, blank or empty
isNullOrEmpty(dynamic s) → bool
isNumeric(dynamic s) → bool
Check if a String is numeric value
isPercent(dynamic s) → bool
Check if a String is a percentage value
moveInHashmap(HashMap map, int fromIndex, int toIndex) → void
newId({String prefix = "auto"}) → String
parseEmojis(String val) → String
Parses Strings containing emoiji(s) in a text syntax like :taco: to 🌮
prototypeOf(XmlElement? node) → XmlElement?
removeChild(Model model, List arguments) → Future<void>
removeChildren(Model model, List arguments) → Future<void>
removeWidget(Model model, List arguments) → Future<void>
replaceChild(Model model, List arguments) → Future<void>
replaceChildren(Model model, List arguments) → Future<void>
replaceWidget(Model model, List arguments) → Future<void>
toBool(dynamic s, {List<String> allowTrue = const ['true', '1', 'yes'], List<String> allowFalse = const ['false', '0', 'no']}) → bool?
toChar(DateTime? datetime, {String? format}) → String?
Helper function for an eval._toDate()
toColor(dynamic s) → Color?
Returns an int from a String if it is a numeric value
toDataUri(dynamic uri) → UriData?
toDate(dynamic value, {String? format}) → DateTime?
Converts a String to a formattable DateTime object
toDateString(dynamic value, {String? format, String? formatIn}) → String?
toDouble(dynamic s) → double?
If a value (typically a String) is numeric return as a double
toEnum<T>(String? key, List<T> values) → T?
Returns an Enum given a Key [Value] pair
toInt(dynamic s) → int?
Returns an int from a String if it is a numeric value
toNum(dynamic s, {dynamic allowMalformed = true}) → num?
Takes a value typically a String and if its numeric parsed will output a num
toStr(dynamic s) → String?
toString() but safe to use on null
toTime(dynamic value, {String? format}) → TimeOfDay?
toTitleCase(String text) → String
Returns a given String with all the first chars of each word capitalised and other chars lowercase
twoByteToInt16(int v1, int v2) → int
Convert two byte length int values to an int value, for example a byte of [00000001, 00000010] -> 258