remote_color_picker 0.0.1

remote_color_picker #

Flutter widget to manage Color picker UI from a JSON definition

This is a Remote UI plugin.

Usage #

Add the factory to the RemoteManagerWidget:

RemoteManagerWidget(
    parsers: [RemoteColorPickerFactory()],
    child: RemoteWidget(...)
)

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

{
    'type': 'color_picker',
    'id': 'myColor',
    'value': 0XFFFF0000,
},

or inline:

{
    'type': 'color_picker_inline',
    'id': 'myColor',
    'value': 0XFFFF0000,
},

API #

Color picker:

id : id of the widget buttonWidth : width of the color button, default 35, only if not inline buttonHeight: height of the color button, default 35, only if not inline value : hex integer or string representation of a color enableAlpha: enable alpha slider, default true enableLabel: enable label, default true colorPickerWidth: color picker width, default to 300 pickerAreaHeightPercent: picker are height in percent, default 1, double between 0-1 displayThumbColor: display thumb color, default to false paletteType: palette type, default to hsv (0), hsv:0, hsl:1 paletteType: palette type, default to hsv (0), hsv:0, hsl:1

[0.0.1] - 05/06/2019.

  • initial release.

example/README.md

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:


dependencies:
  remote_color_picker: ^0.0.1

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_color_picker/remote_color_picker.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
40
Overall:
Weighted score of the above. [more]
8
Learn more about scoring.

We analyzed this package on Jul 22, 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.3

Platforms

Detected platforms:

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running flutter pub upgrade failed with the following output:

ERR: The current Flutter SDK version is 1.7.8+hotfix.3.
 
 Because remote_color_picker depends on flutter_hooks ^0.5.0 which requires Flutter SDK version >=1.0.0 <1.5.8, version solving failed.

Health suggestions

Format lib/src/parsers/color_picker.dart.

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

Format lib/src/parsers/color_picker_inline.dart.

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

Format lib/src/remote_color_picker.dart.

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

Fix additional 3 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/utils/mixin.dart (Run flutter format to format lib/src/utils/mixin.dart.)
  • lib/src/widgets/color_picker.dart (Run flutter format to format lib/src/widgets/color_picker.dart.)
  • lib/src/widgets/color_picker_inline.dart (Run flutter format to format lib/src/widgets/color_picker_inline.dart.)

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

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.

Dependencies

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

Admin