Skip to content

Commit

Permalink
Update auto_close_behavior.dart
Browse files Browse the repository at this point in the history
Fixed error message: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
  • Loading branch information
bct-fbo authored May 13, 2022
1 parent 60087b1 commit b4b0ff3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/auto_close_behavior.dart
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ class _SlidableAutoCloseBarrierNotificationSenderState
// while the barrier was still enabled for this group.
// We need to release the barrier.

SchedulerBinding.instance!.addPostFrameCallback((Duration _) {
SchedulerBinding.instance.addPostFrameCallback((Duration _) {
// We call it in the next frame to avoid to rebuild a widget that is
// already rebuilding.
dispatchSlidableAutoCloseBarrierNotification(enabled: false);
Expand Down

0 comments on commit b4b0ff3

Please sign in to comment.