Undefined class 'DocumentReference' and others have appeared for no reason

Custom Code

My custom functions have started showing errors where previously they had been fine. I don't know exactly what happened so I rolled back my project using version control but to no avail.

Has something changed or is there something that can break the code editor in such a way that it prevents compilation? Here is a pic of what is happening:

import 'dart:convert';
import 'dart:math' as math;

import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:intl/intl.dart';
import 'package:timeago/timeago.dart' as timeago;
import '/flutter_flow/custom_functions.dart';
import '/flutter_flow/lat_lng.dart';
import '/flutter_flow/place.dart';
import '/flutter_flow/uploaded_file.dart';
import '/backend/backend.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import '/backend/schema/structs/index.dart';
import '/backend/schema/enums/enums.dart';
import '/auth/firebase_auth/auth_util.dart';

DocumentReference getLarderRef(String docRef) {
  /// MODIFY CODE ONLY BELOW THIS LINE

  final FirebaseFirestore firestore = FirebaseFirestore.instance;

  String documentPath = "/larders/" + "$docRef";
  DocumentReference documentReference = firestore.doc(documentPath);
  return documentReference;

  /// MODIFY CODE ONLY ABOVE THIS LINE
}
What have you tried so far?

Restarted the Code Analyser

Turn on/off references to custom code

Changed the names of variables and functions

Closed and opened the project

Restored from previous versions

Did you check FlutterFlow's Documentation for this topic?
Yes
2
6 replies