Justin McCandless
89d59da9ea
Image GIF pausing ( #176492 )
...
Flutter needs a strong story around pausing animated GIFs because it
affects accessibility via
[MediaQueryData.disableAnimations](https://main-api.flutter.dev/flutter/widgets/MediaQueryData/disableAnimations.html ).
See https://github.com/flutter/flutter/issues/175516 .
### Today
Currently, it's possible to pause a gif using TickerProvider. However,
if paused on initial load, the first frame will never display, and I
believe that's a bug.
```dart
TickerMode(
// Pauses the gif, but if set to false on first load, the first frame never loads.
enabled: false,
child: Image(image: myAnimatedGif),
),
```
Currently `disableAnimations` has no effect:
```dart
MediaQuery(
// Currently has no effect on the Image, until this PR.
data: MediaQueryData(disableAnimations: true),
child: Image(image: myAnimatedGif),
),
```
### With this PR
* MediaQueryData.disableAnimations can be used to pause a gif in the
same way that TickerMode can be used today.
* If either MediaQuery.disableAnimations or TickerMode cause a gif to be
paused on first load, it will show its first frame before pausing. This
is potentially a breaking change.
* The docs clearly explain this behavior and how to pause a gif.
Fixes https://github.com/flutter/flutter/issues/175516
Partial fix for https://github.com/flutter/flutter/issues/130976
Fixes Google b/419605327
2025-11-13 18:34:51 +00:00
..
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-08-04 22:32:22 +00:00
2024-12-19 20:06:21 +00:00
2025-10-21 22:37:31 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-30 18:40:09 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-10-16 00:18:40 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-11-02 18:59:19 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-08-04 22:32:22 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-10-08 19:13:02 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-09 21:22:48 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-09-27 00:13:18 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-10-21 23:41:14 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-01-25 05:50:26 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-11-11 18:44:19 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-11-11 18:41:59 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-08-22 22:38:17 +00:00
2025-08-12 22:07:18 +00:00
2025-08-08 18:47:17 +00:00
2024-12-19 20:06:21 +00:00
2025-08-14 19:53:20 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-08-15 22:40:14 +00:00
2024-12-19 20:06:21 +00:00
2025-09-21 03:52:34 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-11-13 18:34:51 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-09-30 23:42:02 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-11-11 18:44:19 +00:00
2025-08-14 19:53:20 +00:00
2025-07-07 17:58:32 +00:00
2025-07-30 18:40:09 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-30 18:31:41 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-09-24 21:58:08 +00:00
2025-07-07 17:58:32 +00:00
2025-08-14 19:53:20 +00:00
2025-10-29 06:11:35 +00:00
2024-12-19 20:06:21 +00:00
2025-08-04 22:32:22 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-11-10 20:44:36 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-11-11 00:35:40 +00:00
2025-08-29 01:11:25 +00:00
2025-08-04 22:32:22 +00:00
2025-08-27 22:17:05 +00:00
2025-07-07 17:58:32 +00:00
2025-01-14 05:13:41 +00:00
2024-12-19 20:06:21 +00:00
2025-10-22 18:07:08 +00:00
2025-07-07 17:58:32 +00:00
2025-08-27 22:17:05 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-08-04 22:32:22 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-10-15 21:21:17 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-10-06 19:09:24 +00:00
2025-10-09 00:12:33 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-11-05 00:20:33 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-01-14 05:13:41 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-14 22:49:04 +00:00
2025-07-14 22:49:04 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-10-15 21:26:16 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-01-14 05:13:41 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-11-07 01:09:17 +00:00
2025-03-05 17:41:20 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-31 16:06:07 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-08-04 22:32:22 +00:00
2025-05-29 17:30:32 +00:00
2025-08-04 22:32:22 +00:00
2025-08-04 22:32:22 +00:00
2025-07-07 17:58:32 +00:00
2025-09-02 20:25:08 +00:00
2025-10-17 19:07:42 +00:00
2025-10-17 19:07:42 +00:00
2025-11-11 18:44:19 +00:00
2024-12-19 20:06:21 +00:00
2025-02-06 03:08:23 +00:00
2025-02-06 03:08:23 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-09-27 00:13:18 +00:00
2025-02-06 03:08:23 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-09-04 21:05:27 +00:00
2025-02-06 03:08:23 +00:00
2025-06-12 21:26:00 +00:00
2025-11-11 00:35:40 +00:00
2025-07-07 17:58:32 +00:00
2025-09-30 17:47:09 +00:00
2025-11-11 19:04:20 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-04-29 20:58:29 +00:00
2025-04-29 20:58:29 +00:00
2025-04-29 20:58:29 +00:00
2025-04-29 20:58:29 +00:00
2025-04-29 20:58:29 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-08-04 22:32:22 +00:00
2025-07-07 17:58:32 +00:00
2025-08-04 22:32:22 +00:00
2025-08-27 08:17:40 +00:00
2025-08-04 22:32:22 +00:00
2025-07-07 17:58:32 +00:00
2025-08-04 22:32:22 +00:00
2025-09-12 22:19:41 +00:00
2025-10-21 17:04:26 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-08-04 22:32:22 +00:00
2025-08-04 22:32:22 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-08-04 22:32:22 +00:00
2025-08-04 22:32:22 +00:00
2025-08-04 22:32:22 +00:00
2025-08-04 22:32:22 +00:00
2024-12-19 20:06:21 +00:00
2025-08-04 22:32:22 +00:00
2025-08-04 22:32:22 +00:00
2025-08-15 22:40:14 +00:00
2025-08-04 22:32:22 +00:00
2025-07-07 17:58:32 +00:00
2025-05-23 00:02:01 +00:00
2025-09-12 22:19:41 +00:00
2025-09-27 00:13:18 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-08-27 22:17:05 +00:00
2025-07-07 17:58:32 +00:00
2025-08-26 05:11:45 +00:00
2025-10-17 22:26:28 +00:00
2025-07-08 17:18:58 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-23 23:56:48 +00:00
2025-11-11 18:44:19 +00:00
2024-12-19 20:06:21 +00:00
2025-11-11 23:34:27 +00:00
2025-07-07 17:58:32 +00:00
2025-10-17 19:04:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-08-14 19:53:20 +00:00
2024-12-19 20:06:21 +00:00
2025-10-30 21:39:07 +00:00
2025-10-30 21:39:07 +00:00
2025-10-30 21:39:07 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-07-07 17:58:32 +00:00
2025-09-24 02:04:24 +00:00
2025-02-05 20:51:29 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-10-07 21:05:21 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2024-12-19 20:06:21 +00:00
2025-11-06 13:11:28 +00:00
2025-07-07 17:58:32 +00:00