You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
doctor_app_flutter/lib/utils/exception_report.dart

19 lines
538 B
Dart

import 'package:cloud_firestore/cloud_firestore.dart';
void postFailureResponse({
required String doctorId,
required String url,
required String request,
required String response,
required String exception,
}) async {
Map<String, String> data = {
"url" : url,
"request" : request,
"response" : response,
"exception" : exception
};
final firestore = FirebaseFirestore.instance;
final collectionRef = firestore.collection(doctorId);
await collectionRef.doc(DateTime.now().toIso8601String()).set(data);
}