Skip to content

Commit 9eaa9d7

Browse files
content: move code block padding inside ScrollView
1 parent 50c6be8 commit 9eaa9d7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/widgets/content.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ class CodeBlock extends StatelessWidget {
257257
@override
258258
Widget build(BuildContext context) {
259259
return Container(
260-
padding: const EdgeInsets.fromLTRB(7, 5, 7, 3),
261260
decoration: BoxDecoration(
262261
color: Colors.white,
263262
border: Border.all(
@@ -266,7 +265,10 @@ class CodeBlock extends StatelessWidget {
266265
borderRadius: BorderRadius.circular(4)),
267266
child: SingleChildScrollViewWithScrollbar(
268267
scrollDirection: Axis.horizontal,
269-
child: Text.rich(_buildNodes(node.spans))));
268+
child: Padding(
269+
padding: const EdgeInsets.fromLTRB(7, 5, 7, 3),
270+
child: Text.rich(_buildNodes(node.spans)),
271+
)));
270272
}
271273

272274
InlineSpan _buildNodes(List<CodeBlockSpanNode> nodes) {

0 commit comments

Comments
 (0)