96f8f95924
- Created runner.exe.manifest to enable DPI awareness and dark mode support. - Implemented utility functions in utils.cpp and utils.h for console creation and command line argument handling. - Developed Win32Window class in win32_window.cpp and win32_window.h to manage high DPI-aware windows, including theme updates and message handling.
51 lines
1.1 KiB
Dart
51 lines
1.1 KiB
Dart
// Model: Note
|
|
// - Representa una nota guardada en la app.
|
|
// - `id` viene de SQLite y sirve como identificador estable.
|
|
// - `index` representa el orden visual dentro de la lista.
|
|
class Note {
|
|
const Note({
|
|
this.id,
|
|
required this.title,
|
|
required this.body,
|
|
required this.createdAt,
|
|
required this.updatedAt,
|
|
required this.index,
|
|
});
|
|
|
|
final int? id;
|
|
final String title;
|
|
final String body;
|
|
final DateTime createdAt;
|
|
final DateTime updatedAt;
|
|
final int index;
|
|
|
|
Note copyWith({
|
|
int? id,
|
|
String? title,
|
|
String? body,
|
|
DateTime? createdAt,
|
|
DateTime? updatedAt,
|
|
int? index,
|
|
}) {
|
|
return Note(
|
|
id: id ?? this.id,
|
|
title: title ?? this.title,
|
|
body: body ?? this.body,
|
|
createdAt: createdAt ?? this.createdAt,
|
|
updatedAt: updatedAt ?? this.updatedAt,
|
|
index: index ?? this.index,
|
|
);
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
if (identical(this, other)) {
|
|
return true;
|
|
}
|
|
|
|
return other is Note && id != null && other.id == id;
|
|
}
|
|
|
|
@override
|
|
int get hashCode => id?.hashCode ?? Object.hash(title, body, createdAt, updatedAt, index);
|
|
} |