refactor: adjust drawer behavior and improve code readability in chat page

- Changed drawerDragStartBehavior from `DragStartBehavior.start` to `DragStartBehavior.down` for better user experience.
- Reduced drawerEdgeDragWidth from 75% to 50% of the screen width to enhance accessibility.
- Improved code formatting for better readability in the model selector sheet.
This commit is contained in:
cogwheel0
2025-10-08 22:37:51 +05:30
parent 7e478a5d55
commit c99682d6a3

View File

@@ -1179,8 +1179,8 @@ class _ChatPageState extends ConsumerState<ChatPage> {
backgroundColor: context.conduitTheme.surfaceBackground,
// Left navigation drawer with draggable edge open (native, finger-following)
drawerEnableOpenDragGesture: true,
drawerDragStartBehavior: DragStartBehavior.start,
drawerEdgeDragWidth: MediaQuery.of(context).size.width * 0.75,
drawerDragStartBehavior: DragStartBehavior.down,
drawerEdgeDragWidth: MediaQuery.of(context).size.width * 0.5,
drawerScrimColor: context.colorTokens.overlayStrong,
drawer: Drawer(
width: (MediaQuery.of(context).size.width * 0.80).clamp(
@@ -2038,7 +2038,8 @@ class _ModelSelectorSheetState extends ConsumerState<_ModelSelectorSheet> {
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
if (model.isMultimodal || _modelSupportsReasoning(model)) ...[
if (model.isMultimodal ||
_modelSupportsReasoning(model)) ...[
const SizedBox(height: Spacing.xs),
Row(
children: [