From 4e1d094ae05973a5f0d8d451adce8d88f9d46dd5 Mon Sep 17 00:00:00 2001 From: axtlos Date: Sun, 1 May 2022 22:16:34 +0200 Subject: [PATCH] replace _ with space in locale select, fix #11 --- lib/functions/locale.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/functions/locale.dart b/lib/functions/locale.dart index bcc8148..eb3569e 100644 --- a/lib/functions/locale.dart +++ b/lib/functions/locale.dart @@ -28,7 +28,8 @@ Widget regionTemplate(variant, chosenLayout, nextPage, writeToLog) { child: ElevatedButton( onPressed: () { chosenRegion = variant; - writeToLog("Chosen Region: ${chosenRegion.location}"); + writeToLog( + "Chosen Region: ${chosenRegion.location.replaceAll("_", " ")}"); nextPage(); }, style: TextButton.styleFrom( @@ -38,7 +39,7 @@ Widget regionTemplate(variant, chosenLayout, nextPage, writeToLog) { padding: const EdgeInsets.all(10), ), child: Text( - variant.location, + variant.location.replaceAll("_", " "), style: const TextStyle( fontWeight: FontWeight.bold, ), @@ -65,7 +66,8 @@ Widget locationTemplate(location, setChosenLocation, writeToLog) { child: ElevatedButton( onPressed: () { setChosenLocation(location); - writeToLog("Chosen location: ${location.name}"); + writeToLog( + "Chosen location: ${location.name.replaceAll("_", " ")}"); }, style: TextButton.styleFrom( primary: Colors.white, @@ -74,7 +76,7 @@ Widget locationTemplate(location, setChosenLocation, writeToLog) { padding: const EdgeInsets.all(10), ), child: Text( - location.name, + location.name.replaceAll("_", " "), style: const TextStyle( fontWeight: FontWeight.bold, ),