Created
July 11, 2020 06:42
-
-
Save Anirudhk07/620fab75db3f29cfd3437e5c2f3b0141 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@override | |
void onGameOver(int correctAnswers) { | |
showDialog( | |
context: _scaffoldKey.currentContext, | |
builder: (context) { | |
return AlertDialog( | |
title: Text('Game over!'), | |
content: Text('Score: $correctAnswers/5'), | |
actions: <Widget>[ | |
FlatButton( | |
child: Text('close'.toUpperCase()), | |
onPressed: () { | |
// TODO: Display an Interstitial Ad | |
if (_isInterstitialAdReady) { | |
_interstitialAd.show(); | |
} | |
_moveToHome(); | |
}, | |
), | |
], | |
); | |
}, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment