Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brianegan/transparent_image
A transparent image in Dart code, represented as a Uint8List.
https://github.com/brianegan/transparent_image
Last synced: 6 days ago
JSON representation
A transparent image in Dart code, represented as a Uint8List.
- Host: GitHub
- URL: https://github.com/brianegan/transparent_image
- Owner: brianegan
- License: mit
- Created: 2018-02-23T13:03:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-30T06:53:01.000Z (4 months ago)
- Last Synced: 2024-10-18T22:46:06.031Z (17 days ago)
- Language: Dart
- Size: 11.7 KB
- Stars: 106
- Watchers: 4
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-star - transparent_image
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.
```dart
Image.memory(kTransparentImage);
```### ImageProvider
```dart
MemoryImage(kTransparentImage);
```### FadeInImage Widget
A more useful example, and the reason I originally extracted this from the
Flutter codebase!A [complete
example](https://flutter.dev/docs/cookbook/images/fading-in-images#in-memory)
can be seen on the Flutter website.```dart
FadeInImage.memoryNetwork(
placeholder: kTransparentImage,
image: 'https://picsum.photos/250?image=9',
),
);
```## Contributors
* Flutter team
* Brian Egan