cpd_job_app/lib/Persistent/persistent.dart

29 lines
751 B
Dart
Raw Normal View History

2023-06-18 13:41:52 +02:00
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_auth/firebase_auth.dart';
import '../services/global_variables.dart';
class Persistent {
static List<String> jobCategoryList = [
"Architecture and Construction",
"Education and Training",
"Development - Programming",
"Business",
"Information Technology",
"Human Resources",
"Marketing",
"Design",
"Accounting"
];
2023-06-18 13:41:52 +02:00
void getMyData() async {
final DocumentSnapshot userDoc = await FirebaseFirestore.instance
.collection("users")
.doc(FirebaseAuth.instance.currentUser!.uid)
2023-06-18 13:41:52 +02:00
.get();
name = userDoc.get("name");
userImage = userDoc.get("userImage");
location = userDoc.get("location");
2023-06-18 13:41:52 +02:00
}
}