Skip to content

Commit

Permalink
Merge pull request #258 from ArinFaraj/main
Browse files Browse the repository at this point in the history
fix _getCaretHeight throwing null cast exception
  • Loading branch information
nausharipov committed Nov 21, 2023
2 parents 0f18b2b + 94fe091 commit dc2b466
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/code_field/code_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ class _CodeFieldState extends State<CodeField> {
widget.controller.selection.base,
Rect.zero,
);
return (widget.controller.selection.base.offset > 0) ? caretFullHeight! : 0;
return caretFullHeight ?? 0;
}

double _getPopupLeftOffset(TextPainter textPainter) {
Expand Down

0 comments on commit dc2b466

Please sign in to comment.