ethanblake4/dart_eval

Does it support Singleton pattern???

cattlelovegrass opened this issue · 3 comments

Does it support Singleton pattern???

class HttpManager {
static final HttpManager _instance = HttpManager._internal();

factory HttpManager() {
return _instance;
}

HttpManager._internal();
} if this code implements $Instance, Is it the same as usual?

You can use the dart_eval binding generator to automatically generate an $Instance wrapper that can do this

OK, Thanks