Skip to content

Commit dc2b466

Browse files
authored
Merge pull request #258 from ArinFaraj/main
fix _getCaretHeight throwing null cast exception
2 parents 0f18b2b + 94fe091 commit dc2b466

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/code_field/code_field.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ class _CodeFieldState extends State<CodeField> {
514514
widget.controller.selection.base,
515515
Rect.zero,
516516
);
517-
return (widget.controller.selection.base.offset > 0) ? caretFullHeight! : 0;
517+
return caretFullHeight ?? 0;
518518
}
519519

520520
double _getPopupLeftOffset(TextPainter textPainter) {

0 commit comments

Comments
 (0)