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 :)
This package exports one constant:
Image Widget #
Displays the transparent image.
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', ), );
- Flutter team
- Brian Egan
- Transparent image is strong. Therefore, 1.0.
- It's a transparent image!
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: transparent_image: ^1.0.0
2. Install it
You can install packages from the command line:
$ pub get
$ flutter pub get
Alternatively, your editor might support
pub get or
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Mar 24, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.1
- pana: 0.13.6
Health issues and suggestions
Document public APIs. (-1 points)
2 out of 2 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.
lib/transparent_image.dart. (-0.50 points)
lib/transparent_image.dart reported 1 hint:
line 5 col 37: Unnecessary new keyword.
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
transparent_image.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.
Package is getting outdated. (-3.56 points)
The package was last published 54 weeks ago.
|Dart SDK||>=1.24.1 <3.0.0|