Appearance
User Logout
Properly handle user logout to maintain data integrity and privacy.
Basic Logout
dart
void handleUserLogout() {
// Clear the user identity by setting appuID to empty
Map profileAttributes = { UpshotProfileAttributes.appuID: "" };
FlutterUpshotPlugin.sendUserDetails(profileAttributes);
}
Complete Profile Cleanup
For more thorough logout, you might want to clear specific user data:
dart
void handleCompleteLogout() {
import 'package:upshot_flutter/upshot_flutter.dart';
static void setUserProfile() {
Map<dynamic, dynamic> logoutData = {
// Personal information
UpshotProfileAttributes.userName: "",
UpshotProfileAttributes.email: "",
UpshotProfileAttributes.phone: "",
UpshotProfileAttributes.appuID: "",
};
// Set user profile
FlutterUpshotPlugin.sendUserDetails(logoutData);
}