FLUTTER ECOSYSTEM

brianegan/transparent_image

Dart 代码中表示为 Uint8List 的透明图像。

transparent_image 项目封面
Stars
104
Forks
13
最近推送(UTC)
2024年6月30日
项目状态
未归档
Brian Egan GitHub avatar
GITHUB User

Brian Egan ↗

Montana boy living in the UK.

Lake District, UK官方网站 ↗
语言Dart

此仓库发布的插件

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

transparent_image

A simple transparent image. Represented as a Uint8List, which was originally extracted from the Flutter codebase (was private in the test package).

It's a silly, simple library, but I found I needed transparent images in a few projects and found this is the simplest way to represent it :)

Usage

This package exports one constant: kTransparentImage.

Image Widget

Displays the transparent image.

Image.memory(kTransparentImage);
ImageProvider
MemoryImage(kTransparentImage);
FadeInImage Widget

A more useful example, and the reason I originally extracted this from the Flutter codebase!

A complete example can be seen on the Flutter website.

FadeInImage.memoryNetwork(
    placeholder: kTransparentImage,
    image: 'https://picsum.photos/250?image=9',
  ),
);

Contributors

  • Flutter team
  • Brian Egan