storeValue static method

Future<String> storeValue(
  1. String reference,
  2. String tag,
  3. List valueList
)

Implementation

static Future<String> storeValue(
    String reference, String tag, List valueList) async {
  try {
    DatabaseReference ref = FirebaseDatabase.instance.ref(reference);
    String val = JeaFire.encode(valueList);
    await ref.child('"$tag"').set(val);
    return "successful";
  } catch (e) {
    return "error: ${e.toString()}";
  }
}