ExtString extension

on

Properties

asId → String

Available on String, provided by the ExtString extension

Converts the string to a normalized ID (lowercase, underscores, no spaces or special chars)
no setter
asSlug → String

Available on String, provided by the ExtString extension

Converts the string to a URL-friendly slug.
no setter
cap → String

Available on String, provided by the ExtString extension

Capitalizes the first letter of the string.
no setter
color → Color

Available on String, provided by the ExtString extension

Converts a hex string to a Color.
no setter
dateFormat → String

Available on String, provided by the ExtString extension

Attempts to detect the date format of the string.
no setter
initials → String

Available on String, provided by the ExtString extension

Extracts initials from words in this string (e.g. "John Doe" -> "JD").
no setter
isBlank → bool

Available on String, provided by the ExtString extension

Returns true if the string is blank or contains only whitespace.
no setter
isEmail → bool

Available on String, provided by the ExtString extension

Checks if the string matches a valid email pattern.
no setter
isNotBlank → bool

Available on String, provided by the ExtString extension

Returns true if the string is not blank.
no setter
isPhone → bool

Available on String, provided by the ExtString extension

Checks if the string matches a valid phone number pattern.
no setter
isUrl → bool

Available on String, provided by the ExtString extension

Checks if the string matches a URL pattern.
no setter
listString → List<String>

Available on String, provided by the ExtString extension

Converts the string into a list of strings, assuming it is a stringified list.
no setter
lower → String

Available on String, provided by the ExtString extension

Returns a lowercase version of this string.
no setter
noAccent → String

Available on String, provided by the ExtString extension

Removes accents from the string.
no setter
toCamelCase → String

Available on String, provided by the ExtString extension

Converts string to camelCase (e.g. "hello_world" -> "helloWorld").
no setter
toDouble → double

Available on String, provided by the ExtString extension

Converts the string to a double.
no setter
toDoubleOrNull → double?

Available on String, provided by the ExtString extension

Parses this string as a double, or returns null if invalid.
no setter
toInt → int

Available on String, provided by the ExtString extension

Converts the string to an integer.
no setter
toIntOrNull → int?

Available on String, provided by the ExtString extension

Parses this string as an integer, or returns null if invalid.
no setter
toSnakeCase → String

Available on String, provided by the ExtString extension

Converts string to snake_case (e.g. "helloWorld" -> "hello_world").
no setter
toTitleCase → String

Available on String, provided by the ExtString extension

Converts string to Title Case (e.g. "hello world" -> "Hello World").
no setter
uncap → String

Available on String, provided by the ExtString extension

Makes the first letter of the string lowercase.
no setter
upper → String

Available on String, provided by the ExtString extension

Returns an uppercase version of this string.
no setter
uri → Uri

Available on String, provided by the ExtString extension

Converts the string to a Uri, adding "https://" if missing.
no setter

Methods

copyToClipboard() → Future<void>

Available on String, provided by the ExtString extension

Copies this string to the system clipboard.
mask({int start = 0, int? end, String maskChar = '*'}) → String

Available on String, provided by the ExtString extension

Masks characters from start to end with maskChar.
openUrl() → Future<bool>

Available on String, provided by the ExtString extension

Opens the string URL in an external browser application.
random() → String

Available on String, provided by the ExtString extension

Returns a random character from this string.
toDate() → DateTime?

Available on String, provided by the ExtString extension

Converts the string to a DateTime object, using auto-detected or standard formats.
toDateFormat([String format = "dd MMM yyyy"]) → String?

Available on String, provided by the ExtString extension

Returns the string formatted as a date using format.
toPlural(int length, [bool showLength = true]) → String

Available on String, provided by the ExtString extension

Returns a pluralized version of the string based on length.
trunc([int max = 20]) → String

Available on String, provided by the ExtString extension

Truncates the string to a maximum of max characters and adds "..." if needed.
uriQuery(String key) → String?

Available on String, provided by the ExtString extension

Returns the value of a query parameter key from the string URL.