Skip to content

Commit

Permalink
consistently use ?.call() to invoke nullable functions
Browse files Browse the repository at this point in the history
  • Loading branch information
britannio committed Apr 10, 2021
1 parent ebc07d6 commit dc9f1d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/keyboard_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ class KeyboardManagerWidgetState extends State<KeyboardManagerWidget> {
dismissed = false;
_keyboardHeight = bottom;
if (!oldKeyboardOpen && activePointer == null) {
if (widget.onKeyboardOpen != null) widget.onKeyboardOpen!();
widget.onKeyboardOpen?.call();
}
} else {
// Close notification if the keyobard closes while not dragging
if (oldKeyboardOpen && activePointer == null) {
if (widget.onKeyboardClose != null) widget.onKeyboardClose!();
widget.onKeyboardClose?.call();
dismissed = true;
}
}
Expand Down

0 comments on commit dc9f1d8

Please sign in to comment.