undraw 1.0.2

undraw/UnDraw #

UnDraw is a Flutter widget that provides 700+ illustrations, designed by Katerina Limpitsouni and developed by westdabestdb.

Getting Started #

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

...
dependencies:
  undraw: ^1.0.2

Now in your Dart code, you can use:

import 'package:undraw/undraw.dart';

Usage #

UnDraw(
  color: Colors.red,
  illustration: UnDrawIllustration.mobile_application,
  placeholder: Text("Illustration is loading..."), //optional, default is the CircularProgressIndicator().
  errorWidget: Icon(Icons.error_outline, color: Colors.red, size: 50), //optional, default is the Text('Could not load illustration!').
)

[1.0.2]

  • Add errorWidget: This widget will be displayed when the future completes with an error. The default is a Text with an error message.
  • Update the example to show a sample usage of errorWidget.
  • Update example/pubspec.yaml to use a relative path of the package. This eliminates the need to update it with every release and allows to test the example app while developing and updating the package.
  • Make getSvgString private since its only supposed to be used internally by the package and shouldn't be exposed as a public API.
  • Use a constrained dependency for flutter_svg, which is the recommended way. This will increase the package's maintenance score to 100

[1.0.1]

  • Example app fix.
  • Maintenance.

[1.0.0]

  • Initial major release.

example/README.md

demo #

A new Flutter project.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

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


dependencies:
  undraw: ^1.0.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:undraw/undraw.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
76
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]
86
Learn more about scoring.

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

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-0.98 points)

1582 out of 1583 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 issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (flutter_svg).

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
flutter_svg ^0.13.1 0.13.1 0.14.0
http ^0.12.0+2 0.12.0+2
Transitive dependencies
async 2.3.0
charcode 1.1.2
collection 1.14.11 1.14.12
convert 2.1.1
http_parser 3.1.3
meta 1.1.6 1.1.7
path 1.6.4
path_drawing 0.4.1
path_parsing 0.1.4
pedantic 1.8.0+1
petitparser 2.4.0
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
xml 3.5.0
Dev dependencies
flutter_test