Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

docs.flutter.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.

Learn more

Flutter 3.41 is live! Check out theFlutter 3.41 blog post!

Display images from the internet

How to display images from the internet.

Displaying images is fundamental for most mobile apps. Flutter provides theImage widget to display different types of images.

To work with images from a URL, use theImage.network() constructor.

dart
Image.network('https://picsum.photos/250?image=9'),

Bonus: animated gifs

#

One useful thing about theImage widget: It supports animated gifs.

dart
Image.network('https://docs.flutter.dev/assets/images/dash/dash-fainting.gif',);

Image fade in with placeholders

#

The defaultImage.network constructor doesn't handle more advanced functionality, such as fading images in after loading. To accomplish this task, check outFade in images with a placeholder.

Interactive example

#
import 'package:flutter/material.dart';void main() => runApp(const MyApp());class MyApp extends StatelessWidget {  const MyApp({super.key});  @override  Widget build(BuildContext context) {    var title = 'Web Images';    return MaterialApp(      title: title,      home: Scaffold(        appBar: AppBar(title: Text(title)),        body: Image.network('https://picsum.photos/250?image=9'),      ),    );  }}
Was this page's content helpful?

Unless stated otherwise, the documentation on this site reflects Flutter 3.38.6. Page last updated on 2025-10-28.View source orreport an issue.


[8]ページ先頭

©2009-2026 Movatter.jp