getUserById function

Future<UserData?> getUserById(
  1. String userId
)

Implementation

Future<UserData?> getUserById(String userId) async {
  try{
    List<UserData> _list = await dbGetDocument("listusers", userId);
    if (_list.isNotEmpty)
      return _list[0];
  }catch(ex){
    dprint("getUserById " + ex.toString());
  }
  return null;
}