GetUtils class

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent 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

camelCase(String value) String?
Camelcase string Example: your name => yourName
capitalize(String value) String?
Capitalize each word inside string Example: your name => Your Name, your name => Your name
capitalizeFirst(String s) String?
Uppercase first letter inside string and let the others lowercase Example: your name => Your name
createPath(String path, [Iterable? segments]) String
hasCapitalletter(String s) bool
Checks if string contains at least one Capital Letter
hasMatch(String? value, String pattern) bool
isAlphabetOnly(String s) bool
Checks if string consist only Alphabet. (No Whitespace)
isAPK(String filePath) bool
Checks if string is an apk file.
isAudio(String filePath) bool
Checks if string is an audio file.
isBinary(String s) bool
Checks if string is binary.
isBlank(dynamic value) bool?
Checks if data is null or blank (empty or only contains whitespace).
isBool(String value) bool
Checks if string is boolean.
isCaseInsensitiveContains(String a, String b) bool
Checks if a contains b (Treating or interpreting upper- and lowercase letters as being the same).
isCaseInsensitiveContainsAny(String a, String b) bool
Checks if a contains b or b contains a (Treating or interpreting upper- and lowercase letters as being the same).
isChm(String filePath) bool
Checks if string is an chm file.
isCnpj(String cnpj) bool
isCpf(String cpf) bool
Checks if the cpf is valid.
isCurrency(String s) bool
Checks if string is Currency.
isDateTime(String s) bool
Checks if string is DateTime (UTC or Iso8601).
isEmail(String s) bool
Checks if string is email.
isEqual(num a, num b) bool
Checks if num a EQUAL than num b.
isExcel(String filePath) bool
Checks if string is an excel file.
isGreaterThan(num a, num b) bool
Checks if num a GREATER than num b.
isHexadecimal(String s) bool
Checks if string is hexadecimal. Example: HexColor => #12F
isHTML(String filePath) bool
Checks if string is an html file.
isImage(String filePath) bool
Checks if string is an image file.
isIPv4(String s) bool
Checks if string is IPv4.
isIPv6(String s) bool
Checks if string is IPv6.
isLengthBetween(dynamic value, int minLength, int maxLength) bool
Checks if length of data is BETWEEN minLength to maxLength.
isLengthEqualTo(dynamic value, int otherLength) bool
Checks if length of data is EQUAL to maxLength.
isLengthGreaterOrEqual(dynamic value, int maxLength) bool
Checks if length of data is GREATER OR EQUAL to maxLength.
isLengthGreaterThan(dynamic value, int maxLength) bool
Checks if length of data is GREATER than maxLength.
isLengthLessOrEqual(dynamic value, int maxLength) bool
Checks if length of data is LESS OR EQUAL to maxLength.
isLengthLessThan(dynamic value, int maxLength) bool
Checks if length of data is LESS than maxLength.
isLengthLowerOrEqual(dynamic value, int maxLength) bool
Checks if length of data is LOWER OR EQUAL to maxLength.
isLengthLowerThan(dynamic value, int maxLength) bool
Checks if length of data is LOWER than maxLength.
isLowerThan(num a, num b) bool
Checks if num a LOWER than num b.
isMD5(String s) bool
Checks if string is MD5 hash.
isNull(dynamic value) bool
Checks if data is null.
isNullOrBlank(dynamic value) bool?
Checks if data is null or blank (empty or only contains whitespace).
isNum(String value) bool
Checks if string is int or double.
isNumericOnly(String s) bool
Checks if string consist only numeric. Numeric only doesn't accepting "." which double data type have
isOneAKind(dynamic value) bool
Checks if all data have same value. Example: 111111 -> true, wwwww -> true, 1,1,1,1 -> true
isPalindrom(String string) bool
Checks if string is Palindrom.
isPassport(String s) bool
Checks if string is Passport No.
isPDF(String filePath) bool
Checks if string is an pdf file.
isPhoneNumber(String s) bool
Checks if string is phone number.
isPPT(String filePath) bool
Checks if string is an powerpoint file.
isSHA1(String s) bool
Checks if string is SHA1 hash.
isSHA256(String s) bool
Checks if string is SHA256 hash.
isSSN(String s) bool
Checks if string is SSN (Social Security Number).
isTxt(String filePath) bool
Checks if string is an txt file.
isURL(String s) bool
Checks if string is URL.
isUsername(String s) bool
Checks if string is a valid username.
isVector(String filePath) bool
Checks if string is a vector file.
isVideo(String filePath) bool
Checks if string is an video file.
isWord(String filePath) bool
Checks if string is an word file.
nil(dynamic s) → dynamic
In dart2js (in flutter v1.17) a var by default is undefined. Use this only if you are in version <- 1.17. So we assure the null type in json convertions to avoid the "value":value==null?null:value; someVar.nil will force the null type if the var is null or undefined. nil taken from ObjC just to have a shorter sintax.
numericOnly(String s, {bool firstWordOnly = false}) String
Extract numeric value of string Example: OTP 12312 27/04/2020 => 1231227042020ß If firstword only is true, then the example return is "12312" (first found numeric word)
paramCase(String? text) String?
param-case
printFunction(String prefix, dynamic value, String info, {bool isError = false}) → void
removeAllWhitespace(String value) String
Remove all whitespace inside string Example: your name => yourname
snakeCase(String? text, {String separator = '_'}) String?
snake_case