final getIt = GetIt.instance; void setup() { getIt.registerSingleton<AppModel>(AppModel()); // Alternatively you could write it if you don't like global variables GetIt.I.registerSingleton<AppModel>(AppModel()); }