Save the year in the database
We will need it later
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
@@ -33,12 +33,10 @@ class _AddPageState extends State<AddPage> with SingleTickerProviderStateMixin {
|
||||
);
|
||||
|
||||
_buttonAnimation = Tween<double>(begin: 0, end: 1.0).animate(
|
||||
CurvedAnimation(parent: _controller, curve: Curves.fastOutSlowIn)
|
||||
);
|
||||
CurvedAnimation(parent: _controller, curve: Curves.fastOutSlowIn));
|
||||
|
||||
_pageAnimation = Tween<double>(begin: -1, end: 1.0).animate(
|
||||
CurvedAnimation(parent: _controller, curve: Curves.fastOutSlowIn)
|
||||
);
|
||||
CurvedAnimation(parent: _controller, curve: Curves.fastOutSlowIn));
|
||||
|
||||
_controller.addListener(() {
|
||||
print(_controller.value);
|
||||
@@ -230,7 +228,8 @@ class _AddPageState extends State<AddPage> with SingleTickerProviderStateMixin {
|
||||
//<-- Margin from right
|
||||
top: widget.buttonRect.top,
|
||||
//<-- Margin from top
|
||||
bottom: (MediaQuery.of(context).size.height - widget.buttonRect.bottom) *
|
||||
bottom:
|
||||
(MediaQuery.of(context).size.height - widget.buttonRect.bottom) *
|
||||
(1 - _buttonAnimation.value),
|
||||
//<-- Margin from bottom
|
||||
child: Container(
|
||||
@@ -270,6 +269,7 @@ class _AddPageState extends State<AddPage> with SingleTickerProviderStateMixin {
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
var today = DateTime.now();
|
||||
var user = Provider.of<LoginState>(context).currentUser();
|
||||
if (value > 0 && category != "") {
|
||||
Firestore.instance
|
||||
@@ -280,8 +280,9 @@ class _AddPageState extends State<AddPage> with SingleTickerProviderStateMixin {
|
||||
.setData({
|
||||
"category": category,
|
||||
"value": value / 100.0,
|
||||
"month": DateTime.now().month,
|
||||
"day": DateTime.now().day,
|
||||
"month": today.month,
|
||||
"day": today.day,
|
||||
"year": today.year,
|
||||
});
|
||||
|
||||
Navigator.of(context).pop();
|
||||
|
||||
Reference in New Issue
Block a user