Viewing version 2.0.0-nullsafety.0. Open the latest package page.
transparent_image
2.0.0-nullsafety.0A transparent image in Dart code, represented as a Uint8List.
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
Changelog
Changelog
2.0.0-nullsafety.0
- Transparent image is even stronger. It has achieved null safety. Thanks @renefloor!!!
1.0.0
- Transparent image is strong. Therefore, 1.0.
0.1.0
- It's a transparent image!
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'transparent_image:2.0.0-nullsafety.0'pubspec.yaml
name: transparent_image
description: A transparent image in Dart code, represented as a Uint8List.
version: 2.0.0-nullsafety.0
homepage: https://github.com/brianegan/transparent_image
environment:
sdk: '>=2.12.0-0 <3.0.0'
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.1.0 | Cached · Upstream SHA-256 matched | Download | 3a887ed3…8c1704 |
| 1.0.0 | Cached · Upstream SHA-256 matched | Download | 0a9a2f3a…5224d7 |
| 2.0.0-nullsafety.0 | Cached · Upstream SHA-256 matched | Download | 2c968af7…8b98db |
| 2.0.0 | Cached · Upstream SHA-256 matched | Download | e566a616…0f8dec |
| 2.0.1 | Cached · Upstream SHA-256 matched | Download | e8991d95…4ca02f |
Dependencies
No direct dependencies declared.