Skip to main content


Watching a video on Pascal's "strict private" scoping has me learning/re-learning that in Dart private members/methods/properties of classes are fully accessible by any code defined in the same file. It's not so private after all. I don't think I'll avoid this though #programming #DartLang #flutter
in reply to Hank G ☑️

it looks like the underscore modifier in Dart is more akin to "internal" in C#, meaning it is available for the whole library, but not to external libraries. They don't seem to have a class-scoped access modifier.
in reply to Tim

Yep that’s a great comparison. On Bluesky (I think) someone compared it to the friend class concept in C++ as well. It helps getting around Dart really only having two scopes and it is defined by if there is a leading underscore or not.