add static method
Implementation
static Future<String?> add({
required String collectionName,
required Map<String, dynamic> value,
}) async {
var ref = getRef(
collectionName: collectionName,
);
try {
if (Platform.isWindows) {
var res = await ref.add(value);
return res.id;
} else {
var res = await ref.add(value);
return res.id;
}
} on Exception catch (_) {
print(_);
return null;
}
}