Skip to content

Commit

Permalink
Merge pull request #2 from collinjackson/flutter/plugins#849
Browse files Browse the repository at this point in the history
[firebase_admob]Destroy adView Before contentView Checking
  • Loading branch information
collinjackson authored Aug 30, 2019
2 parents cdbcf01 + 296cd49 commit 0e1d2fa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ void show() {
void dispose() {
super.dispose();

adView.destroy();

View contentView = activity.findViewById(id);
if (contentView == null || !(contentView.getParent() instanceof ViewGroup)) return;

adView.destroy();

ViewGroup contentParent = (ViewGroup) (contentView.getParent());
contentParent.removeView(contentView);
}
Expand Down

0 comments on commit 0e1d2fa

Please sign in to comment.