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(
mainAxisAlignment: MainAxisAlignment.center,
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(),
Text(
"${date.year}-${date.month}-${date.day}",