utils library

Classes

TerminalColor

Functions

chunks(String str, int maxLen, {bool stripColors = false, String wrapLine(String) = noop}) List<String>
Split string into chunks of maxLen characters.
colorize(String text, [Iterable<TerminalColor> colors = const []]) String
firstNonNull<T>(Iterable<T?> list) → T?
Tries a list of nullable Ts until one is not null. Returns null if no actual value is found.
noop<T>(T arg) → T
printColor(String text, [Iterable<TerminalColor> colors = const []]) → void
quoteWrap(String arg) String
wrap args with quotes if necessary
splitArgs(String string) List<String>
Attempt to split arguments while taking into account quotes
stripColor(String str) String

Exceptions / Errors

ScriptError
An error that occurs that is related to a script.
ScriptNotFoundError
An error that occurs when a script is not found.
ScriptStateError
An error that occurs during script execution.