1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-10 23:08:59 +00:00

Update semantic label of study back button (#188)

This commit is contained in:
rami-a
2019-12-16 12:27:21 -05:00
committed by GitHub
parent 66efe3b5ce
commit 67bd8a3f1c
5 changed files with 25 additions and 4 deletions

View File

@@ -229,6 +229,14 @@ class GalleryLocalizations {
desc: r'Represents a link to the Flutter samples github repository.');
}
String get backToGallery {
return Intl.message(r'Back to Gallery',
locale: _localeName,
name: 'backToGallery',
desc:
r'Semantic label for back button to exit a study and return to the gallery.');
}
String get bottomNavigationAccountTab {
return Intl.message(r'Account',
locale: _localeName,

View File

@@ -13,6 +13,10 @@
}
}
},
"backToGallery": "Back to Gallery",
"@backToGallery": {
"description": "Semantic label for back button to exit a study and return to the gallery home page."
},
"homeHeaderGallery": "Gallery",
"@homeHeaderGallery": {
"description": "Header title on home screen for Gallery section."

View File

@@ -13,6 +13,10 @@
name="aboutDialogDescription"
description="A description about how to view the source code for this app."
>To see the source code for this app, please visit the {value}.</string>
<string
name="backToGallery"
description="Semantic label for back button to exit a study and return to the gallery."
>Back to Gallery</string>
<string
name="homeHeaderGallery"
description="Header title on home screen for Gallery section."

View File

@@ -82,6 +82,8 @@ class MessageLookup extends MessageLookupByLibrary {
"aboutDialogDescription": m0,
"aboutFlutterSamplesRepo":
MessageLookupByLibrary.simpleMessage("Flutter samples Github repo"),
"backToGallery":
MessageLookupByLibrary.simpleMessage("Back to Gallery"),
"bottomNavigationAccountTab":
MessageLookupByLibrary.simpleMessage("Account"),
"bottomNavigationAlarmTab":

View File

@@ -847,10 +847,13 @@ class _StudyWrapperState extends State<_StudyWrapper> {
),
Align(
alignment: AlignmentDirectional.bottomStart,
child: Semantics(
sortKey: const OrdinalSortKey(0),
child: Padding(
padding: const EdgeInsets.all(16),
child: Semantics(
sortKey: const OrdinalSortKey(0),
label: GalleryLocalizations.of(context).backToGallery,
button: true,
excludeSemantics: true,
child: FloatingActionButton.extended(
focusNode: backButtonFocusNode,
onPressed: () {