Home Widget with Animated GIF

Hello,

I’m looking for ways to implement a widget, one of those that the user includes on the device’s Home screen, but I would like to include an animated GIF in it.

I’m using the package Home Widget to communicate with the widget via Flutter.

For Android, the only way I was able to apply an animated GIF was, in fact, by manipulating several frames/images (obtained by “breaking” a GIF) to look like an animation, since, from what I’ve seen so far, the RemoteViews used to manipulate the content of the widgets do not support dynamic content and also have update limits (so the GIF cannot have that many frames).

Now, for iOS, I still haven’t been able to develop the widget with any animation, but I would like to see if anyone can help with tips and/or content on the subject.

I would really appreciate any help.

On iOS you cannot include animated graphics on the home screen widget. There are some ways to introduce transition (implicit) animations when a value changes e.g. number rises from 0 to 100, this would be done with SwiftUi animations framework. They are typically quite subtle and may require user interaction. Some changes can be achieved by letting iOS know that at a given time it needs to change to some newer value/representation (e.g. you know that sun will be in zenith at some point in the day so you can prepare your widget to display it ahead of time).

Example can be found here Bring widgets to life - WWDC23 - Videos - Apple Developer