mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
[Gallery] Exclude semantics for logo and change to hint for products on Shrine (#292)
* Exclude logo from semantics * Use hint instead of onTapHint as it otherwise won't work with VoiceOver
This commit is contained in:
@@ -85,18 +85,17 @@ class _ShrineLogo extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
'packages/shrine_images/diamond.png',
|
||||
excludeFromSemantics: true,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'SHRINE',
|
||||
style: Theme.of(context).textTheme.headline,
|
||||
),
|
||||
],
|
||||
return ExcludeSemantics(
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset('packages/shrine_images/diamond.png'),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'SHRINE',
|
||||
style: Theme.of(context).textTheme.headline,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ Widget _buildProductCard({
|
||||
return ScopedModelDescendant<AppStateModel>(
|
||||
builder: (context, child, model) {
|
||||
return Semantics(
|
||||
onTapHint:
|
||||
hint:
|
||||
GalleryLocalizations.of(context).shrineScreenReaderProductAddToCart,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
|
||||
Reference in New Issue
Block a user