1-
21import 'package:flutter/material.dart' ;
32
43import 'package:flutter_code_editor/src/code_field/browser_detection.dart' ;
@@ -14,9 +13,6 @@ const _lineNumberColumn = 0;
1413const _issueColumn = 1 ;
1514const _foldingColumn = 2 ;
1615
17-
18-
19-
2016class GutterWidget extends StatelessWidget {
2117 const GutterWidget ({
2218 super .key,
@@ -47,7 +43,8 @@ class GutterWidget extends StatelessWidget {
4743 (style.showFoldingHandles ? 0 : _foldingColumnWidth);
4844
4945 final issueColumnWidth = style.showErrors ? _issueColumnWidth : 0.0 ;
50- final foldingColumnWidth = style.showFoldingHandles ? _foldingColumnWidth : 0.0 ;
46+ final foldingColumnWidth =
47+ style.showFoldingHandles ? _foldingColumnWidth : 0.0 ;
5148
5249 final tableRows = List .generate (
5350 code.hiddenLineRanges.visibleLineNumbers.length,
@@ -79,18 +76,20 @@ class GutterWidget extends StatelessWidget {
7976 right: 10 ,
8077 ),
8178 width: style.showLineNumbers ? gutterWidth : null ,
82-
83- child: SingleChildScrollView (
84- controller: scrollController,
85- child: Table (
86- columnWidths: {
87- _lineNumberColumn: const FlexColumnWidth (),
88- _issueColumn: FixedColumnWidth (issueColumnWidth),
89- _foldingColumn: FixedColumnWidth (foldingColumnWidth),
90- },
91- defaultVerticalAlignment: TableCellVerticalAlignment .baseline,
92- textBaseline: TextBaseline .alphabetic,
93- children: tableRows,
79+ child: ScrollConfiguration (
80+ behavior: ScrollConfiguration .of (context).copyWith (scrollbars: false ),
81+ child: SingleChildScrollView (
82+ controller: scrollController,
83+ child: Table (
84+ columnWidths: {
85+ _lineNumberColumn: const FlexColumnWidth (),
86+ _issueColumn: FixedColumnWidth (issueColumnWidth),
87+ _foldingColumn: FixedColumnWidth (foldingColumnWidth),
88+ },
89+ defaultVerticalAlignment: TableCellVerticalAlignment .baseline,
90+ textBaseline: TextBaseline .alphabetic,
91+ children: tableRows,
92+ ),
9493 ),
9594 ),
9695 );
@@ -118,7 +117,8 @@ class GutterWidget extends StatelessWidget {
118117 const newLine = '\n ' ;
119118 double textWrappedTimes = 1 ;
120119 if (size != null && code.text.isNotEmpty) {
121- final textWidth = getTextWidth (code.lines[lineIndex].text, style.textStyle! );
120+ final textWidth =
121+ getTextWidth (code.lines[lineIndex].text, style.textStyle! );
122122 textWrappedTimes = textWidth.width / (size! .width - 36 );
123123 }
124124
@@ -145,7 +145,8 @@ class GutterWidget extends StatelessWidget {
145145
146146 tableRows[lineIndex].children[_issueColumn] = GutterErrorWidget (
147147 issue,
148- style.errorPopupTextStyle ?? (throw Exception ('Error popup style should never be null' )),
148+ style.errorPopupTextStyle ??
149+ (throw Exception ('Error popup style should never be null' )),
149150 );
150151 }
151152 }
0 commit comments