A constructor can be made private by using (_) underscore operator which means private in dart. The same theory applied while extending class also, It’s also impossible to call the private constructor if it declares in a separate file. class FooBar extends Foo { FooBar() : super.