From 713dc85b276a06dbfd21657c8e9fbbf6b27c514f Mon Sep 17 00:00:00 2001 From: Nikhil Date: Mon, 7 Apr 2025 06:30:11 +0530 Subject: [PATCH 1/3] done --- lib/widgets/codegen_previewer.dart | 45 ++++++++++++++++-------------- lib/widgets/splitview_drawer.dart | 2 +- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/lib/widgets/codegen_previewer.dart b/lib/widgets/codegen_previewer.dart index ef8176f9a..9885301ab 100644 --- a/lib/widgets/codegen_previewer.dart +++ b/lib/widgets/codegen_previewer.dart @@ -54,25 +54,28 @@ class _CodeGenPreviewerState extends State { } return Padding( padding: widget.padding, - child: Scrollbar( - thickness: 10, - thumbVisibility: true, - controller: controllerV, - child: Scrollbar( - notificationPredicate: (notification) => notification.depth == 1, - thickness: 10, - thumbVisibility: true, - controller: controllerH, - child: SingleChildScrollView( + child: LayoutBuilder( + builder: (context, constraints) { + return Scrollbar( + thickness: 10, + thumbVisibility: true, controller: controllerV, - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, + child: Scrollbar( + notificationPredicate: (notification) => notification.depth == 1, + thickness: 10, + thumbVisibility: true, controller: controllerH, - child: Column( - children: [ - Row( - children: [ - SelectionArea( + child: SingleChildScrollView( + controller: controllerV, + child: IntrinsicHeight( + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: constraints.maxHeight, + ), + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + controller: controllerH, + child: SelectionArea( child: Text.rich( TextSpan( children: spans, @@ -81,13 +84,13 @@ class _CodeGenPreviewerState extends State { softWrap: false, ), ), - ], + ), ), - ], + ), ), ), - ), - ), + ); + }, ), ); } diff --git a/lib/widgets/splitview_drawer.dart b/lib/widgets/splitview_drawer.dart index d3744e4b0..6f47177d5 100644 --- a/lib/widgets/splitview_drawer.dart +++ b/lib/widgets/splitview_drawer.dart @@ -39,7 +39,7 @@ class DrawerSplitView extends StatelessWidget { backgroundColor: Theme.of(context).colorScheme.surface, onDrawerChanged: onDrawerChanged, onEndDrawerChanged: onEndDrawerChanged, - drawerEdgeDragWidth: context.width, + drawerEdgeDragWidth: 0, appBar: AppBar( backgroundColor: Theme.of(context).colorScheme.surface, scrolledUnderElevation: 0, From 7404834b5ad59382917a400b1c719c2c36554c4f Mon Sep 17 00:00:00 2001 From: Nikhil Date: Mon, 7 Apr 2025 18:04:13 +0530 Subject: [PATCH 2/3] removed unnecessary Intrinsicheight --- lib/widgets/previewer_codegen.dart | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/lib/widgets/previewer_codegen.dart b/lib/widgets/previewer_codegen.dart index a13df8cc3..77f9b33b7 100644 --- a/lib/widgets/previewer_codegen.dart +++ b/lib/widgets/previewer_codegen.dart @@ -67,22 +67,20 @@ class _CodeGenPreviewerState extends State { controller: controllerH, child: SingleChildScrollView( controller: controllerV, - child: IntrinsicHeight( - child: ConstrainedBox( - constraints: BoxConstraints( - minHeight: constraints.maxHeight, - ), - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - controller: controllerH, - child: SelectionArea( - child: Text.rich( - TextSpan( - children: spans, - style: textStyle, - ), - softWrap: false, + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: constraints.maxHeight, + ), + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + controller: controllerH, + child: SelectionArea( + child: Text.rich( + TextSpan( + children: spans, + style: textStyle, ), + softWrap: false, ), ), ), From 218d9f2c66392860394f4dfa59849739eb0385f2 Mon Sep 17 00:00:00 2001 From: Ankit Mahato Date: Sat, 12 Apr 2025 22:50:23 +0530 Subject: [PATCH 3/3] Update splitview_drawer.dart --- lib/widgets/splitview_drawer.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widgets/splitview_drawer.dart b/lib/widgets/splitview_drawer.dart index 6f47177d5..b22dd7ff7 100644 --- a/lib/widgets/splitview_drawer.dart +++ b/lib/widgets/splitview_drawer.dart @@ -39,7 +39,7 @@ class DrawerSplitView extends StatelessWidget { backgroundColor: Theme.of(context).colorScheme.surface, onDrawerChanged: onDrawerChanged, onEndDrawerChanged: onEndDrawerChanged, - drawerEdgeDragWidth: 0, + drawerEdgeDragWidth: 80, appBar: AppBar( backgroundColor: Theme.of(context).colorScheme.surface, scrolledUnderElevation: 0,