write method
Writes data to the specified path.
The path
parameter identifies the location where data should be written.
The data
parameter contains the data to be written.
Returns a Future that completes when the write operation is finished. If the write operation fails, the future will complete with an error.
Implementation
@override
Future<String?> write(String path, Map<String, dynamic> data) async {
try {
await datasource.ref(path).update(data);
return null;
} catch (e) {
return e.toString();
}
}