Logger class

A simple logger class that provides logging capabilities depending on the debug mode.

The Logger class is used to print log messages to the console. It supports different types of log messages, each displayed in a different color to distinguish between informational messages, initialization messages, and error messages.

Constructors

Logger({required bool debugMode})
Constructs a logger where logging can be enabled or disabled.

Properties

debugMode bool
Indicates whether logging is enabled.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

log(String message, {LogType type = LogType.info}) → void
Logs a message to the console if debug mode is enabled.
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