What is factory constructor in Dart How will you create a factory?

A factory constructor is a constructor that can be used when you don’t necessarily want a constructor to create a new instance of your class . This might be useful if you hold instances of your class in memory and don’t want to create a new one each time (or if the operation of creating an instance is costly).

Sizin İçin Seçtik  How do you make an app on Flutter?

Leave a Reply

Your email address will not be published. Required fields are marked *