Questions tagged [flutter-image]

Anything that relates to handle images in Flutter, commonly the usage for Flutter Image component.

Image is a very important part of Flutter, it provides the ability to handle image display, encoding/decoding, and processing.

286 questions
4
votes
4 answers

Can we change camera zoom point in flutter?

I work on a Flutter app in which I use camera plugin. I want to zoom in to an arbitrary point (offset) of the camera preview, for example to the top-left corner of the screen and then take a photo of it. Using CameraContoroller.setZoomLevel() method…
sm_sayedi
  • 326
  • 2
  • 17
4
votes
1 answer

Flutter web build with canvaskit: Failed to load Image.network()

I can't use the image URL from my domain but I can use the image URL from another domain like Facebook. The error is: It happened when putting the image URL from StackOverflow in the Image.network() too. For example, try using the picture…
4
votes
1 answer

Consider resizing the asset ahead of time, supplying a cacheWidth parameter and cacheHeight parameter

I'm new to flutter, I'm using flutter web. and trying to apply and backdrop filter to an image. this is my code : import 'dart:ui'; import 'package:flutter/material.dart'; class WebsiteBackground extends StatelessWidget { const…
Abel
  • 1,337
  • 1
  • 8
  • 16
4
votes
1 answer

How to get size of a child Widget

I have a special requirement to allow for a header widget, usually containing static content to appear at the top of a scroll view. The scroll view should overlap the header widget so that a clip shape can be used for effect. I've achieved this…
Pheepster
  • 6,045
  • 6
  • 41
  • 75
4
votes
0 answers

Flutter: Is the file an image or not?

I want to load all the images that are in a given directory and exclude all files that are not images. I don't want to simply check for extensions because different conventions exist like ".jpg" and "jpeg" and because I don't want to manually add…
Rednaxelus
  • 111
  • 2
  • 10
4
votes
2 answers

Flutter web canvaskit renderer not showing Network images

I have A list of Images.network("$imgUrl") in my flutter app It works fine on phones (Android and IOS even on phone Browsers) but it does not work on desktop browser. however images are shown when i use flutter build web --web-renderer html should'n…
Mahmood Bkh
  • 499
  • 2
  • 4
  • 15
4
votes
1 answer

image_picker crash in android app - Flutter App

First of all, I tried this answer but the issue still going, and I tried it on the new emulator, on a real device but I couldn't fix it. And it works on IOS successfully. Okay let's look issue: First step is working, so going to the gallery I am…
4
votes
1 answer

Flutter pre-cache images

I'm working on a Flutter project where I want to pre-cache images at the start of the app. The idea is when you start the app the first time, it downloads a list of images either cache / stored in DB / stored in local storage / or any other viable…
3
votes
1 answer

Flutter Image.network() keeps crashing in AnimatedList if there is no Internet connection

In my Flutter app, I use a Image.network() widget as follows to display an image: Image.network( url, errorBuilder: (context, error, stacktrace) => Container(color: Colors.red), width: 80, height: 80, cacheWidth: 80, cacheHeight:…
matteoh
  • 2,810
  • 2
  • 29
  • 54
3
votes
2 answers

How to show an image preview on top of an existing page in flutter?

I'm building a flutter application in which I have a profile page. On the profile page, users have a profile picture. When the users click on the profile picture, I want to show a preview of the image on the same page. I don't want to navigate to…
Gaurav Raj
  • 186
  • 1
  • 9
3
votes
1 answer

Flutter receives 422 response from Fastapi when posting a PNG file

I have created a working localhost API with FastAPI. The POST takes a PNG, does some image processing and returns a PNG as expected when I click the 'try it out' button in the FastAPI generated docs: The curl post command shows as follows: curl -X…
DaReal
  • 597
  • 3
  • 10
  • 24
3
votes
1 answer

Flutter - How to catch Image.network error when there is no image in the link

Can you help resolve how to catch the exception when the image does not exist in the url given in Image.network widget. I tried it with errorBuilder property..but still throws an exception. Expanded( child: Image.network( …
Sandz
  • 99
  • 3
  • 12
3
votes
2 answers

Reduce size image from bytes Uint8List

I am using the file_picker package to import images before uploading them to Firebase Storage, because it allows me to choose the formats what is not possible with image_picker. I would like to be able to reduce the size of these images to reduce…
Lab
  • 1,237
  • 2
  • 13
  • 30
3
votes
2 answers

Flutter Image not being displayed

So I'm trying to make a page with an image background and this is my code: body: Container( decoration: BoxDecoration( image: DecorationImage( image: AssetImage("loginBackground"), ), ) …
LWB
  • 426
  • 1
  • 4
  • 16
3
votes
1 answer

How to get or pick local GIF file from device

I have done lots of R&D about the pick-only GIF file and all give results only display or showing GIF files but I want to only pick GIF files from a local device like images or videos.
1
2
3
18 19