After registering SharedPreferences dependency. You can call
await sl.isReady<SharedPreferences>();
Inside setupSl() function (or whatever similar name you have). Which makes setupSl() Future and as already mentioned above we can make main function async to await setupSl().