Files
journaler/lib/notes.dart

33 lines
729 B
Dart

import 'package:intl/intl.dart';
class Note {
final String id;
final int epochTime;
late final String displayDate;
String content;
String? snippet;
bool isProblematic;
String problemReason;
Note({
required this.id,
required this.epochTime,
required this.content,
this.snippet,
this.isProblematic = false,
this.problemReason = '',
}) {
final dtUtc = DateTime.fromMillisecondsSinceEpoch(epochTime, isUtc: true);
final dtLocal = dtUtc.toLocal();
displayDate = DateFormat('yyyy-MM-dd HH:mm:ss').format(dtLocal);
}
}
class Scratch {
final int epochTime;
final String id;
String content;
Scratch({required this.id, required this.epochTime, required this.content});
}