remote_image_button 0.0.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 32

remote_image_button #

Flutter widget to manage an image button UI from a JSON definition

This is a Remote UI plugin.

Usage #

Add the factory to the RemoteManagerWidget:

    parsers: [RemoteImageButtonFactory()],
    child: RemoteWidget(...)

RemoteImageButtonFactory can take a base url provider function, in case you definition contains only /image/on.jpg the base url will be taken from the provider

Then you can provide a JSON representation of a color picker like this:

    'type': 'image_button',
    'id': 'myButton',
    'value': 'on',
    'values': {
      'on': '',
      'off': '',


Image button:

id : id of the widget value : current value, it has to match one of the values entries width : width of the button height: height of the button fit: fit, default to contain (1), see BoxFit for more padding: padding of the button, see EdgeInsets definition values: map of possible value

[0.0.1] - 05/06/2019.

  • initial release.


example #

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:

  remote_image_button: ^0.0.3

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ 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:

import 'package:remote_image_button/remote_image_button.dart';
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 Dec 4, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6


Detected platforms:

Low code quality prevents platform classification.

Health issues and suggestions

Fix lib/src/widgets/image_svg_web.dart. (-68.36 points)

Analysis of lib/src/widgets/image_svg_web.dart failed with 4 errors:

line 2 col 8: Target of URI doesn't exist: 'dart:html'.

line 34 col 10: The name 'platformViewRegistry' is being referenced through the prefix 'ui', but it isn't defined in any of the libraries imported using that prefix.

line 35 col 25: The method 'ImageElement' isn't defined for the class 'ImageSvgWeb'.

line 41 col 12: The method 'HtmlElementView' isn't defined for the class 'ImageSvgWeb'.

Document public APIs. (-1 points)

5 out of 5 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.

Format lib/src/parsers/image_button.dart.

Run flutter format to format lib/src/parsers/image_button.dart.

Format lib/src/remote_image_button.dart.

Run flutter format to format lib/src/remote_image_button.dart.

Fix additional 4 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/widgets/image_button.dart (Run flutter format to format lib/src/widgets/image_button.dart.)
  • lib/src/widgets/image_svg.dart (Run flutter format to format lib/src/widgets/image_svg.dart.)
  • lib/src/widgets/image_svg_base.dart (Run flutter format to format lib/src/widgets/image_svg_base.dart.)
  • lib/src/widgets/image_svg_io.dart (Run flutter format to format lib/src/widgets/image_svg_io.dart.)

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Low code quality prevents platform classification.

Support latest dependencies. (-20 points)

The version constraint in pubspec.yaml does not support the latest published versions for 2 dependencies (flutter_hooks, flutter_svg).

The package description is too short. (-20 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 is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
flutter_hooks ^0.6.0 0.6.1 0.7.0
flutter_svg ^0.14.1 0.14.4 0.15.0
remote_ui ^0.0.4 0.0.6
Transitive dependencies
charcode 1.1.2
collection 1.14.11 1.14.12
convert 2.1.1
meta 1.1.7 1.1.8
path_drawing 0.4.1
path_parsing 0.1.4
petitparser 2.4.0
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
xml 3.5.0 3.6.0
Dev dependencies