testing out swipeable pageview
This commit is contained in:
parent
d3f55cb9ae
commit
cbdf478811
1 changed files with 138 additions and 104 deletions
|
@ -5,6 +5,13 @@ import 'package:ohthatsa/other/AppDrawer.dart';
|
||||||
import 'package:ohthatsa/util/Months.dart';
|
import 'package:ohthatsa/util/Months.dart';
|
||||||
|
|
||||||
class MonthValuesPage extends StatelessWidget {
|
class MonthValuesPage extends StatelessWidget {
|
||||||
|
static const formulaStyle = TextStyle(
|
||||||
|
fontSize: 25
|
||||||
|
);
|
||||||
|
static const YYStyle = TextStyle(
|
||||||
|
color: Colors.green,
|
||||||
|
fontSize: 25
|
||||||
|
);
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
@ -12,121 +19,148 @@ class MonthValuesPage extends StatelessWidget {
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text("Month Values")
|
title: Text("Month Values")
|
||||||
),
|
),
|
||||||
body: Center(
|
body: PageView(
|
||||||
child: Column(
|
children: <Widget>[
|
||||||
children: <Widget>[
|
Container(
|
||||||
Text(
|
child: Column(
|
||||||
"To calculate the value for a year,",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"Take only the last two digits: ",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(
|
Text(
|
||||||
"YY",
|
"Take only the last two digits: ",
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 25)
|
||||||
color: Colors.grey,
|
|
||||||
fontSize: 25
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
Text(
|
Row(
|
||||||
"YY",
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
style: TextStyle(
|
children: <Widget>[
|
||||||
color: Colors.green,
|
Text(
|
||||||
fontSize: 25
|
"YY",
|
||||||
)
|
style: TextStyle(
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"Calculate:",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"(YY + floor(YY / 4)) % 7",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"So for example:",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
|
||||||
Text(
|
|
||||||
"19",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
fontSize: 25
|
fontSize: 25
|
||||||
|
)
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"YY",
|
||||||
|
style: YYStyle
|
||||||
)
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"67",
|
"And calculate:",
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 25)
|
||||||
color: Colors.green,
|
),
|
||||||
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)
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"(YY + floor(YY / 4)) % 7",
|
||||||
|
style: TextStyle(fontSize: 20)
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"So for example:",
|
||||||
|
style: TextStyle(fontSize: 20)
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
"19",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.grey,
|
||||||
|
fontSize: 25
|
||||||
|
)
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"67",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.green,
|
||||||
|
fontSize: 25
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
],
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"The calculation becomes",
|
||||||
|
style: TextStyle(fontSize: 20)
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"(67 + floor(67 / 4)) % 7",
|
||||||
|
style: TextStyle(fontSize: 20)
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Let's first calculate '67 / 4': 16.75",
|
||||||
|
style: TextStyle(fontSize: 20)
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Fill that into the calculation:",
|
||||||
|
style: TextStyle(fontSize: 20)
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"(67 + floor(16.75)) % 7",
|
||||||
|
style: TextStyle(fontSize: 20)
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"'Floor' it:",
|
||||||
|
style: TextStyle(fontSize: 20)
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"(67 + 16) % 7",
|
||||||
|
style: TextStyle(fontSize: 20)
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Calculate '67 + 16': 83",
|
||||||
|
style: TextStyle(fontSize: 20)
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"And that leaves us with: ",
|
||||||
|
style: TextStyle(fontSize: 20)
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"83 % 7",
|
||||||
|
style: TextStyle(fontSize: 20)
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Which gives us a year value of:",
|
||||||
|
style: TextStyle(fontSize: 20)
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"6",
|
||||||
|
style: TextStyle(fontSize: 20)
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
)
|
||||||
Text(
|
),
|
||||||
"The calculation becomes",
|
Container(
|
||||||
style: TextStyle(fontSize: 20)
|
child: Text("test")
|
||||||
),
|
)
|
||||||
Text(
|
]
|
||||||
"(67 + floor(67 / 4)) % 7",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"Let's first calculate '67 / 4': 16.75",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"Fill that into the calculation:",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"(67 + floor(16.75)) % 7",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"'Floor' it:",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"(67 + 16) % 7",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"(67 + 16) % 7",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"Calculate '67 + 16': 83",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"And that leaves us with: ",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"83 % 7",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"The final calculation gives us a year value of:",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"6",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue