setUserId method

  1. @override
Future<bool?> setUserId(
  1. String userId
)
override

Sets the user ID.

Implementation

@override
Future<bool?> setUserId(String userId) async {
  final oldUserId = await getUserId();
  if (oldUserId != null && oldUserId != userId) removeLocal(userID);
  saveLocal({userID: userId});
  return true;
}