ApprovalUtils class final
A utility class for approval-related operations.
Provides methods for converting hex colors to ANSI pen colors, computing Cartesian products, reading and managing files, and retrieving system commands.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- commandWhere → String
-
Retrieves the system command for finding executables.
no setter
Static Methods
-
cartesianProduct<
T> (List< List< lists) → Iterable<T> >List< T> > - Computes the Cartesian product of a list of lists.
-
deleteFile(
String path) → void - Deletes a file if it exists.
-
hexToAnsiPen(
String hex) → AnsiPen -
Converts a hex color code to an
AnsiPen
for terminal styling. -
isFileExists(
String path) → bool - Checks if a file exists at the specified path.
-
lines(
int count) → String - Generates a separator line of the specified length.
-
readFile(
String path) → String - Reads the contents of a file and trims any extra whitespace.