Code Explained - The Score Page :
import 'package:flutter/material.dart';
import './landing_page.dart';
import 'package:flutter/material.dart';
import './quiz_page.dart';
import './missedquestions_page.dart';
import './list.dart';
import './testslist.dart';
import './page.dart';
class ScorePage extends StatelessWidget {
final int score;
final int totalQuestions;
ScorePage(this.score, this.totalQuestions);
@override
Widget build(BuildContext context) {
return new Material(
color: Colors.blueAccent,
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Text("Your Score: ", style: new TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 50.0),),
new Text(score.toString() + "/" + totalQuestions.toString(), style: new TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 50.0)),
new IconButton(
icon: new Icon(Icons.arrow_right),
color: Colors.white,
iconSize: 200.0,
//onPressed: () => Navigator.of(context).pushAndRemoveUntil(new MaterialPageRoute(builder: (BuildContext context) => new LandingPage()), (Route route) => route == null)
onPressed: () => Navigator.of(context).pushAndRemoveUntil(new MaterialPageRoute(builder: (BuildContext context) => new Page()), (Route route) => route == null)
),
new Text("(Tap Icon To Continue)", style: new TextStyle(color: Colors.white, fontSize: 15.0, fontWeight: FontWeight.bold),),
],
)
);
}
}
Code Explained - The Score Page :
import 'package:flutter/material.dart';
import './landing_page.dart';
import 'package:flutter/material.dart';
import './quiz_page.dart';
import './missedquestions_page.dart';
import './list.dart';
import './testslist.dart';
import './page.dart';
class ScorePage extends StatelessWidget {
final int score;
final int totalQuestions;
ScorePage(this.score, this.totalQuestions);
@override
Widget build(BuildContext context) {
return new Material(
color: Colors.blueAccent,
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Text("Your Score: ", style: new TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 50.0),),
new Text(score.toString() + "/" + totalQuestions.toString(), style: new TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 50.0)),
new IconButton(
icon: new Icon(Icons.arrow_right),
color: Colors.white,
iconSize: 200.0,
//onPressed: () => Navigator.of(context).pushAndRemoveUntil(new MaterialPageRoute(builder: (BuildContext context) => new LandingPage()), (Route route) => route == null)
onPressed: () => Navigator.of(context).pushAndRemoveUntil(new MaterialPageRoute(builder: (BuildContext context) => new Page()), (Route route) => route == null)
),
new Text("(Tap Icon To Continue)", style: new TextStyle(color: Colors.white, fontSize: 15.0, fontWeight: FontWeight.bold),),
],
)
);
}
}