Skip to content

Commit

Permalink
fix null safety method channel (flutter-moum#71)
Browse files Browse the repository at this point in the history
Co-authored-by: Moch Ginanjar Busiri <[email protected]>
  • Loading branch information
gbusiri and Moch Ginanjar Busiri authored Jul 11, 2023
1 parent 3fc8f27 commit d23cc0c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ private void onAttachedToEngine(Context applicationContext, BinaryMessenger mess
@Override
public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
applicationContext = null;
channel.setMethodCallHandler(null);
channel = null;
if (channel != null) {
channel.setMethodCallHandler(null);
channel = null;
}
}

@Override
Expand Down

0 comments on commit d23cc0c

Please sign in to comment.