addLog method Null safety

Future<void> addLog(
  1. String log,
  2. {String? action,
  3. String? screen = ""}
)

Implementation

Future<void> addLog(String log, {String? action, String? screen = ""}) async {
  print("LogManager: $log / $screen");

  final actionString = action ?? LogConstants.info;
  final screenString = screen ?? LogConstants.nonScreen;

  _logQueue.add(() => _logTask(screenString, actionString, log));
  if (!_isScheduled) {
    _isScheduled = true;
    Timer(Duration(seconds: 0), _execute);
  }
}