FLUTTER ECOSYSTEM

brianegan/transparent_image

A transparent image in Dart code, represented as a Uint8List.

transparent_image project cover
Stars
104
Forks
13
Last push (UTC)
Jun 30, 2024
Project status
Active
Brian Egan GitHub avatar
GITHUB User

Brian Egan ↗

Montana boy living in the UK.

Lake District, UKOfficial website ↗
LanguagesDart

Packages published by this repository

Original README

English project snapshot. Visit GitHub for the latest content.

Expand / collapse project 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