title: How to displays image assets while migration a flutter app to flutter web?
body: <p><a href="https://i.stack.imgur.com/x4AEp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x4AEp.png" alt="enter image description here"></a> Trying to migrate an shrine app to flutter web but while migration unable to display images (shrine logo placed in the assets folder) at <strong>localhost</strong> the asserts folder containing images are placed in the web folder as explained in the <a href="https://github.com/flutter/flutter_web/blob/master/docs/migration_guide.md#webassets-optional" rel="nofollow noreferrer">Flutter Web migration guide</a> and updated the dart code with the correct path but it still doesn't displays the images. </p>
  
  <p>kindly provide a solution thank you!</p>
  
  <p><a href="https://i.stack.imgur.com/yvROZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yvROZ.png" alt="assets path image"></a></p>
  
  <p>login.dart</p>
  
  <pre><code>import 'package:flutter_web/material.dart';
  
      class LoginPage extends StatefulWidget {
        @override
        _LoginPageState createState() =&gt; _LoginPageState();
      }
  
      class _LoginPageState extends State&lt;LoginPage&gt; {
        // TODO: Add text editing controllers (101)
        final _usernameController = TextEditingController();
        final _passwordController = TextEditingController();
        // TODO: Add text editing controllers (101)
        @override
        Widget build(BuildContext context) {
          return Scaffold(
            body: SafeArea(
              child: ListView(
                padding: EdgeInsets.symmetric(horizontal: 24.0),
                children: &lt;Widget&gt;[
                  SizedBox(height: 80.0),
                  Column(
                    children: &lt;Widget&gt;[
                      Image.asset('web/assets/diamond.png'),
                      SizedBox(height: 16.0),
                      Text('SHRINE'),
                    ],
                  ),
                  SizedBox(height: 120.0),
                  // TODO: Wrap Username with AccentColorOverride (103)
                  // TODO: Remove filled: true values (103)
                  // TODO: Wrap Password with AccentColorOverride (103)
                  // TODO: Add TextField widgets (101)
                  // [Name]
                  TextField(
                    controller: _usernameController,
                    decoration: InputDecoration(
                        filled: true,
                        border: OutlineInputBorder(),
                        labelText: 'Username'),
                  ),
                  SizedBox(
                    height: 12.0,
                  ),
                  // [Password]
                  TextField(
                    controller: _passwordController,
                    decoration: InputDecoration(
                      filled: true,
                      border: OutlineInputBorder(),
                      labelText: 'Password',
                    ),
                    obscureText: true,
                  ),
                  // TODO: Add button bar (101)
                  ButtonBar(
                    children: &lt;Widget&gt;[
                      // Todo Add buttons (101)
                      RaisedButton(
                        child: Text('Cancel'),
                          onPressed: () {
                            // TODO: Clear the text fields (101)
                            _usernameController.clear();
                            _passwordController.clear();
                          }
                      ),
                      // TODO: Add an elevation to NEXT (103)
                      // TODO: Add a beveled rectangular border to NEXT (103)
                      RaisedButton(
                        child: Text('NEXT'),
                        onPressed: () {
                          // TODO: Show the next page (101)
                          Navigator.pop(context);
                        },
                      ),
                    ],
                  ),
                ],
              ),
            ),
          );[enter image description here][1]
        }
      }
  
      // TODO: Add AccentColorOverride (103)
  </code></pre>