angular_grecaptcha 0.0.4

  • Installing
  • Versions
  • 5

AngularDart Google ReCaptcha component #

Installation #

Put following lines in pubspec.yaml:

  angular_grecaptcha: ^0.0.4


pub get

Basic usage #

import 'package:angular_grecaptcha/angular_grecaptcha.dart';
  selector: 'my-component',
  template: '''
    <g-recaptcha sitekey="YOUR SITEKEY"></g-recaptcha>
  directives: const [AngularRecaptcha]
class MyComponent {}

Besides mandatory sitekey parameter you can add optional render parameters:

  • sitekey: String -- Your sitekey
  • theme: String -- Optional. The color theme of the widget. Values: light | dark. Default: light.
  • type: String -- Optional. The type of CAPTCHA to serve. Values: audio | image. Default: image.
  • size: String -- Optional. The size of the widget. Values: compact | normal. Default: normal.
  • tabindex: int -- Optional. The tabindex of the widget and challenge. If other elements in your page use tabindex, it should be set to make user navigation easier. Default: 0
  • callback: Function -- Optional. The name of your callback function to be executed when the user submits a successful CAPTCHA response. The user's response, g-recaptcha-response, will be the input for your callback function.
  • expired-callback: Function -- Optional. The name of your callback function to be executed when the recaptcha response expires and the user needs to solve a new CAPTCHA.

Original parameters description you can find here

Advanced usage example #

Advanced usage example you can find here

Important information #

This component allows to get ReCaptcha response and post it to a back-end server, where the response is to be verified as described here. The component is not responsible for the verification.

0.0.4 #

Added grecaptcha.execute() support

0.0.3 #

Fixed the bug when the ReCaptcha was not rendered after navigating via an Angular Routing Link to a component containing the ReCaptcha

0.0.2 #

  • Now api.js is loaded automatically only if it has not been loaded before
  • A little refactoring
  • Enhanced documentation
  • Several bug fixes

0.0.1 #

AngularDart Google ReCaptcha component released

Use this package as a library

1. Depend on it

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

  angular_grecaptcha: ^0.0.4

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_grecaptcha/angular_grecaptcha.dart';
Version Uploaded Documentation Archive
0.0.4 Dec 20, 2017 Go to the documentation of angular_grecaptcha 0.0.4 Download angular_grecaptcha 0.0.4 archive
0.0.3 Nov 7, 2017 Go to the documentation of angular_grecaptcha 0.0.3 Download angular_grecaptcha 0.0.3 archive
0.0.2 Oct 24, 2017 Go to the documentation of angular_grecaptcha 0.0.2 Download angular_grecaptcha 0.0.2 archive
0.0.1 Oct 20, 2017 Go to the documentation of angular_grecaptcha 0.0.1 Download angular_grecaptcha 0.0.1 archive
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.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see

Maintenance issues and suggestions

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

Dependencies were not resolved.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0