Removing Flutter accessibility description from decorative image - flutter

I have used a decorative image in my Flutter image using the Image class.
When I use Android Talkback to hover over the image it says "unlabelled image", is there a way to remove this description so nothing is announced?
The Android docs have guidance on removing it for Android, how should I do this in Flutter?
Decorative images or images that don't convey meaningful information
graphically do not require content labels. In these cases, set an
android:contentDescription attribute of "#null" or an
android:importantForAccessibility attribute of "no".

Related

Interactive SVG with flutter

I am trying to display on a flutter app (here on the desktop version) this kind of interactive svg:
Svg flame graph
The problem is that since Flutter doesn't support svg by default, they only a few solution to it. The flutter_svg package doesn't work in my case because it render a picture. So the interactivity will not work. We can't click on the svg and have the data changing according to where we clicked.
In addition, we have a potential search with text that is included in this svg. Finally, this svg provided is only an example but in my project a svg of this type will be generated depending on the user need. So, I can't "hard code" the svg in my project.
So, do you have any ideas how to display that kind of svg in an flutter app?

How to add text label to a MapMarker? MapViewPins have poor perfomance apparently

I'd like to add custom markers with text labels on my map. I can use MapViewPins for this, but they "tremble" when map is being moved. Even one MapViewPin behaves like this in official Here example, so it is probably not an optimization issue.
When i load PNG image and use it as a MapMarker, it works perfectly. But i don't know how to add text to a marker.
I am using Here SDK for Flutter (Navigate Edition) 4.12.4.0 with Flutter 3.3.2
GIF below is an example. Cyan circles are MapMarkers, markers with icons and label are MapViewPins. Is there any solution to this problem?
Unfortunately, the MapViewPins, being widgets embedded in the MapView surface, need to be relocated to the fixed coordinates every time the map is interacted with by gestures, which is why you notice this "strange" behavior.
However, what you mention about using MapMarkers would be the best solution but in this case instead of using PNG files, you could use SVG files in which you enter the text you want to display.
There is currently no other way available to do what you mention using the HERE SDK (Navigate Edition).
Here is a link to our most up-to-date HERE SDK (Navigate Edition) documentation: https://developer.here.com/documentation/flutter-sdk-navigate/dev_guide/index.html

Caption on photos

I want to overlay a caption to different sorts of media (images, gifs, videos). Essentially add a white bar on top or bottom of the image and then write in some text. Then save the image/video to firebase as a new image with the caption added to it.
Does anyone know of any useful packages or tutorials that could help me do this?
There are some dart packages I can list so that they will help you:
Image editor pro
For storing them in firebase i can list you another package:
Firebase picture uploader

Create a shareable Image/ certificate in Flutter

In my Flutter app, I want to be able to create some kind of certificate of completion. The layout will be always the same, but picture and text in it should change. This certificate should be created in a jpg format, so I can share it with other apps.
Does anyone have an idea how this could be accomplished?
The only way I can imagine is that I create a Screen template where I put in text and picture, then let the phone take a screenshot and save that screenshot automatically. But this might lead to unwanted content in the picture and different image sizes. I have searched for Widgets/ ways to create an image in Flutter but could not find anything.
You will need to create a widget with constructors (Image and text).
Then use a flutter package called screenshot to capture the parent widget as image and save it to the users phone.
plugin link: https://pub.dev/packages/screenshot

Flutter keyboard gif support

I'm looking for a way to receive gifs from keyboards in Flutter. When I try to select a gif I get the following message in my application:
Appname doesn't support image insertion here
Inserting image and GIF using phones built-in keyboard is not yet supported in Flutter. In fact, there is an open GitHub ticket regarding this issue.
To summarize, Flutter's TextField, TextFormField or any text input boxes do not accept characters other than the ones specified in Unicode.
But according to this GitHub thread, you may explore using extended_text_field. It provides a widget named SpecialText and ImageSpan widget which could be use to add images in the text field (including GIFs).