class MyLazyService { /// Factory method that reuse same instance automatically factory MyLazyService() => Singleton.lazy(() => MyLazyService._()).instance; /// Private constructor MyLazyService._() {} /// do something void doSomething() {} }