2022-09-19 12:11:58 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2022-08-26 15:31:42 +02:00
|
|
|
import 'package:profile/profile.dart';
|
|
|
|
|
2022-08-26 16:28:40 +02:00
|
|
|
abstract class ProfileService {
|
2022-08-26 15:31:42 +02:00
|
|
|
const ProfileService();
|
|
|
|
|
2022-09-19 12:11:58 +02:00
|
|
|
deleteProfile() {}
|
2022-08-26 15:31:42 +02:00
|
|
|
|
|
|
|
editProfile<T extends ProfileData>(User user, String key, String value) {
|
|
|
|
if (user.profileData != null) {
|
|
|
|
var map = user.profileData!.toMap();
|
|
|
|
if (map.containsKey(key)) {
|
|
|
|
map[key] = value;
|
|
|
|
var profile = user.profileData!.create();
|
|
|
|
user.profileData = profile.fromMap(map);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-19 12:11:58 +02:00
|
|
|
uploadImage(BuildContext context) async {}
|
2022-08-26 15:31:42 +02:00
|
|
|
}
|