getUserName function

Future<ResultList<RecordModel>> getUserName()

Implementation

Future<ResultList<RecordModel>> getUserName() async {
  String userID = await getUserID();
  final controller = Get.find<GraphsController>();
  final record = await pocketBase
      .collection('users')
      .getList(
        filter: 'id = "$userID"',
      )
      .then((value) {
    controller.userPersonalDetails.value = value.items;
  });
  return record;
}