getLogTime method

String getLogTime(
  1. String log
)

Implementation

String getLogTime(String log) {
  final match =
      RegExp(r'\[(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})\]').firstMatch(log);
  return match?.group(1) ?? '';
}