Is this a Dart Constructor?

Viewed 42

I'm still getting used to Dart and I've searched for an answer to this, but I haven't found one. What does the second line, 'ClassA._();', of the class definition do? The list declaration is only shown to give the class a reason for being.

class ClassA {   
   ClassA._();   
   static final List<String> someList = ["A", "B", "C"]; 
}

If it's a constructor, how would it be invoked? After doing some more sleuthing I see it creates a singleton. But when is the singleton created? Is there a way to get in front of the instantiation and make some mods?

Thanks in advance for any help given.

1 Answers
Related