Code Explained - The Missed Questions Page :
import 'package:flutter/material.dart';
import './quiz_page.dart';
import './score_page.dart';
class MissingPage extends StatelessWidget{
var answer;
int score;
int questions;
MissingPage(this.score, this.questions, this.answer);
@override
Widget build(BuildContext context){
return new Material(
color: Colors.redAccent,
child: new InkWell(
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Text("Terms To Review", style: new TextStyle(color: Colors.white, fontSize: 40.0, fontWeight: FontWeight.bold),),
new Text( "\n" + answer.toString() , style: new TextStyle(color: Colors.white, fontSize: 20.0),),
new Text("\n" ),
new IconButton(
icon: new Icon(const IconData(0xe01d,fontFamily: 'MaterialIcons')), //NEED TO GET NEW ICON!!!!
color: Colors.white,
iconSize: 60.0,
onPressed: () => Navigator.of(context).pushAndRemoveUntil(new MaterialPageRoute(builder: (BuildContext context) => new ScorePage(score,questions)), (Route route) => route == null)
//Navigator.of(context).pushAndRemoveUntil();
),
new Text("(Tap Icon To Continue)", style: new TextStyle(color: Colors.white, fontSize: 15.0, fontWeight: FontWeight.bold),),
],
),
),
);
}
}
Code Explained - The Missed Questions Page :
import 'package:flutter/material.dart';
import './quiz_page.dart';
import './score_page.dart';
class MissingPage extends StatelessWidget{
var answer;
int score;
int questions;
MissingPage(this.score, this.questions, this.answer);
@override
Widget build(BuildContext context){
return new Material(
color: Colors.redAccent,
child: new InkWell(
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Text("Terms To Review", style: new TextStyle(color: Colors.white, fontSize: 40.0, fontWeight: FontWeight.bold),),
new Text( "\n" + answer.toString() , style: new TextStyle(color: Colors.white, fontSize: 20.0),),
new Text("\n" ),
new IconButton(
icon: new Icon(const IconData(0xe01d,fontFamily: 'MaterialIcons')), //NEED TO GET NEW ICON!!!!
color: Colors.white,
iconSize: 60.0,
onPressed: () => Navigator.of(context).pushAndRemoveUntil(new MaterialPageRoute(builder: (BuildContext context) => new ScorePage(score,questions)), (Route route) => route == null)
//Navigator.of(context).pushAndRemoveUntil();
),
new Text("(Tap Icon To Continue)", style: new TextStyle(color: Colors.white, fontSize: 15.0, fontWeight: FontWeight.bold),),
],
),
),
);
}
}