darango 0.0.16
darango: ^0.0.16 copied to clipboard

A Dart driver for ArangoDB. It use the ArangoDB HTTP REST API.

example/main.dart

import 'package:flutter/material.dart';
import 'package:darango/darango.dart';

Database database;

Collection usersCollection;

void initArangoDB() async {
  database = Database('http://10.0.2.2:8529');
  await database.connect('', '', '');
  usersCollection = await database.collection('users');
}

Future<dynamic> getUser(String id) async {
  Document doc;
  doc = await usersCollection.document(document_handle: id).get();
  print(doc.data);
  return doc.data;
}

void main() async {
  await initArangoDB();
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    getUser('');

    return MaterialApp(
      title: 'Welcome to Flutter',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Welcome to Flutter'),
        ),
        body: Center(
          child: Text('Hello World'),
        ),
      ),
    );
  }
}
1
likes
100
pub points
0%
popularity

A Dart driver for ArangoDB. It use the ArangoDB HTTP REST API.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

http

More

Packages that depend on darango