ObjectExtensions<T extends Object?> extension
- on
-
- T
Properties
- asFlat → string
-
Available on T, provided by the ObjectExtensions extension
Returns flat representation string by callingtoString()and removing diacritics, converting to lowercase, and trimming all whitespace.no setter - isNullable → bool
-
Available on T, provided by the ObjectExtensions extension
no setter
Methods
-
asBool(
{bool everythingIsTrue = true}) → bool -
Available on T, provided by the ObjectExtensions extension
Converts the current object to a boolean value. -
asNullableBool(
{bool everythingIsTrue = true}) → bool? -
Available on T, provided by the ObjectExtensions extension
Converts the current object to a nullable boolean value. -
asNullableText(
{TextStyle? style, StrutStyle? strutStyle, TextAlign? textAlign, TextDirection? textDirection, Locale? locale, bool? softWrap, TextOverflow? overflow, TextScaler? textScaler, int? maxLines, String? semanticsLabel, TextWidthBasis? textWidthBasis, bool validate = true, String? defaultText, string dateFormat = ""}) → Text? -
Available on T, provided by the ObjectExtensions extension
Converts the object to a nullable Text widget with the specified properties. -
asSqlValue(
[bool nullAsBlank = false, bool quoteStrings = true]) → String -
Available on T, provided by the ObjectExtensions extension
-
asText(
{TextStyle? style, StrutStyle? strutStyle, TextAlign? textAlign, TextDirection? textDirection, Locale? locale, bool? softWrap, TextOverflow? overflow, TextScaler? textScaler, int? maxLines, String? semanticsLabel, TextWidthBasis? textWidthBasis, String defaultText = "", bool validate = true}) → Text -
Available on T, provided by the ObjectExtensions extension
Converts the object to a Text widget with the specified properties. -
changeTo<
R> () → R -
Available on T, provided by the ObjectExtensions extension
Converts a value of typeObjectto a specified typeT. -
flatContains<
V> (V value) → bool -
Available on T, provided by the ObjectExtensions extension
Checks if the current string contains the givenvaluewhen both are flattened. If the current string is blank, it returnstrueonly if thevalueis also blank. If thevalueis blank, it returnstrue. Otherwise, it checks if the current string contains thevaluewhen both are flattened. Returnstrueif the current string contains thevalue,falseotherwise. -
flatContainsAny<
V> (Iterable< V> values) → bool -
Available on T, provided by the ObjectExtensions extension
Checks if the string contains any of the specified texts. -
flatEqual<
V> (V value) → bool -
Available on T, provided by the ObjectExtensions extension
Checks if the current string is equal to the givenvaluewhen both are flattened. Returnstrueif they are equal,falseotherwise. -
flatEqualAny<
V> (Iterable< V> values) → bool -
Available on T, provided by the ObjectExtensions extension
Checks if any of the strings in the givenvaluesiterable is equal to the current string. Returnstrueif any string is equal, otherwise returnsfalse. -
isIn(
dynamic items) → bool -
Available on T, provided by the ObjectExtensions extension
Checks if the current object is present in the given list, map or string. Returnstrueif the current object is notnulland is present in the list, otherwise returnsfalse. -
isNotIn(
dynamic items) → bool -
Available on T, provided by the ObjectExtensions extension
-
isNotValid(
[List< bool> customValidator(T?)?]) → bool -
Available on T, provided by the ObjectExtensions extension
Checks if object has a invalid value. See isValid for more details. -
isValid(
[List< bool> customValidator(T?)?]) → bool -
Available on T, provided by the ObjectExtensions extension
Checks if Object has a valid value. -
keywordContainsAny(
Iterable< T> value, {bool forceLowerCase = true, bool removeDiacritics = true, bool removeWordSplitters = true, bool splitCamelCase = true}) → bool -
Available on T, provided by the ObjectExtensions extension
-
keywordEqual(
T value, {bool forceLowerCase = true, bool removeDiacritics = true, bool removeWordSplitters = true, bool splitCamelCase = true}) → bool -
Available on T, provided by the ObjectExtensions extension
-
nullIf(
bool test(T)) → T? -
Available on T, provided by the ObjectExtensions extension
-
nullIfBool(
bool value) → T? -
Available on T, provided by the ObjectExtensions extension
-
nullIfValue(
T value) → T? -
Available on T, provided by the ObjectExtensions extension
-
valid(
List< bool> validations(T?)?, [string? throwErrorMessage]) → T? -
Available on T, provided by the ObjectExtensions extension