Spaces:
Configuration error
Configuration error
File size: 877 Bytes
78013c4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | import 'package:flutter/foundation.dart';
class AppLogger {
AppLogger._();
static void debug(String message, {Map<String, dynamic>? context}) {
if (kDebugMode) {
// ignore: avoid_print
print('⚫ $message${context != null ? ' $context' : ''}');
}
}
static void info(String message, {Map<String, dynamic>? context}) {
if (kDebugMode) {
// ignore: avoid_print
print('🔵 $message${context != null ? ' $context' : ''}');
}
}
static void warn(String message, {Map<String, dynamic>? context}) {
if (kDebugMode) {
// ignore: avoid_print
print('🟡 $message${context != null ? ' $context' : ''}');
}
}
static void error(String message, {Map<String, dynamic>? context}) {
if (kDebugMode) {
// ignore: avoid_print
print('🔴 $message${context != null ? ' $context' : ''}');
}
}
}
|