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 - isBlank → bool
-
Available on String, provided by the ExtString extension
Returnstrueif the string is blank or contains only whitespace.no setter - isNotBlank → bool
-
Available on String, provided by the ExtString extension
Returnstrueif the string is not blank.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 - noAccent → String
-
Available on String, provided by the ExtString extension
Removes accents from the string.no setter - toDouble → double
-
Available on String, provided by the ExtString extension
Converts the string to a double.no setter - toInt → int
-
Available on String, provided by the ExtString extension
Converts the string to an integer.no setter - uncap → String
-
Available on String, provided by the ExtString extension
Makes the first letter of the string lowercase.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
-
animatedText(
{TextStyle? style, TextAlign? align, TextOverflow? overflow, int? maxLines, TextDirection? textDirection, Locale? locale, bool? softWrap, StrutStyle? strutStyle, Duration duration = const Duration(milliseconds: 100), Curve switchInCurve = Curves.easeIn, Curve switchOutCurve = Curves.easeOut, bool fade = true, bool scale = true, bool slide = false}) → AnimatedSwitcher -
Available on String, provided by the ExtString extension
Returns an AnimatedSwitcher that animates text changes. -
openUrl(
) → Future< bool> - Opens the string URL in an external browser application.
-
styledText(
TextStyle style, {Key? key, TextAlign? align, int? maxLines, TextOverflow? overflow, TextDirection? textDirection, Locale? locale, bool? softWrap, StrutStyle? strutStyle}) → StyledText -
Available on String, provided by the ExtString extension
Wraps the string in a StyledText widget with the givenstyle. -
text(
{Key? key, TextStyle? style, TextAlign? align, TextOverflow? overflow, int? maxLines, TextDirection? textDirection, Locale? locale, bool? softWrap, StrutStyle? strutStyle}) → Text -
Available on String, provided by the ExtString extension
Wraps the string in a standard Text widget. -
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 usingformat. -
toPlural(
int length, [bool showLength = true]) → String -
Available on String, provided by the ExtString extension
Returns a pluralized version of the string based onlength. -
trunc(
[int max = 20]) → String -
Available on String, provided by the ExtString extension
Truncates the string to a maximum ofmaxcharacters and adds "..." if needed. -
uriQuery(
String key) → String? -
Available on String, provided by the ExtString extension
Returns the value of a query parameterkeyfrom the string URL.