free_mobile 7.1.0

Free Mobile for Dart #

Runtime Release License Coverage Build

Send SMS messages to your Free Mobile account, in Dart.

Documentation #

Development #

License #

Free Mobile for Dart is distributed under the MIT License.

Changelog #

Version 7.1.0

  • Raised the Dart SDK constraint.
  • Updated the package dependencies.

Version 7.0.0

  • Breaking change: replaced the RequestEvent class by the http.Request and http.Response classes.
  • Raised the Dart SDK constraint.
  • Updated the package dependencies.
  • Updated the URL of the default API endpoint.

Version 6.1.0

  • Updated the package dependencies.
  • Updated the URL of the Git repository.

Version 6.0.0

  • Raised the Dart SDK constraint.
  • Updated the package dependencies.

Version 5.2.0

  • Updated the package dependencies.

Version 5.1.0

  • Updated the package dependencies.

Version 5.0.0

  • Breaking change: removed the Client.defaultEndPoint static property.
  • Updated the package dependencies.

Version 4.2.0

  • Raised the Dart SDK constraint.
  • Updated the package dependencies.

Version 4.1.0

  • Added an example code.
  • Raised the Dart SDK constraint.
  • Using optional const and new.
  • Updated the package dependencies.

Version 4.0.1

  • Fixed the GitHub issue #2: the Client.sendMessage() method does not always throws a ClientException when an error occurs.
  • Updated the test dependency.

Version 4.0.0

  • Breaking change: changed the signature of the Client events.
  • Breaking change: starting to use and support the Dart 2 SDK.
  • Breaking change: the httpClient property is now private.
  • Added a user guide based on MkDocs.
  • Added the ClientException and RequestEvent classes.
  • Updated the package dependencies.

Version 3.2.0

  • Added support for browser platform.

Version 3.1.0

  • Updated the package dependencies.

Version 3.0.0

  • Breaking change: changed the signature of the constructor.
  • Raised the required Dart version.
  • Breaking change: the class properties are now read-only.
  • Breaking change: removed the toJson() and toString() methods.
  • Changed licensing for the MIT License.
  • Updated the package dependencies.

Version 2.0.0

  • Breaking change: renamed the endPoint constant to defaultEndPoint.
  • Added the endPoint property.

Version 1.0.0

  • Raised the required Dart version.
  • Updated the package dependencies.

Version 0.1.0 #

  • Initial release.

example/main.dart

import 'package:free_mobile/free_mobile.dart';

/// Sends an SMS notification.
Future<void> main() async {
  try {
    final client = Client('your account identifier', 'your API key');
    // For example: Client('12345678', 'a9BkVohJun4MAf')

    await client.sendMessage('Hello World!');
    print('The message was sent successfully');
  }

  on ClientException catch (err) {
    print('An error occurred: ${err.message}');
    print('From: ${err.uri}');
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  free_mobile: ^7.1.0

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

We analyzed this package on Aug 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

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:free_mobile/free_mobile.dart.

Health suggestions

Fix lib/src/client.dart. (-1 points)

Analysis of lib/src/client.dart reported 2 hints:

line 10 col 7: DO use curly braces for all flow control structures.

line 59 col 9: DO use curly braces for all flow control structures.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0 <3.0.0
http ^0.12.0 0.12.0+2
Transitive dependencies
async 2.3.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
meta 1.1.7
path 1.6.4
pedantic 1.8.0+1
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
build_runner ^1.4.0
build_test ^0.10.7
build_web_compilers ^2.0.0
grinder ^0.8.3
grinder_coveralls ^1.0.0
test ^1.6.3