Skip to content

Re-load assets when hot-reloading in a web browser #137265

Description

@johnpryan

Update May 27, 2026

Missing bits

  • Fonts
  • Shaders

Although these should work with hot restart

Use case

Hot-reload on the web doesn't reload assets. It would be great if we could improve the development cycle, since it could make working with shaders easier for Flutter web apps. It's probably not as common to edit images but this would be great to support too.

Steps to reproduce

  1. Create a flutter app with an image or shader asset
flutter:
  uses-material-design: true
  assets:
    - assets/images/image.jpg
  shaders:
    - assets/shaders/visualizer.frag
  1. Use the image or shader in main.dart:
import 'package:flutter/material.dart';

void main() {
  runApp(TestApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Image.asset('assets/images/image.jpg'),
        ),
      ),
    );
  }
}
  1. Run the app in a web browser
  2. Replace the image or update the shader
  3. Click hot restart in your IDE or press 'r' in the console
  4. Observe the image or shader doesn't change.

Proposal

Re-load assets when when hot-restarting in a web browser

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: assetsPackaging, accessing, or using assetsc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterplatform-webWeb applications specificallyt: hot reloadReloading code during "flutter run"team-webOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions