Code Explained - The Home Screen :
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 './termslist.dart';
import './about.dart';
class Page extends StatelessWidget {
Page();
@override
Widget build(BuildContext context) {
return new Material(
color: Colors.pinkAccent,
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Text("Review Terms", style: new TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 25.0),),
new IconButton(
icon: new Icon(Icons.local_library),
color: Colors.white,
iconSize: 40.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 TermsList()), (Route route) => route == null)
),
new Text("\nTest Your Knowledge", style: new TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 25.0),),
new IconButton(
icon: new Icon(Icons.grade),
color: Colors.white,
iconSize: 40.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 TestsList()), (Route route) => route == null)
),
new Text("\nAbout", style: new TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 25.0),),
new IconButton(
icon: new Icon(Icons.help_outline),
color: Colors.white,
iconSize: 40.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 About()), (Route route) => route == null)
),
],
)
);
}
}
Code Explained - The Home Screen :
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 './termslist.dart';
import './about.dart';
class Page extends StatelessWidget {
Page();
@override
Widget build(BuildContext context) {
return new Material(
color: Colors.pinkAccent,
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Text("Review Terms", style: new TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 25.0),),
new IconButton(
icon: new Icon(Icons.local_library),
color: Colors.white,
iconSize: 40.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 TermsList()), (Route route) => route == null)
),
new Text("\nTest Your Knowledge", style: new TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 25.0),),
new IconButton(
icon: new Icon(Icons.grade),
color: Colors.white,
iconSize: 40.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 TestsList()), (Route route) => route == null)
),
new Text("\nAbout", style: new TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 25.0),),
new IconButton(
icon: new Icon(Icons.help_outline),
color: Colors.white,
iconSize: 40.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 About()), (Route route) => route == null)
),
],
)
);
}
}