addLog method

void addLog({
  1. required String heading,
  2. required String content,
})

Add a generic log entry.

Implementation

void addLog({
  required String heading,
  required String content,
}) {
  final log = DevLogModel(
    id: _uuid.v4(),
    timestamp: DateTime.now(),
    type: 'log',
    heading: heading,
    content: content,
  );
  state = [...state, log];
  _persistLog(log);
}