angular_recaptcha 0.1.3

  • Readme
  • Changelog
  • Installing
  • 66

Angular Recaptcha (Dart) #

How to use #

Add to pubspec.yaml #

# If you are running angular `v5`
angular_recaptcha: ^0.1.1
# If you are still running angular `v4`
# angular_recaptcha: ^0.0.8
# If you are still running angular `v2` or `v3`,
# then you need to use: 
# angular_recaptcha: "0.0.6"` 

then

pub get

Add to index.html #

Deprecated Adding the script tag is no more necessary

<script src="https://www.google.com/recaptcha/api.js?render=explicit"></script>

Use it #

<angular-recaptcha [(ngModel)]="value" key="YOUR_KEY" auto-render></angular-recaptcha>

Options #

Support ngModel for Form validation.

@Inputs #

  • String size: Support "normal" or "compact"
  • String key: Your sitekey
  • String theme: Support "light" or "dark"
  • String type: Support "image" or "audio"
  • bool autoRender: will render the captchat automatically when ready
  • String tabindex

@Outputs #

  • expire: notify when the token is expired, we also set value to null

Getter #

  • value: get the value of the captcha

Functions #

  • render(): manually render the captcha
  • reset(): manually reset the captcha

More documentations

More #

import 'package:angular/angular.dart';
import 'package:angular_recaptcha/angular_recaptcha.dart';

@Component(
    selector: 'app',
    template: '''
        <angular-recaptcha [(ngModel)]="value" key="YOUR_KEY" [(ngModel)]="value" auto-render></angular-recaptcha>
        ''',
    directives: const [AngularRecaptcha, formDirectives ]
)
class AppComponent {
  String value;
}

0.1.3 #

  • Dart 2 and Angular 5 stable

0.0.10 #

  • Deprecated

    • Adding the script tag is no more necessary
  • Breaking Changes

    • num render() is now returning a Future, Future<num> render()

0.0.9 #

  • Add documentation
  • fix ddc
  • Breaking Changes
    • If you want to use ngModel you have to import formDirectives from angular_forms

0.0.8 #

  • update value when expire

0.0.7 #

  • Upgraded to angular v4.0.0
  • Added Changelog

0.0.1 #

  • Initial version

Use this package as a library

1. Depend on it

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


dependencies:
  angular_recaptcha: ^0.1.3

2. Install it

You can install packages from the command line:

with pub:


$ pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:angular_recaptcha/angular_recaptcha.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
59
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
33
Overall:
Weighted score of the above. [more]
66
Learn more about scoring.

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

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: web

Primary library: package:angular_recaptcha/angular_recaptcha.dart with components: html, js.

Health suggestions

Fix lib/angular_recaptcha.dart. (-0.50 points)

Analysis of lib/angular_recaptcha.dart reported 1 hint:

line 93 col 3: Avoid return types on setters.

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 (angular).

Package is getting outdated. (-27.40 points)

The package was last published 66 weeks ago.

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.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and angular_recaptcha.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.46.0 <3.0.0
angular ^5.0.0 5.3.1 6.0.0-alpha+1
angular_forms ^2.0.0 2.1.2 2.1.4
dart_browser_loader ^0.0.3 0.0.6+1
js ^0.6.0 0.6.1+1
Transitive dependencies
analyzer 0.35.4 0.39.1
angular_ast 0.5.9 0.5.11
angular_compiler 0.4.3 0.4.5
args 1.5.2
async 2.4.0
build 1.2.2
build_config 0.4.1+1
built_collection 4.3.0
built_value 7.0.0
charcode 1.1.2
checked_yaml 1.0.2
code_builder 3.2.1
collection 1.14.12
convert 2.1.1
crypto 2.1.3
csslib 0.14.6+1 0.16.1
dart_style 1.2.4 1.3.3
fixnum 0.10.11
front_end 0.1.14 0.1.29
glob 1.2.0
intl 0.15.8 0.16.0
json_annotation 3.0.0
kernel 0.3.14 0.3.29
logging 0.11.3+2
matcher 0.12.6
meta 1.1.8
node_interop 1.0.3
node_io 1.0.1+2
package_config 1.1.0
path 1.6.4
pedantic 1.8.0+1
pub_semver 1.4.2
pubspec_parse 0.1.5
quiver 2.1.2+1
source_gen 0.9.4+4 0.9.4+6
source_span 1.5.5
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+12
yaml 2.2.0