onNewLog method

void onNewLog(
  1. EditorLogEntity newLog
)

Implementation

void onNewLog(EditorLogEntity newLog) {
  if (printInConsole) {
    Logger.printDefault(newLog.content);
  }
  final logs = [...state.logs];
  emit(state.copyWith(logs: [...logs, newLog]));
}