From 99c8b4f1f9359b7b59b2c0870ec4ad270275ed10 Mon Sep 17 00:00:00 2001 From: Sandeep Sarkar <152861071+sandy4242@users.noreply.github.com> Date: Thu, 2 Oct 2025 00:48:33 +0530 Subject: [PATCH 1/2] pixel overloading fixed --- lib/ui/screens/save_page_dialog.dart | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/lib/ui/screens/save_page_dialog.dart b/lib/ui/screens/save_page_dialog.dart index 07f936a6..e6881c3c 100644 --- a/lib/ui/screens/save_page_dialog.dart +++ b/lib/ui/screens/save_page_dialog.dart @@ -91,9 +91,7 @@ class _SavePageDialogState extends State { try { if (mounted) { - await context - .read() - .savePage(pageName, label: label, color: color.toARGB32()); + await context.read().savePage(pageName, label: label, color: color.toARGB32()); } if (mounted) { @@ -134,8 +132,7 @@ class _SavePageDialogState extends State { text: '"$pageName"', style: const TextStyle(fontWeight: FontWeight.bold), ), - const TextSpan( - text: ' already exists. Do you want to overwrite it?'), + const TextSpan(text: ' already exists. Do you want to overwrite it?'), ], ), ), @@ -203,8 +200,7 @@ class _SavePageDialogState extends State { ), focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(8), - borderSide: const BorderSide( - color: ColorConstants.dialogButtonBlue, width: 2), + borderSide: const BorderSide(color: ColorConstants.dialogButtonBlue, width: 2), ), prefixIcon: const Icon(Icons.description), counterText: '', // Hide character counter @@ -239,7 +235,7 @@ class _SavePageDialogState extends State { textInputAction: TextInputAction.next, ), const SizedBox(height: 16), - Row( + Wrap( children: [ const Text('Choose a color: ', style: TextStyle(fontSize: 14)), ...[ @@ -263,9 +259,7 @@ class _SavePageDialogState extends State { color: color, shape: BoxShape.circle, border: Border.all( - color: _selectedColor == color - ? ColorConstants.dialogTextBlack - : ColorConstants.dialogGray, + color: _selectedColor == color ? ColorConstants.dialogTextBlack : ColorConstants.dialogGray, width: 2, ), ), @@ -273,16 +267,6 @@ class _SavePageDialogState extends State { )) ], ), - if (_existingPages.isNotEmpty) ...[ - const SizedBox(height: 12), - Text( - 'Existing pages: ${_existingPages.length}', - style: TextStyle( - fontSize: 12, - color: ColorConstants.gray600, - ), - ), - ], ], ), ), From d3c07e4054f33594e0174d0d51abd6e4b8f4eb46 Mon Sep 17 00:00:00 2001 From: Sandeep Sarkar <152861071+sandy4242@users.noreply.github.com> Date: Thu, 2 Oct 2025 00:54:44 +0530 Subject: [PATCH 2/2] spacing fixes --- lib/ui/screens/save_page_dialog.dart | 35 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/lib/ui/screens/save_page_dialog.dart b/lib/ui/screens/save_page_dialog.dart index e6881c3c..5ac445bf 100644 --- a/lib/ui/screens/save_page_dialog.dart +++ b/lib/ui/screens/save_page_dialog.dart @@ -246,25 +246,26 @@ class _SavePageDialogState extends State { ColorConstants.dialogPurple, ColorConstants.dialogButtonBlue, ].map((color) => GestureDetector( - onTap: () { - setState(() { - _selectedColor = color; - }); - }, - child: Container( - margin: const EdgeInsets.symmetric(horizontal: 4), - width: 24, - height: 24, - decoration: BoxDecoration( - color: color, - shape: BoxShape.circle, - border: Border.all( - color: _selectedColor == color ? ColorConstants.dialogTextBlack : ColorConstants.dialogGray, - width: 2, - ), + onTap: () { + setState(() { + _selectedColor = color; + }); + }, + child: Container( + margin: const EdgeInsets.symmetric(horizontal: 4), + width: 24, + height: 24, + decoration: BoxDecoration( + color: color, + shape: BoxShape.circle, + border: Border.all( + color: _selectedColor == color ? ColorConstants.dialogTextBlack : ColorConstants.dialogGray, + width: 2, ), ), - )) + ), + ), + ), ], ), ],