Mahan Marwat
Mahan Marwat

Reputation: 403

Accesssing Firebase Firestore from a script

I have a flutter Andriod app that can be used to store data in the firestore. Now I want to access that stored data from a Dart script to perform some operations on the data.

How can I access the firestore with a Dart script?

Updated the question: Looking only for dart package/library to access firebase firestore.

Upvotes: 1

Views: 470

Answers (2)

Mahan Marwat
Mahan Marwat

Reputation: 403

It is possible with firedart.

import 'package:firedart/firedart.dart';

String pi = 'example-app';

void main(List<String> arguments) async {
  Firestore.initialize(pi);
  var map = await Firestore.instance.collection("users").get();
  print(map);
}

Upvotes: 0

mdobrucki
mdobrucki

Reputation: 522

The Firebase docs provides good help with how to set up environment and a lot of examples.

Upvotes: 1

Related Questions