Suragch
Mar 1, 2022

--

The only main performance issue that I’m aware of is when to instantiate a singleton. Use a lazy singleton if you don’t need to initialize it at app startup. And if you don’t need a singleton, you can use the factory option with GetIt. As for the question of what developers should strive for regarding the number of singletons, you’ll have to ask someone besides me about that.

--

--

Suragch
Suragch

Written by Suragch

Flutter and Dart developer. Twitter: @suragch1, Email: suragch@suragch.dev

Responses (1)