transparent_image 1.0.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 97

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);

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 #

1.0.0 #

  • Transparent image is strong. Therefore, 1.0.

0.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:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:transparent_image/transparent_image.dart';
  
Version Uploaded Documentation Archive
1.0.0 Mar 12, 2019 Go to the documentation of transparent_image 1.0.0 Download transparent_image 1.0.0 archive
0.1.0 Feb 23, 2018 Go to the documentation of transparent_image 0.1.0 Download transparent_image 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
98
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
97
Learn more about scoring.

We analyzed this package on Mar 12, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:transparent_image/transparent_image.dart.

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.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and transparent_image.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.24.1 <3.0.0