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
capitalizeAllWordsFirstLetter(String s) String
Capitalize only the first letter of each word in a string Example: getx will make it easy => Getx Will Make It Easy Example 2 : this is an example text => This Is An Example Text
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
Creates a path by concatenating the provided path and segments.
hasCapitalLetter(String s) bool
Checks if string contains at least one Capital Letter
hasMatch(String? value, String pattern) bool
Checks if a given value matches a pattern using a regular expression.
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).
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.
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
isPalindrome(String string) bool
Checks if string is Palindrome.
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 conversions 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 syntax.
numericOnly(String s, {bool firstWordOnly = false}) String
Extract numeric value of string Example: OTP 12312 27/04/2020 => 1231227042020ß If firstWordOnly 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
Utility function for printing logs with a specified prefix and additional information.
removeAllWhitespace(String value) String
Remove all whitespace inside string Example: your name => yourname
snakeCase(String? text, {String separator = '_'}) String?
snake_case