contact applyer
parent
2314f08308
commit
bfa24bec37
|
@ -1,6 +1,8 @@
|
||||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||||
import 'package:firebase_auth/firebase_auth.dart';
|
import 'package:firebase_auth/firebase_auth.dart';
|
||||||
import 'package:flutter/material.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 '../Widgets/bottom_nav_bar.dart';
|
||||||
import '../services/global_variables.dart';
|
import '../services/global_variables.dart';
|
||||||
|
@ -39,6 +41,20 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||||
getUserData();
|
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 {
|
void getUserData() async {
|
||||||
try {
|
try {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -143,6 +159,11 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (!_isSameUser && email != null)
|
||||||
|
IconButton(
|
||||||
|
onPressed: _sendEmail,
|
||||||
|
icon: Icon(Icons.mail),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
bottomNavigationBar: BottomNavigationBarForApp(indexNum: 3),
|
bottomNavigationBar: BottomNavigationBarForApp(indexNum: 3),
|
||||||
|
|
Loading…
Reference in New Issue