Skip to content

Instantly share code, notes, and snippets.

@Anirudhk07
Created July 11, 2020 06:42
Show Gist options
  • Save Anirudhk07/620fab75db3f29cfd3437e5c2f3b0141 to your computer and use it in GitHub Desktop.
Save Anirudhk07/620fab75db3f29cfd3437e5c2f3b0141 to your computer and use it in GitHub Desktop.
@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