Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/flutter_markdown/lib/src/builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ class MarkdownBuilder implements md.NodeVisitor {
final List<_TableElement> _tables = <_TableElement>[];
final List<_InlineElement> _inlines = <_InlineElement>[];
final List<GestureRecognizer> _linkHandlers = <GestureRecognizer>[];
final ScrollController _preScrollController = ScrollController();
String? _currentBlockTag;
String? _lastVisitedTag;
bool _isInBlockquote = false;
Expand Down Expand Up @@ -347,10 +346,11 @@ class MarkdownBuilder implements md.NodeVisitor {
child = builders[_blocks.last.tag!]!
.visitText(text, styleSheet.styles[_blocks.last.tag!]);
} else if (_blocks.last.tag == 'pre') {
final ScrollController preScrollController = ScrollController();
child = Scrollbar(
controller: _preScrollController,
controller: preScrollController,
child: SingleChildScrollView(
controller: _preScrollController,
controller: preScrollController,
scrollDirection: Axis.horizontal,
padding: styleSheet.codeblockPadding,
child: _buildRichText(delegate.formatText(styleSheet, text.text)),
Expand Down