Simple Object Schema Validation for Flutter
Getting Started #
This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
[0.0.1] - TODO: Add release date.
- TODO: Describe initial release.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: easy_validator: ^0.0.2
2. Install it
You can install packages from the command line:
$ 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:
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]
We analyzed this package on Oct 18, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.5.1
- pana: 0.12.21
- Flutter: 1.9.1+hotfix.4
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
flutter format to format
Maintenance issues and suggestions
dartdoc successfully runs on your package's source files. (-10 points)
exitCode: 255 stdout: parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/base/schema.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/base/validation_exception.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/base/rule.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/easy_validator.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/rules/string/lowercase_rule.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/rules/string/length_rule.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/rules/string/email_rule.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/rules/string/url_rule.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/rules/string/max_rule.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/rules/string/pattern_rule.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/rules/string/uppercase_rule.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/rules/string/min_rule.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/rules/date/max_rule.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/rules/date/min_rule.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/rules/mixed/not_one_of_rule.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/rules/mixed/required_rule.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/rules/mixed/one_of_rule.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/rules/mixed/type_rule.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/rules/list/max_rule.dart... parsing /tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/rules/list/min_rule.dart... [...] Generating docs for library min_rule from package:easy_validator/rules/number/min_rule.dart... Generating docs for library min_rule from package:easy_validator/rules/date/min_rule.dart... Generating docs for library min_rule from package:easy_validator/rules/string/min_rule.dart... Generating docs for library min_rule from package:easy_validator/rules/list/min_rule.dart... Generating docs for library more_than_rule from package:easy_validator/rules/number/more_than_rule.dart... Generating docs for library negative_rule from package:easy_validator/rules/number/negative_rule.dart... Generating docs for library not_equal_rule from package:easy_validator/rules/number/not_equal_rule.dart... Generating docs for library not_one_of_rule from package:easy_validator/rules/mixed/not_one_of_rule.dart... Generating docs for library number_schema from package:easy_validator/schemas/number_schema.dart... Generating docs for library one_of_rule from package:easy_validator/rules/mixed/one_of_rule.dart... Generating docs for library pattern_rule from package:easy_validator/rules/string/pattern_rule.dart... Generating docs for library positive_rule from package:easy_validator/rules/number/positive_rule.dart... Generating docs for library required_rule from package:easy_validator/rules/mixed/required_rule.dart... Generating docs for library rule from package:easy_validator/base/rule.dart... Generating docs for library schema from package:easy_validator/base/schema.dart... Generating docs for library string_schema from package:easy_validator/schemas/string_schema.dart... Generating docs for library type_rule from package:easy_validator/rules/mixed/type_rule.dart... Generating docs for library uppercase_rule from package:easy_validator/rules/string/uppercase_rule.dart... Generating docs for library url_rule from package:easy_validator/rules/string/url_rule.dart... Generating docs for library validation_exception from package:easy_validator/base/validation_exception.dart... stderr: Documenting easy_validator... warning: no canonical library found for bool_schema.BoolSchema.hashCode, not linking, from bool_schema.BoolSchema.hashCode: (file:///flutter/bin/cache/pkg/sky_engine/lib/core/object.dart) warning: no canonical library found for bool_schema.BoolSchema.runtimeType, not linking, from bool_schema.BoolSchema.runtimeType: (file:///flutter/bin/cache/pkg/sky_engine/lib/core/object.dart) warning: no canonical library found for bool_schema.BoolSchema.noSuchMethod, not linking, from bool_schema.BoolSchema.noSuchMethod: (file:///flutter/bin/cache/pkg/sky_engine/lib/core/object.dart:109:20) warning: no canonical library found for bool_schema.BoolSchema.toString, not linking, from bool_schema.BoolSchema.toString: (file:///flutter/bin/cache/pkg/sky_engine/lib/core/object.dart:97:19) warning: no canonical library found for bool_schema.BoolSchema.==, not linking, from bool_schema.BoolSchema.==: (file:///flutter/bin/cache/pkg/sky_engine/lib/core/object.dart:60:26) warning: easy_validator has no library level documentation comments, from easy_validator: (file:///tmp/pub-dartlang-dartdocWRMMIS/pkg/lib/easy_validator.dart:1:8) Unhandled exception: RangeError (start): Invalid value: Only valid value is 0: 1 #0 _StringBase.indexOf (dart:core-patch/string_patch.dart:336:7) #1 String.indexOf (dart:core-patch/string_patch.dart:1028:18) #2 _createLineNumbersMap (package:dartdoc/src/line_number_cache.dart:30:23) #3 LineNumberCache.lineAndColumn.
The package description is too short. (-17 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.
Maintain an example.
None of the files in the package's
example/ directory matches known example patterns.
Common filename patterns include
easy_validator.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.