1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] fontweight and image problem with flutter web

Discussão em 'Mobile' iniciado por Stack, Novembro 13, 2024.

  1. Stack

    Stack Membro Participativo

    I am using flutter web with firebase hosting. Everything is working fine with some exception:

    When I build with: flutter build web --release --web-renderer html the fontWeight is ignored and the images coming from firebase storage are properly loaded. But if I build with flutter build web --release which is the same as flutter build web --release --web-renderer canvaskit the fontWeight is respected but the images are not loaded with the following exception:

    error loading image: ImageCodecException: Failed to load network image.


    How can I get the fontweight and the images to work properly at the same time? Thanks

    firebase.json

    {
    "hosting": {
    "public": "build/web",
    "ignore": [
    "firebase.json",
    "**/.*",
    "**/node_modules/**"
    ],
    "rewrites": [
    {
    "source": "**",
    "destination": "/index.html"
    }
    ],
    "frameworksBackend": {
    "region": "europe-west1"
    }
    }
    }


    index.html

    <!DOCTYPE html>
    <html>
    <head>

    <base href="$FLUTTER_BASE_HREF">

    <meta charset="UTF-8">
    <meta content="IE=Edge" http-equiv="X-UA-Compatible">
    <meta name="description" content="The admin project for my app">

    <!-- iOS meta tags & icons -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="my app">
    <link rel="apple-touch-icon" href="icons/Icon-192.png">

    <!-- Favicon -->
    <link rel="icon" type="image/png" href="favicon.png"/>

    <title>My app</title>
    <link rel="manifest" href="manifest.json">
    </head>
    <body>
    <script src="flutter_bootstrap.js" async></script>
    </body>

    Continue reading...

Compartilhe esta Página