A Flutter library to connect to Meteor Servers.
import 'package:ddp/ddp.dart';
DdpClient client;
_initMeteorClient() {
client = DdpClient("meteor", "ws://192.168.1.12:3000/websocket", "meteor");
client.connect();
client.addStatusListener((status) {
if (status == ConnectStatus.connected) {
connectionStatus = "connected";
client.subscribe("babies.public", (done) {
collection = done.owner.collectionByName("Babies");
updateBabiesNames();
collection.addUpdateListener(subListener);
}, []);
setState(() {});
}
});
}
Collection collection;
client.call("babies.remove", [this.babiesNames[index]["_id"]]);
collection.findAll()
..forEach((String _id, Map document) {
document["_id"] = _id;
babiesNames.add(document);
});
For help getting started with Flutter, view our online documentation.
For help on editing package code, view the documentation.