Skip to content

Commit 6d517dd

Browse files
committed
chore: add a comment to explain scroll physics
1 parent 3b441be commit 6d517dd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

super_editor/lib/src/super_textfield/infrastructure/text_scrollview.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,8 @@ class _TextScrollViewState extends State<TextScrollView>
423423
child: SingleChildScrollView(
424424
key: _textFieldViewportKey,
425425
controller: _scrollController,
426+
// Passing null for scroll physics for multiline text fields will
427+
// apply an appropriate physics for the underlying host platform.
426428
physics: isMultiline ? null : const NeverScrollableScrollPhysics(),
427429
scrollDirection: isMultiline ? Axis.vertical : Axis.horizontal,
428430
child: Padding(

0 commit comments

Comments
 (0)