From bfa24bec370ba7a66fa84cd3c6b5d201680d1994 Mon Sep 17 00:00:00 2001 From: nkloos <2020633@stud.hs-mannheim.de> Date: Mon, 19 Jun 2023 10:35:42 +0200 Subject: [PATCH] contact applyer --- lib/Search/profile_company.dart | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/Search/profile_company.dart b/lib/Search/profile_company.dart index 46c476e..3e58ad7 100644 --- a/lib/Search/profile_company.dart +++ b/lib/Search/profile_company.dart @@ -1,6 +1,8 @@ import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; +import 'package:url_launcher/url_launcher.dart'; +import 'package:url_launcher/url_launcher_string.dart'; import '../Widgets/bottom_nav_bar.dart'; import '../services/global_variables.dart'; @@ -39,6 +41,20 @@ class _ProfileScreenState extends State { getUserData(); } + void _sendEmail() async { + { + //TODO Mail senden funktioniert noch nicht + final Uri params = Uri( + scheme: "mailto", + path: email, + query: + "subject=Hey from JobFinder", + ); + final url = params.toString(); + launchUrlString(url); + } + } + void getUserData() async { try { setState(() { @@ -143,6 +159,11 @@ class _ProfileScreenState extends State { ), ), ), + if (!_isSameUser && email != null) + IconButton( + onPressed: _sendEmail, + icon: Icon(Icons.mail), + ), ], ), bottomNavigationBar: BottomNavigationBarForApp(indexNum: 3),