Moved some files around for practice pages

This commit is contained in:
BroodjeAap 2020-10-25 16:40:30 +01:00
parent c7dbd1520f
commit 088817ad66
5 changed files with 15 additions and 15 deletions

View file

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:ohthatsa/pages/practice/month/MonthPracticeSetupPage.dart';
import 'file:///D:/dev/projects/ohthatsa/lib/pages/practice/PracticeSetupPage.dart';
import 'package:ohthatsa/pages/YearsPage.dart';
import 'package:ohthatsa/pages/practice/month/MonthPracticePage.dart';
@ -19,7 +19,7 @@ class OhThatsA extends StatelessWidget {
routes: {
'/monthValues': (context) => MonthValuesPage(),
'/years': (context) => YearsPage(),
'/practice/month/setup': (context) => MonthPracticeSetupPage(),
'/practice/month/setup': (context) => PracticeSetupPage(),
'/practice/month/practice': (context) => MonthPracticePage(),
}
);

View file

@ -0,0 +1,6 @@
class PracticeSetup {
final int count;
final bool showCorrect;
PracticeSetup(this.count, this.showCorrect);
}

View file

@ -1,14 +1,14 @@
import 'package:flutter/material.dart';
import 'package:numberpicker/numberpicker.dart';
import 'package:ohthatsa/AppDrawer.dart';
import 'package:ohthatsa/pages/practice/month/MonthPracticeSetup.dart';
import 'file:///D:/dev/projects/ohthatsa/lib/pages/practice/PracticeSetup.dart';
class MonthPracticeSetupPage extends StatefulWidget {
class PracticeSetupPage extends StatefulWidget {
@override
_MonthPracticeSetupState createState() => _MonthPracticeSetupState();
_PracticeSetupState createState() => _PracticeSetupState();
}
class _MonthPracticeSetupState extends State<MonthPracticeSetupPage> {
class _PracticeSetupState extends State<PracticeSetupPage> {
int _count = 12;
bool _showCorrect = true;
@override
@ -50,7 +50,7 @@ class _MonthPracticeSetupState extends State<MonthPracticeSetupPage> {
Navigator.pushNamed(
context,
'/practice/month/practice',
arguments: MonthPracticeSetup(_count, _showCorrect)
arguments: PracticeSetup(_count, _showCorrect)
);
},
child: Text("Start!"),

View file

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:ohthatsa/pages/practice/month/MonthPracticeSetup.dart';
import 'file:///D:/dev/projects/ohthatsa/lib/pages/practice/PracticeSetup.dart';
import 'package:ohthatsa/util/DayCalculator.dart';
import 'package:ohthatsa/AppDrawer.dart';
import 'package:ohthatsa/util/Months.dart';
@ -159,7 +159,7 @@ class _MonthPracticeState extends State<MonthPracticePage> {
@override
Widget build(BuildContext context) {
MonthPracticeSetup setup = ModalRoute.of(context).settings.arguments;
PracticeSetup setup = ModalRoute.of(context).settings.arguments;
_startCount = setup.count;
_showCorrect = setup.showCorrect;
return Scaffold(

View file

@ -1,6 +0,0 @@
class MonthPracticeSetup {
final int count;
final bool showCorrect;
MonthPracticeSetup(this.count, this.showCorrect);
}