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,16 +19,16 @@ class MonthValuesPage extends StatelessWidget {
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text("Month Values")
|
title: Text("Month Values")
|
||||||
),
|
),
|
||||||
body: Center(
|
body: PageView(
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
child: Column(
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(
|
|
||||||
"To calculate the value for a year,",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Text(
|
Text(
|
||||||
"Take only the last two digits: ",
|
"Take only the last two digits: ",
|
||||||
style: TextStyle(fontSize: 20)
|
style: TextStyle(fontSize: 25)
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
@ -35,13 +42,39 @@ class MonthValuesPage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"YY",
|
"YY",
|
||||||
style: TextStyle(
|
style: YYStyle
|
||||||
color: Colors.green,
|
|
||||||
fontSize: 25
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
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(
|
Text(
|
||||||
"Calculate:",
|
"Calculate:",
|
||||||
style: TextStyle(fontSize: 20)
|
style: TextStyle(fontSize: 20)
|
||||||
|
@ -101,10 +134,6 @@ class MonthValuesPage extends StatelessWidget {
|
||||||
"(67 + 16) % 7",
|
"(67 + 16) % 7",
|
||||||
style: TextStyle(fontSize: 20)
|
style: TextStyle(fontSize: 20)
|
||||||
),
|
),
|
||||||
Text(
|
|
||||||
"(67 + 16) % 7",
|
|
||||||
style: TextStyle(fontSize: 20)
|
|
||||||
),
|
|
||||||
Text(
|
Text(
|
||||||
"Calculate '67 + 16': 83",
|
"Calculate '67 + 16': 83",
|
||||||
style: TextStyle(fontSize: 20)
|
style: TextStyle(fontSize: 20)
|
||||||
|
@ -118,7 +147,7 @@ class MonthValuesPage extends StatelessWidget {
|
||||||
style: TextStyle(fontSize: 20)
|
style: TextStyle(fontSize: 20)
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"The final calculation gives us a year value of:",
|
"Which gives us a year value of:",
|
||||||
style: TextStyle(fontSize: 20)
|
style: TextStyle(fontSize: 20)
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
|
@ -127,6 +156,11 @@ class MonthValuesPage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
child: Text("test")
|
||||||
|
)
|
||||||
|
]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue