mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Adds semantic labels to images and modal close button (#56)
* Added semantic labels to images. * Reverting project file. * Semantic label for close button.
This commit is contained in:
committed by
Filip Hracek
parent
fe72ed957f
commit
cf95d2c3a3
@@ -76,6 +76,7 @@ class DetailsScreen extends StatelessWidget {
|
||||
child: Image.asset(
|
||||
veggie.imageAssetPath,
|
||||
fit: BoxFit.cover,
|
||||
semanticLabel: 'A background image of ${veggie.name}',
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
|
||||
@@ -62,6 +62,7 @@ class _ColorChangingIconState
|
||||
Widget build(BuildContext context) {
|
||||
return Icon(
|
||||
widget.icon,
|
||||
semanticLabel: 'Close button',
|
||||
size: widget.size,
|
||||
color: _colorTween?.evaluate(animation),
|
||||
);
|
||||
|
||||
@@ -122,6 +122,7 @@ class VeggieCard extends StatelessWidget {
|
||||
Image.asset(
|
||||
veggie.imageAssetPath,
|
||||
fit: BoxFit.cover,
|
||||
semanticLabel: 'A card background featuring ${veggie.name}',
|
||||
),
|
||||
Positioned(
|
||||
bottom: 0.0,
|
||||
|
||||
@@ -49,6 +49,7 @@ class VeggieHeadline extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
child: Image.asset(
|
||||
veggie.imageAssetPath,
|
||||
semanticLabel: 'An icon showing ${veggie.name}',
|
||||
fit: BoxFit.fitWidth,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user