StringExtension extension

Extension methods for String to provide utility functions.

on

Methods

asAssetGif() String

Available on String, provided by the StringExtension extension

Append the gif location to the string
asAssetImg() String

Available on String, provided by the StringExtension extension

Append the image location to the string
asAssetSvg() String

Available on String, provided by the StringExtension extension

Append the svg location to the string
capitalizeAllWord() String

Available on String, provided by the StringExtension extension

capitalize first letter of every word
isImageExtenstion({List<String> imgExt = const <String>['png', 'jpg', 'jpeg', 'gif']}) bool

Available on String, provided by the StringExtension extension

Checks if the string has an image file extension.
replaceCharAt(int index, String newChar) String

Available on String, provided by the StringExtension extension

Replaces the character at the specified index in the string with newChar.
toDouble() double?

Available on String, provided by the StringExtension extension

Converts the string to a double, or returns null if conversion fails.