Improved accessibility

This commit is contained in:
Jakob Meier 2023-03-17 21:06:54 +01:00
parent 6aab88bbfd
commit 4c9f9b7627
No known key found for this signature in database
GPG key ID: 66BDC7E6A01A6152

View file

@ -38,10 +38,15 @@ class _WelcomePageState extends State<WelcomePage> {
} else if (_currentPage == 4 - 1) { } else if (_currentPage == 4 - 1) {
fabText = "Sign up"; 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 width = MediaQuery.of(context).size.width;
double height = MediaQuery.of(context).size.height; double height = MediaQuery.of(context).size.height;
double smallest = min(width, height); double smallest = min(width, height);
return Scaffold( return Scaffold(
@ -128,7 +133,7 @@ class _WelcomePageState extends State<WelcomePage> {
floatingActionButton: FloatingActionButton.extended( floatingActionButton: FloatingActionButton.extended(
icon: const Icon(Icons.chevron_right), icon: const Icon(Icons.chevron_right),
label: Text(fabText), label: Text(fabText),
tooltip: 'Continue tour', tooltip: fabTooltip,
onPressed: () { onPressed: () {
if (controller.page == 4 - 1) { if (controller.page == 4 - 1) {
// open signup screen // open signup screen