Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Image.network
- sqlite
- FutureBuilder
- Snackbar
- AppBar
- 반석천
- navigator
- flutter
- Column Widget
- Flutter Tutorial
- InkWell
- Flutter 앱 배포
- MainAxisAlignment
- Scaffold
- Row
- ListView.builder
- Networking
- Row Widget
- node.js
- Flutter 강좌
- Flutter Example
- Load Image
- HTTP
- listview
- Flutter 예제
- ListTile
- WillPopScope
- Hello World
- CrossAxisAlignment
- Cached Image
Archives
- Today
- Total
꿈꾸는 시스템 디자이너
Flutter Example - Handle Image | FadeIn Image | transparent_image plugin 본문
Tutorial/Flutter with App
Flutter Example - Handle Image | FadeIn Image | transparent_image plugin
독행소년 2019. 10. 7. 13:08* About PlugIn
https://pub.dev/packages/transparent_image
transparent_image | Dart Package
A transparent image in Dart code, represented as a Uint8List.
pub.dev
1. Add this to pubspec.yaml file
dependencies:
transparent_image: ^1.0.0
3. Source Code
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:transparent_image/transparent_image.dart';
class LoadFadeInImageFromNetwork extends StatelessWidget {
String url = "https://picsum.photos/300?${Random().nextInt(100)}";
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("Load Image From Network")),
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
height: 300,
child: Stack(
alignment: Alignment(0, 0),
children: <Widget>[
Center(
child: CircularProgressIndicator(),
),
Center(
child: FadeInImage.memoryNetwork(
placeholder: kTransparentImage,
image: url,
),
),
],
),
),
Text(url),
Container(
decoration: BoxDecoration(color: Colors.orangeAccent),
margin: const EdgeInsets.all(15),
padding: const EdgeInsets.all(15),
child: Text(
"* Loading a network image takes time to download the image data.",
style: TextStyle(color: Colors.white),
),
)
],
),
);
}
}

▶ Go to Table of Contents | 강의 목차로 이동
※ This example is also available in the Flutter Code Examples app. | 본 예제는 Flutter Code Examples 앱에서도 제공됩니다.
Flutter Code Examples - Google Play 앱
Are you a beginner at Flutter? Check out the various features of Flutter through the demo. Source code for all demos is also provided.
play.google.com