I am trying to insert a string into my list of strings.
I initialize my string like so in a class called globals that holds this list.
List<String> myStringList = [];
Then in my controller class I am trying to insert a string into the list like so.
globals.myStringList.add(stringToAdd);
But I get an error that says the list is null. Not sure if I am initializing it wrong since it appears this is the way to initialize an empty list.
Globals Class
import 'package:flutter_project/models/categories.dart';
import 'package:flutter_project/models/videos.dart';
List<String> reports = [];
List<Video> videos = [];
List<Category> categories = [];
List<String> userSearches = <String>[];
bool inSearch = false;
globalsclass