dart_airtable 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 63

Dart Airtable #

A library for using the Airtable API in Dart & Flutter applications

Usage #

A simple usage example:

import 'package:dart_airtable/dart_airtable.dart';

void main() async {
  final apiKey = 'my-airtable-api-key'
  final projectBase = 'my-airtable-project-base';
  final recordName = 'Tasks';

  var airtable = Airtable(apiKey: apiKey, projectBase: projectBase);
  var records = await airtable.getAllRecords(recordName);

  print(records);
}

Running the example #

  1. Create a .env file
cp .env.example .env
  1. Fill in your API Key, Project base key and Record Name in the .env file

  2. Run the dart file

dart example/dart_airtable_example.dart

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0.1.0 #

  • Added base Airtable class and AirtableRecord/AirtableRecordField classes.
  • Added methods for listing, creating, updating and deleting Airtable records
  • Added basic README and example

example/dart_airtable_example.dart

import 'package:dart_airtable/dart_airtable.dart';
import 'package:dotenv/dotenv.dart' as dotenv;

void main() async {
  dotenv.load();

  final apiKey = dotenv.env['AIRTABLE_API_KEY'];
  final projectBase = dotenv.env['AIRTABLE_PROJECT_BASE'];
  final recordName = dotenv.env['AIRTABLE_RECORD_NAME'];

  assert(apiKey != null);
  assert(projectBase != null);
  assert(recordName != null);

  var airtable = Airtable(apiKey: apiKey, projectBase: projectBase);
  var records = await airtable.getAllRecords(recordName);

  print(records);
}

Use this package as a library

1. Depend on it

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


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

We analyzed this package on Jul 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14

Analysis suggestions

Package not compatible with runtime flutter-web on web

Because:

  • package:dart_airtable/dart_airtable.dart that imports:
  • package:dart_airtable/src/dart_airtable_base.dart that imports:
  • dart:io

Package not compatible with runtime js

Because:

  • package:dart_airtable/dart_airtable.dart that imports:
  • package:dart_airtable/src/dart_airtable_base.dart that imports:
  • dart:io

Health issues and suggestions

Document public APIs. (-0.09 points)

31 out of 32 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.

Maintenance suggestions

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.5.0 <3.0.0
http ^0.12.0+4 0.12.1
meta ^1.1.8 1.2.2 1.3.0-nullsafety
Transitive dependencies
charcode 1.1.3
collection 1.14.13 1.15.0-nullsafety
http_parser 3.1.4
path 1.7.0
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.2.0 1.3.0-nullsafety
Dev dependencies
dotenv ^2.0.0
pedantic ^1.8.0 1.9.2
test ^1.6.0