MIF_E31222656/debug_helper.dart

30 lines
567 B
Dart

import 'package:flutter/foundation.dart';
class DebugHelper {
static void log(String message) {
if (kDebugMode) {
print('[TaniSMART-DEBUG] $message');
}
}
static void logData(String tag, dynamic data) {
if (kDebugMode) {
print('[TaniSMART-DATA] $tag: $data');
}
}
static void logError(
String message,
dynamic error, [
StackTrace? stackTrace,
]) {
if (kDebugMode) {
print('[TaniSMART-ERROR] $message');
print(error);
if (stackTrace != null) {
print(stackTrace);
}
}
}
}