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