StringExtension extension

on

Methods

iconImage({double? height, double? width, BoxFit? fit, Color? color}) Image
This extension function is used to create an Image widget from a URL (if the string starts with "http") or from an asset path. If the string is a URL (starts with "http"), it creates an Image.network widget with the specified attributes. If there is an error loading the image, it shows a placeholder with a random color. If the string is not a URL, it assumes it's an asset path and creates an Image.asset widget with the specified attributes. If there is an error loading the image, it shows a placeholder with a random color.
svgIconImage({double? height, double? width, BoxFit? fit, Color? color}) → SvgPicture
This extension function is used to create an SvgPicture widget from a URL (if the string starts with "http") or from an asset path. If the string is a URL (starts with "http"), it creates an SvgPicture.network widget with the specified attributes. If there is an error loading the image, it shows a placeholder with a random color. If the string is not a URL, it assumes it's an asset path and creates an SvgPicture.asset widget with the specified attributes. If there is an error loading the image, it shows a placeholder with a random color.
wrapWithBracket(BracketType type) String