showcase 0.2.0

  • Installing
  • Versions
  • 48


Pub Package CircleCI

Generate documentation screenshots of your widgets.

Installation #

Add the following to your pubspec.yaml file:

  showcase: <1.0.0

then run:

flutter packages get

Then you can either annotate the widgets you want to have showcased or manually create a test file with multiple widgets:

With annotations #

Add another dependency to your pubspec.yaml file:

  build_runner: ^0.10.0

Just annotate the widgets you want with @Showcased:

import 'package:showcase/showcase.dart';

class MyWidget extends StatelessWidget {
  // ...

The builder will generate a .showcased_test.dart test file for each annotated class file. Just run:

flutter packages pub run build_runner build

Manually testing #

Create a test file with the following:

import 'package:flutter_test/flutter_test.dart';
import 'package:showcase/showcase.dart';

void main() {
  group('Showcase!', () {

Replace the empty list with a collection of widgets. showcaseWidgets also have some options you can tweak.

Then it's just a matter of running flutter test and have your screenshots generated on ./showcase/ (or another output directory you had configured).

Example showcase #

The example app provided generates the following showcase image:


0.2.0 #

0.1.0 #

  • Beta. Use with caution, lots of missing features.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  showcase: ^0.2.0

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter packages get

Alternatively, your editor might support 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:showcase/showcase.dart';
Version Uploaded Documentation Archive
0.2.0 Oct 15, 2018 Go to the documentation of showcase 0.2.0 Download showcase 0.2.0 archive
0.1.0 Oct 7, 2018 Go to the documentation of showcase 0.1.0 Download showcase 0.1.0 archive
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]
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.13


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

The package description is too short. (-9 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
build >=0.12.6 <2.0.0 1.1.1
flutter_test 0.0.0
source_gen ^0.9.0 0.9.4+1
Transitive dependencies
analyzer 0.35.1
args 1.5.1
async 2.0.8
boolean_selector 1.0.4
charcode 1.1.2
collection 1.14.11
convert 2.1.1
crypto 2.0.6
csslib 0.14.6
dart_style 1.2.3
flutter 0.0.0
front_end 0.1.11
glob 1.1.7
html 0.13.3+3
kernel 0.3.11
logging 0.11.3+2
matcher 0.12.3+1 0.12.4
meta 1.1.6 1.1.7
package_config 1.0.5
path 1.6.2
pedantic 1.4.0
plugin 0.2.0+3
pub_semver 1.4.2
quiver 2.0.1
sky_engine 0.0.99
source_span 1.5.3 1.5.4
stack_trace 1.9.3
stream_channel 1.6.8
string_scanner 1.0.4
term_glyph 1.1.0
test_api 0.2.2
typed_data 1.1.6
utf 0.9.0+5
vector_math 2.0.8
watcher 0.9.7+10
yaml 2.1.15
Dev dependencies
test ^1.0.0