diff --git a/lib/ui/screens/save_page_dialog.dart b/lib/ui/screens/save_page_dialog.dart index 07f936a6..5ac445bf 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)), ...[ @@ -250,39 +246,28 @@ 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, ), ), - )) + ), + ), + ), ], ), - if (_existingPages.isNotEmpty) ...[ - const SizedBox(height: 12), - Text( - 'Existing pages: ${_existingPages.length}', - style: TextStyle( - fontSize: 12, - color: ColorConstants.gray600, - ), - ), - ], ], ), ),