MagicStringExtension extension

Extension methods for non-nullable String objects.

on

Properties

toStatusColor Color

Available on String, provided by the MagicStringExtension extension

Retrieves the status color corresponding to the String.
no setter
toTime TimeOfDay?

Available on String, provided by the MagicStringExtension extension

Converts the String to a TimeOfDay object.
no setter

Methods

forceElapse({required int length, String suffix = '...'}) String

Available on String, provided by the MagicStringExtension extension

Truncates the String to a specified length and adds a suffix.
toHttps({bool ignoreInDebugMode = false}) String

Available on String, provided by the MagicStringExtension extension

Converts a String URL from HTTP to HTTPS if it starts with 'http:'.
toMyStatusColor(Map<String, Color> colorMap) Color

Available on String, provided by the MagicStringExtension extension

Retrieves a color from a map based on the current String value.
toTimeString({String format = 'hh:mm a'}) String

Available on String, provided by the MagicStringExtension extension

Converts the String representing time to a formatted time string.