ApiLogger class

API Logger for beautiful console output Provides detailed logging for requests and responses

Constructors

ApiLogger({bool enabled = true, bool? useColors})

Properties

enabled bool
Check if logging is enabled
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
useColors bool
Enable/disable ANSI colors
getter/setter pair

Methods

log(String message, {bool isError = false}) → void
Log custom message
logDownloadProgress({required String url, required int received, required int total}) → void
Log download progress
logError(DioException error, {DateTime? startTime, DateTime? endTime}) → void
Log error details
logRequest(RequestOptions options, {DateTime? startTime}) → void
Log request details
logResponse(Response response, {DateTime? startTime, DateTime? endTime}) → void
Log response details
logSimple(String message) → void
Simple log without formatting (for plain text)
logWithPrefix(String prefix, String message, {bool isError = false}) → void
Log with custom prefix
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