testing out swipeable pageview

This commit is contained in:
BroodjeAap 2020-12-07 18:10:16 +01:00
parent d3f55cb9ae
commit cbdf478811

View file

@ -5,6 +5,13 @@ import 'package:ohthatsa/other/AppDrawer.dart';
import 'package:ohthatsa/util/Months.dart';
class MonthValuesPage extends StatelessWidget {
static const formulaStyle = TextStyle(
fontSize: 25
);
static const YYStyle = TextStyle(
color: Colors.green,
fontSize: 25
);
@override
Widget build(BuildContext context) {
return Scaffold(
@ -12,16 +19,16 @@ class MonthValuesPage extends StatelessWidget {
appBar: AppBar(
title: Text("Month Values")
),
body: Center(
body: PageView(
children: <Widget>[
Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(
"To calculate the value for a year,",
style: TextStyle(fontSize: 20)
),
Text(
"Take only the last two digits: ",
style: TextStyle(fontSize: 20)
style: TextStyle(fontSize: 25)
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
@ -35,13 +42,39 @@ class MonthValuesPage extends StatelessWidget {
),
Text(
"YY",
style: TextStyle(
color: Colors.green,
fontSize: 25
)
style: YYStyle
)
],
),
Text(
"And calculate:",
style: TextStyle(fontSize: 25)
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"(",
style: formulaStyle,
),
Text(
"YY",
style: YYStyle
),
Text(
" + floor(",
style: formulaStyle
),
Text(
"YY",
style: YYStyle
),
Text(
" / 4)) % 7",
style: formulaStyle
),
],
),
Text(
"Calculate:",
style: TextStyle(fontSize: 20)
@ -101,10 +134,6 @@ class MonthValuesPage extends StatelessWidget {
"(67 + 16) % 7",
style: TextStyle(fontSize: 20)
),
Text(
"(67 + 16) % 7",
style: TextStyle(fontSize: 20)
),
Text(
"Calculate '67 + 16': 83",
style: TextStyle(fontSize: 20)
@ -118,7 +147,7 @@ class MonthValuesPage extends StatelessWidget {
style: TextStyle(fontSize: 20)
),
Text(
"The final calculation gives us a year value of:",
"Which gives us a year value of:",
style: TextStyle(fontSize: 20)
),
Text(
@ -127,6 +156,11 @@ class MonthValuesPage extends StatelessWidget {
),
],
)
),
Container(
child: Text("test")
)
]
)
);
}