nfc_manager 0.2.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 79

nfc_manager #

A Flutter plugin to use NFC. Supported on both Android and iOS.

Note #

This plugin is still under development.

So please use with caution as there may be potential issues and breaking changes.

Feedback is welcome.

Setup #

Android Setup #

  • Add permission to your AndroidMenifest.xml:
<uses-permission android:name="android.permission.NFC" />

iOS Setup #

<key>NFCReaderUsageDescription</key>
<string>[YOUR DESCRIPTION]</string>
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
    <string>NDEF</string>
    <string>TAG</string> <!-- To use `NfcManager#startTagSession` -->
</array>
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
    <string>[AID]</string>
</array>

<key>com.apple.developer.nfc.readersession.felica.systemcodes</key>
<array>
    <string>[SYSTEM CODE]</string>
</array>

0.2.0 #

  • split startSession into startNdefSession and startTagSession.
  • document improvement.

0.1.1 #

  • [iOS] fix crash on serializing nil message.
  • add example project.
  • document improvement.

0.1.0+2 #

  • document improvement.

0.1.0+1 #

  • document improvement.

0.1.0 #

  • iOS 13 support.

0.0.1 #

  • initial release.

example/README.md

nfc_manager_example #

Demonstrates how to use the nfc_manager plugin.

Use this package as a library

1. Depend on it

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


dependencies:
  nfc_manager: ^0.2.0

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

We analyzed this package on Oct 9, 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

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/src/ndef.dart.

Run flutter format to format lib/src/ndef.dart.

Format lib/src/nfc_manager.dart.

Run flutter format to format lib/src/nfc_manager.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test