Log constructor

Log(
  1. Object? data, {
  2. String title = "LOG",
  3. String name = "info",
  4. Zone? zone,
  5. DateTime? dateTimeNow,
  6. DateTime? dateTimeStart,
  7. Object? error,
  8. StackTrace? stackTrace,
  9. bool? isPrintToTerminal = true,
})

Implementation

Log(
  this.data, {
  this.title = "LOG",
  this.name = "info",
  this.zone,
  this.dateTimeNow,
  this.dateTimeStart,
  this.error,
  this.stackTrace,
  bool? isPrintToTerminal = true,
}) {
  dateTimeStart ??= DateTime.now();
  dateTimeNow ??= DateTime.now();
  if (isPrintToTerminal is bool) {
    if (isPrintToTerminal) {
      printToTerminal();
    }
  } else {
    // dart
    if (dart.isDebug) {
      printToTerminal();
    }
  }
}