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 typeObject
to a specified typeT
. -
flatContains<
V> (V value) → bool -
Available on T, provided by the ObjectExtensions extension
Checks if the current string contains the givenvalue
when both are flattened. If the current string is blank, it returnstrue
only if thevalue
is also blank. If thevalue
is blank, it returnstrue
. Otherwise, it checks if the current string contains thevalue
when both are flattened. Returnstrue
if the current string contains thevalue
,false
otherwise. -
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 givenvalue
when both are flattened. Returnstrue
if they are equal,false
otherwise. -
flatEqualAny<
V> (Iterable< V> values) → bool -
Available on T, provided by the ObjectExtensions extension
Checks if any of the strings in the givenvalues
iterable is equal to the current string. Returnstrue
if 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. Returnstrue
if the current object is notnull
and 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