fixed const
This commit is contained in:
@@ -3,14 +3,16 @@ import 'package:prosappco/src/authentication/authentication_repository.dart';
|
||||
|
||||
final uid = AuthenticationRepository.instance.getCurrentUserUid();
|
||||
|
||||
// class EventoService {
|
||||
// Future<Event> createEvent() {
|
||||
// FirebaseFirestore.instance.collection('users').doc(uid).update({
|
||||
// 'ejemplo': 'ejm',
|
||||
// });
|
||||
|
||||
// try {} catch (e) {
|
||||
// print('Evento $e');
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
class EventoService {
|
||||
Future<void> createEvent(String title, String description, String day) async {
|
||||
try {
|
||||
await FirebaseFirestore.instance.collection('services').add({
|
||||
'title': title,
|
||||
'description': description,
|
||||
'day': day,
|
||||
});
|
||||
} catch (e) {
|
||||
print('Evento $e');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user