getOrganization method
Retrieves the organization details.
Implementation
void getOrganization() async {
debugPrint('inside org --> ${doctor?.organizationId!}');
try {
final document = await databases.getDocument(
databaseId: AppConstants.appwriteDatabaseId,
collectionId: AppConstants.userCollectionId,
documentId: doctor!.documentId!,
);
debugPrint(document.$id);
setState(() {
organization = Organization.fromMap(document.data, );
});
} catch (e) {
debugPrint('Error fetching organization: $e');
}
}