add method
Implementation
Future<String> add(Map<String, dynamic> data) async {
// ignore: avoid_as
final User user = await (currentUser() as Future<User>);
data['uid'] = user.uid;
return _collection!.add(data).then((ref) {
final List<String> path = ref.path.split('/');
return path.last;
}).catchError((Object ex) {
setError(ex);
return '';
});
}