feat: Add border color support to NoteCard and DraggableNote for enhanced visual distinction
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user