nexmo_verify 1.0.1

nexmo_verify #

A Nexmo Verify Rest API Flutter plugin.

How can use it? #

1. Create instance of Nexmo API handler and put apiKey and apiSecret. After that implement callbacks methods. #

 NexmoSmsVerificationUtil _nexmoSmsVerificationUtil = NexmoSmsVerificationUtil();
    _nexmoSmsVerificationUtil.initNexmo("apiKey", "apiSecret");
    _nexmoSmsVerificationUtil.addCallback(this);

2. Send otp to mobile number. #

_nexmoSmsVerificationUtil
          .sendOtp(_teCountryCode.text + _teMobileNumber.text, "Flutter")
          .then((dynamic res) {
        nexmoSuccess((res as BaseModel).nexmoResponse);
      });

3. Verify otp. #

_nexmoSmsVerificationUtil
          .verifyOtp("OTP")
          .then((dynamic res) {});

0.0.1 #

  • TODO: Describe initial release.

example/README.md

nexmo_verify_example #

Demonstrates how to use the nexmo_verify plugin.

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:
  nexmo_verify: ^1.0.1

2. Install it

You can install packages from the command line:

with Flutter:


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


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

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

  • Dart: 2.5.0
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

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

Fix lib/model/nexmo_response.dart. (-1.99 points)

Analysis of lib/model/nexmo_response.dart reported 4 hints:

line 7 col 10: Name non-constant identifiers using lowerCamelCase.

line 9 col 10: Name non-constant identifiers using lowerCamelCase.

line 11 col 23: Name non-constant identifiers using lowerCamelCase.

line 11 col 53: Name non-constant identifiers using lowerCamelCase.

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

Analysis of lib/app_exception.dart reported 1 hint:

line 3 col 7: The value of the field '_statusCode' isn't used.

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

Analysis of lib/networ_util.dart reported 1 hint:

line 9 col 16: Name non-constant identifiers using lowerCamelCase.

Fix additional 4 files with analysis or formatting issues. (-0.50 points)

Additional issues in the following files:

  • lib/nexmo_sms_verify.dart (1 hint)
  • lib/basemodel.dart (Run flutter format to format lib/basemodel.dart.)
  • lib/model/nexmo_response.g.dart (Run flutter format to format lib/model/nexmo_response.g.dart.)
  • lib/nexmo_verify.dart (Run flutter format to format lib/nexmo_verify.dart.)

Maintenance issues and suggestions

Support latest dependencies. (-20 points)

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

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
build_runner ^1.1.2 1.7.1
flutter 0.0.0
http ^0.12.0 0.12.0+2
json_annotation ^2.0.0 2.3.0 3.0.0
json_serializable ^2.0.0 2.3.0 3.2.2
Transitive dependencies
analyzer 0.36.4 0.38.3
args 1.5.2
async 2.3.0
build 1.2.0
build_config 0.4.1+1
build_daemon 2.1.0
build_resolvers 1.0.8
build_runner_core 4.1.0
built_collection 4.2.2
built_value 6.7.1
charcode 1.1.2
checked_yaml 1.0.2
code_builder 3.2.0
collection 1.14.11 1.14.12
convert 2.1.1
crypto 2.1.3
csslib 0.16.1
dart_style 1.2.9 1.2.10
fixnum 0.10.9
front_end 0.1.19 0.1.25
glob 1.1.7
graphs 0.2.0
html 0.14.0+2
http_multi_server 2.1.0
http_parser 3.1.3
io 0.3.3
js 0.6.1+1
kernel 0.3.19 0.3.25
logging 0.11.3+2
matcher 0.12.5
meta 1.1.7
mime 0.9.6+3
package_config 1.1.0
package_resolver 1.0.10
path 1.6.4
pedantic 1.8.0+1
pool 1.4.0
pub_semver 1.4.2
pubspec_parse 0.1.5
quiver 2.0.5
shelf 0.7.5
shelf_web_socket 0.2.3
sky_engine 0.0.99
source_gen 0.9.4+4
source_span 1.5.5
stack_trace 1.9.3
stream_channel 2.0.0
stream_transform 0.0.19
string_scanner 1.0.5
term_glyph 1.1.0
timing 0.1.1+2
typed_data 1.1.6
vector_math 2.0.8
watcher 0.9.7+12
web_socket_channel 1.0.15
yaml 2.2.0
Dev dependencies
flutter_test