From 4c9f9b7627e8a1ee57c4ee67262e16aec30649bb Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Fri, 17 Mar 2023 21:06:54 +0100 Subject: [PATCH] Improved accessibility --- lib/screens/welcome.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/screens/welcome.dart b/lib/screens/welcome.dart index 46cfafa..9087b6c 100644 --- a/lib/screens/welcome.dart +++ b/lib/screens/welcome.dart @@ -38,10 +38,15 @@ class _WelcomePageState extends State { } else if (_currentPage == 4 - 1) { fabText = "Sign up"; } + String fabTooltip = "Continue Tour"; + if (_currentPage == 0) { + fabTooltip = "Take Tour"; + } else if (_currentPage == 4 - 1) { + fabTooltip = "Create an account"; + } double width = MediaQuery.of(context).size.width; double height = MediaQuery.of(context).size.height; - double smallest = min(width, height); return Scaffold( @@ -128,7 +133,7 @@ class _WelcomePageState extends State { floatingActionButton: FloatingActionButton.extended( icon: const Icon(Icons.chevron_right), label: Text(fabText), - tooltip: 'Continue tour', + tooltip: fabTooltip, onPressed: () { if (controller.page == 4 - 1) { // open signup screen