Gifs stopped animating in Flutter 3.27.2 and dart 3.6.1

Aperta
#1,003 5 commenti 8 reazioni 0 assegnatari Vedi su GitHub

@thKali ci sta già lavorando.

Dal 6/11/2025.

  • #1029 di @thKali — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
dart, flutter
Ambito
frontend, web-dev

Direzione di ricerca

Inizia con la riproduzione web Flutter fornita usando cached_network_image 3.4.1 con Dart 3.6.1 e Flutter 3.27.2, quindi confrontala con Flutter 3.24.1. Traccia il percorso di caricamento delle immagini e di animazione web di CachedNetworkImage; il lavoro è completato quando lo stesso GIF viene animato invece di apparire come un’immagine statica nelle versioni più recenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

🐛 Bug Report

I tried Flutter SDK 3.27.2 and dart 3.6.1 and found that gifs stopped animations and being displayed as static images on the Flutter web.

Reproduction steps

Set your dart version to 3.6.1 , import cached_network_image: 3.4.1 and run the following code on flutter web.

import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: GifDisplayScreen(),
      debugShowCheckedModeBanner: false,
    );
  }
}

class GifDisplayScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('GIF Display'),
      ),
      body: Center(
        child: Column(
          children: [
            CachedNetworkImage(
              imageUrl: 'https://i.giphy.com/media/lJ98Us9hMJU5dHANtk/200.gif',
              placeholder: (context, url) => const CircularProgressIndicator(),
              errorWidget: (context, url, error) => const Icon(Icons.error),
            ),
          ],
        ),
      ),
    );
  }
}
Expected behavior

Run the same above code using the 3.24.1 and its working fine. It should work the same way.

Flutter Doctor

[✓] Flutter (Channel stable, 3.27.2, on macOS 14.5 23F79 darwin-arm64 (Rosetta), locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
✗ cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/to/macos-android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.3)
[✓] VS Code (version 1.96.1)
[✓] Connected device (4 available)
[✓] Network resources

Platform:

  • Web
Lingua principale
Dart
Stelle
2.6k
Fork
741
Merge medio
3g 7h
PR unite (30g)
6

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Baseflow/flutter_cached_network_image

Tutte le issue di Baseflow/flutter_cached_network_image

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.