feat: Add border color support to NoteCard and DraggableNote for enhanced visual distinction

This commit is contained in:
2026-05-21 17:34:50 +02:00
parent 2f942c4e82
commit a9d818dec4
2 changed files with 22 additions and 3 deletions
+12 -2
View File
@@ -8,11 +8,18 @@ import 'package:notas/models/note.dart';
// like MasonryGridView or Draggable feedback). Visual styling only.
class NoteCard extends StatefulWidget {
const NoteCard({super.key, required this.note, this.onTap, this.isDragging = false});
const NoteCard({
super.key,
required this.note,
this.onTap,
this.isDragging = false,
this.borderColor,
});
final Note note;
final VoidCallback? onTap;
final bool isDragging;
final Color? borderColor;
@override
State<NoteCard> createState() => _NoteCardState();
@@ -55,7 +62,10 @@ class _NoteCardState extends State<NoteCard> {
decoration: BoxDecoration(
color: const Color.fromRGBO(24, 25, 26, 1),
borderRadius: BorderRadius.circular(12),
border: Border.all(color: Colors.white24, width: 1),
border: Border.all(
color: widget.borderColor ?? Colors.white24,
width: 1,
),
),
child: LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {