make FOODER logo clickable and redirect to today's diary

use setState call
initState cause setState was buggy
This commit is contained in:
Cyanose 2023-08-02 16:45:47 +02:00
parent a961580e2d
commit b540c7af65

View file

@ -74,7 +74,15 @@ class _MainScreen extends State<MainScreen> {
title = Row( title = Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
const Text("🅵🅾🅾🅳🅴🆁"), TextButton(
child: const Text("🅵🅾🅾🅳🅴🆁", style: const TextStyle(fontSize: 20, color: Colors.white)),
onPressed: () {
Navigator.pushReplacement(
context,
MaterialPageRoute(builder: (context) => MainScreen(apiClient: widget.apiClient)),
).then((_) => _asyncInitState());
},
),
const Spacer(), const Spacer(),
Text( Text(
"${date.year}-${date.month}-${date.day}", "${date.year}-${date.month}-${date.day}",