This commit is contained in:
Fabian Freund
2025-02-03 15:09:04 +01:00
parent 36acd46318
commit 025ecaf2e3
132 changed files with 4431 additions and 1644 deletions
@@ -1,3 +1,5 @@
import 'package:lensai/extensions/nullable.dart';
class ChatEntity {
static final _namePattern = RegExp(r"^(.*?) - (.*?)\.md$");
@@ -14,7 +16,7 @@ class ChatEntity {
return ChatEntity._(
fileName,
name: match?.group(1),
dateTime: (match != null) ? DateTime.tryParse(match.group(2)!) : null,
dateTime: match.mapNotNull((match) => DateTime.tryParse(match.group(2)!)),
);
}