AppLogs class

A utility class for logging messages with different severity levels.

Constructors

AppLogs.new()
factory

Properties

enabled bool
getter/setter pair
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

instance AppLogs
no setter
printHandle bool
A flag indicating whether logging is enabled or not. If true, no log messages will be printed.
getter/setter pair
screens List<String>
A list of screen names for which logs should be printed. If this list is not empty, only logs for the specified screens will be printed.
getter/setter pair

Static Methods

colorTo(LogColors? color, [LogColors defaultColor = LogColors.magenta]) String
Converts a given color to its value representation. If color is null, it returns the value of defaultColor.
logError(String? text, {String? name, String? error, StackTrace? stackTrace, LogColors? msgColor, LogColors? textColor, LogColors? fileNameColor, LogColors? errorColor, LogColors? stackTraceColor}) → void
Logs an error message with the specified error, text, name, and stackTrace.
logMessage(String? text, {String? name, LogColors? msgColor, LogColors? textColor, LogColors? fileNameColor}) → void
Logs a message with the specified text and optional name.
logSuccess(String? text, {String? name, LogColors? msgColor, LogColors? textColor, LogColors? fileNameColor}) → void
Logs a success message with the specified text and name.
logWarning(String? text, {String? name, String? error, StackTrace? stackTrace, LogColors? msgColor, LogColors? textColor, LogColors? fileNameColor, LogColors? warningColor, LogColors? stackTraceColor}) → void
Logs a warning message with the specified text, name, error, and stackTrace.
settings(bool enabled) → dynamic