refactor: Improve code formatting and replace print with debugPrint for error logging

This commit is contained in:
2026-07-02 23:47:52 +02:00
parent 9b6d92c372
commit b201da0552
8 changed files with 75 additions and 67 deletions
+14 -16
View File
@@ -316,7 +316,7 @@ class _HomeScreenState extends State<HomeScreen> {
),
boxShadow: [
BoxShadow(
color: color.withOpacity(0.18),
color: color.withValues(alpha: 0.0),
blurRadius: 10,
offset: const Offset(0, 4),
),
@@ -362,7 +362,7 @@ class _HomeScreenState extends State<HomeScreen> {
height: 50,
decoration: BoxDecoration(
color: selectedIconCodePoint == icon.codePoint
? previewColor.withOpacity(0.14)
? previewColor.withValues(alpha: 0.14)
: palette.fill,
borderRadius: BorderRadius.circular(14),
border: Border.all(
@@ -613,10 +613,10 @@ class _HomeScreenState extends State<HomeScreen> {
duration: const Duration(milliseconds: 160),
padding: const EdgeInsets.all(2),
decoration: BoxDecoration(
color: selected ? color.withOpacity(0.05) : Colors.transparent,
color: selected ? color.withValues(alpha: 0.05) : Colors.transparent,
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: selected ? color.withOpacity(0.42) : Colors.transparent,
color: selected ? color.withValues(alpha: 0.42) : Colors.transparent,
width: selected ? 1 : 1,
),
),
@@ -945,7 +945,7 @@ class _HomeScreenState extends State<HomeScreen> {
style: IconButton.styleFrom(
backgroundColor: _selectedCategoryId == null
? Colors.transparent
: palette.accent.withOpacity(0.08),
: palette.accent.withValues(alpha: 0.08),
shape: const CircleBorder(),
),
icon: Stack(
@@ -1067,7 +1067,7 @@ class _HomeScreenState extends State<HomeScreen> {
padding: const EdgeInsets.fromLTRB(10, 10, 10, 14),
buildDefaultDragHandles: false,
itemCount: visibleNotes.length,
onReorder: _handleReorder,
onReorderItem: _handleReorder,
footer: Padding(
padding: const EdgeInsets.only(top: 4, bottom: 72),
child: Center(
@@ -1104,16 +1104,14 @@ class _HomeScreenState extends State<HomeScreen> {
Widget _buildEmptyDetailPane(BuildContext context) {
final AppPalette palette = _paletteOf(context);
return Container(
child: Center(
child: Text(
'Selecciona una nota o\ncrea una nueva para empezar.',
textAlign: TextAlign.center,
style: TextStyle(
color: palette.textSecondary,
fontSize: 18,
fontWeight: FontWeight.w500,
),
return Center(
child: Text(
'Selecciona una nota o\ncrea una nueva para empezar.',
textAlign: TextAlign.center,
style: TextStyle(
color: palette.textSecondary,
fontSize: 18,
fontWeight: FontWeight.w500,
),
),
);