Home > Back-end >  can find a suit value to declare my constructor
can find a suit value to declare my constructor

Time:04-08

class Space{ List? photos; }

Space({ this.photos=[], //The default value of an optional parameter must be constant. });

CodePudding user response:

Space({ this.photos = const []})

It should works :)

  • Related