feat: Implement note positioning logic and tests for position conversion
This commit is contained in:
@@ -336,7 +336,9 @@ class _NoteEditorScreenState extends State<NoteEditorScreen> {
|
||||
|
||||
Widget _buildCategorySelectorBox({Category? category}) {
|
||||
final String label = category?.name ?? 'Sin categoría';
|
||||
final IconData icon = CategoryStyle.iconForCodePoint(category?.iconCodePoint);
|
||||
final IconData icon = CategoryStyle.iconForCodePoint(
|
||||
category?.iconCodePoint,
|
||||
);
|
||||
final Color backgroundColor = _categoryBackgroundColor(category);
|
||||
final Color foregroundColor = _categoryForegroundColor(category);
|
||||
|
||||
@@ -475,7 +477,9 @@ class _NoteEditorScreenState extends State<NoteEditorScreen> {
|
||||
}) {
|
||||
final Color backgroundColor = _categoryBackgroundColor(category);
|
||||
final Color foregroundColor = _categoryForegroundColor(category);
|
||||
final IconData icon = CategoryStyle.iconForCodePoint(category?.iconCodePoint);
|
||||
final IconData icon = CategoryStyle.iconForCodePoint(
|
||||
category?.iconCodePoint,
|
||||
);
|
||||
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
@@ -510,8 +514,7 @@ class _NoteEditorScreenState extends State<NoteEditorScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
if (isSelected)
|
||||
Icon(Icons.check, color: foregroundColor, size: 18),
|
||||
if (isSelected) Icon(Icons.check, color: foregroundColor, size: 18),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -565,6 +568,13 @@ class _NoteEditorScreenState extends State<NoteEditorScreen> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
'Posicion: ${_currentNote.position}',
|
||||
style: const TextStyle(
|
||||
color: Colors.white54,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Creado: ${_formatDate(_currentNote.createdAt)}',
|
||||
style: const TextStyle(
|
||||
|
||||
Reference in New Issue
Block a user