do_dart 0.1.6

  • Readme
  • Changelog
  • Example
  • Installing
  • 60

do_dart BETA #

Pub support

A Dart SDK for the DigitalOcean Api v2

  do_dart: ^0.1.4 #latest version

Easy to use #

To get started, you need a DigitalOcean API key with sufficient privileges for the tasks you want to perform.

Then: Initializing the client

import 'package:do_dart/do_dart.dart';

Client client = Client(<DigitalOcean API Key>);

Examples #

Initializing the client

import 'package:do_dart/do_dart.dart';

Client client = Client(<DigitalOcean API Key>);

Creating a droplet

DropletCreateRequest dcr =
        DropletCreateRequest("test-droplet", 'nyc1', 's-1vcpu-1gb', 43515152, ssh_keys: [<SSH KEY ID or Fingerprint]);

Droplet d = await client.droplet.create(dcr);

The license is MIT.

Features and bugs #

Please file feature requests and bugs at the issue tracker.


  • Fixed collection literals (formatting)


  • Fixed formatting
  • Remove unnecessary type annotations


  • Move HTTP client to dart:io package
  • Type inference fix
  • Added missing function to delete image
  • Cleanup


  • Fix owner_id field type in project (thanks to @mponkin)


  • Added a Flutter example
  • Fixed type errors in Droplet model


  • Implemented dartfmt suggestions


  • Beta release

Resource not implemented yet: #

  • Kubernetes
  • Load Balancers
  • Databases


import 'package:do_dart/do_dart.dart';
import 'dart:io' show Platform, sleep;

void main() async {
  var envVars = Platform.environment;
  var client = Client(envVars['DO_KEY']);

  var account = await client.account.get();


Use this package as a library

1. Depend on it

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

  do_dart: ^0.1.6

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:do_dart/do_dart.dart';
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.

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

  • Dart: 2.7.0
  • pana: 0.13.4


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
dotenv ^2.0.0 2.0.0
json_annotation ^3.0.0 3.0.1
Transitive dependencies
args 1.5.2
dart2_constant 1.0.2+dart2
meta 1.1.8
Dev dependencies
build_runner ^1.0.0
json_serializable ^3.0.0
test ^1.5.3