redesigned practice setup page to allow for different type of practicing
This commit is contained in:
parent
7864ede6ee
commit
a0ce8e9230
1 changed files with 96 additions and 27 deletions
|
@ -16,27 +16,34 @@ class _PracticeSetupState extends State<PracticeSetupPage> {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
drawer: AppDrawer(),
|
drawer: AppDrawer(),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text("Practice Months"),
|
title: Text("Practice"),
|
||||||
),
|
),
|
||||||
body: Center(
|
body: Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.all(20),
|
padding: EdgeInsets.all(20),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(
|
Row(
|
||||||
"How many rounds?",
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
style: TextStyle(fontSize: 30),
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
"How many rounds",
|
||||||
|
style: TextStyle(fontSize: 20),
|
||||||
|
),
|
||||||
|
NumberPicker.integer(
|
||||||
|
initialValue: _count,
|
||||||
|
minValue: 1,
|
||||||
|
maxValue: 500,
|
||||||
|
onChanged: (newNumber) =>
|
||||||
|
setState(() => _count = newNumber),
|
||||||
|
)
|
||||||
|
]
|
||||||
),
|
),
|
||||||
NumberPicker.integer(
|
|
||||||
initialValue: _count,
|
|
||||||
minValue: 1,
|
|
||||||
maxValue: 500,
|
|
||||||
onChanged: (newNumber) =>
|
|
||||||
setState(() => _count = newNumber),
|
|
||||||
),
|
|
||||||
SizedBox(height: 30),
|
|
||||||
CheckboxListTile(
|
CheckboxListTile(
|
||||||
title: Text("Show correct Answer"),
|
title: Text(
|
||||||
|
"Show correct Answer",
|
||||||
|
style: TextStyle(fontSize: 20)
|
||||||
|
),
|
||||||
value: _showCorrect,
|
value: _showCorrect,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -44,20 +51,82 @@ class _PracticeSetupState extends State<PracticeSetupPage> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
SizedBox(height: 30),
|
Spacer(),
|
||||||
FlatButton(
|
Table(
|
||||||
onPressed: () {
|
border: TableBorder(
|
||||||
Navigator.pushNamed(
|
//horizontalInside: BorderSide(),
|
||||||
context,
|
//verticalInside: BorderSide()
|
||||||
'/practice/month/practice',
|
),
|
||||||
arguments: PracticeSetup(_count, _showCorrect)
|
children: <TableRow>[
|
||||||
);
|
TableRow(
|
||||||
},
|
children: <Widget>[
|
||||||
child: Text("Start!"),
|
// Header
|
||||||
color: Colors.blue,
|
Text(""),
|
||||||
textColor: Colors.white,
|
Text("7d", textAlign: TextAlign.center, style: TextStyle(fontSize: 25)),
|
||||||
padding: EdgeInsets.all(8.0)
|
Text("30d", textAlign: TextAlign.center, style: TextStyle(fontSize: 25)),
|
||||||
)
|
Text("All", textAlign: TextAlign.center, style: TextStyle(fontSize: 25))
|
||||||
|
]
|
||||||
|
),
|
||||||
|
TableRow(
|
||||||
|
children: <Widget>[
|
||||||
|
FlatButton(
|
||||||
|
child: Text("Month"),
|
||||||
|
color: Colors.blue,
|
||||||
|
textColor: Colors.white,
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pushNamed(
|
||||||
|
context,
|
||||||
|
'/practice/month/practice',
|
||||||
|
arguments: PracticeSetup(_count, _showCorrect)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Text("85%", textAlign: TextAlign.center, style: TextStyle(fontSize: 25)),
|
||||||
|
Text("70%", textAlign: TextAlign.center, style: TextStyle(fontSize: 25)),
|
||||||
|
Text("50%", textAlign: TextAlign.center, style: TextStyle(fontSize: 25))
|
||||||
|
]
|
||||||
|
),
|
||||||
|
TableRow(
|
||||||
|
children: <Widget>[
|
||||||
|
FlatButton(
|
||||||
|
child: Text("Year"),
|
||||||
|
color: Colors.blue,
|
||||||
|
textColor: Colors.white,
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
Text("80%", textAlign: TextAlign.center, style: TextStyle(fontSize: 25)),
|
||||||
|
Text("70%", textAlign: TextAlign.center, style: TextStyle(fontSize: 25)),
|
||||||
|
Text("50%", textAlign: TextAlign.center, style: TextStyle(fontSize: 25))
|
||||||
|
]
|
||||||
|
),
|
||||||
|
TableRow(
|
||||||
|
children: <Widget>[
|
||||||
|
FlatButton(
|
||||||
|
child: Text("Leap"),
|
||||||
|
color: Colors.blue,
|
||||||
|
textColor: Colors.white,
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
Text("80%", textAlign: TextAlign.center, style: TextStyle(fontSize: 25)),
|
||||||
|
Text("70%", textAlign: TextAlign.center, style: TextStyle(fontSize: 25)),
|
||||||
|
Text("50%", textAlign: TextAlign.center, style: TextStyle(fontSize: 25))
|
||||||
|
]
|
||||||
|
),
|
||||||
|
TableRow(
|
||||||
|
children: <Widget>[
|
||||||
|
FlatButton(
|
||||||
|
child: Text("All"),
|
||||||
|
color: Colors.blue,
|
||||||
|
textColor: Colors.white,
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
Text("80%", textAlign: TextAlign.center, style: TextStyle(fontSize: 25)),
|
||||||
|
Text("70%", textAlign: TextAlign.center, style: TextStyle(fontSize: 25)),
|
||||||
|
Text("50%", textAlign: TextAlign.center, style: TextStyle(fontSize: 25))
|
||||||
|
]
|
||||||
|
),
|
||||||
|
]
|
||||||
|
),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue