본문 바로가기
Flutter(dart)

default 'list' constructor isn't available when null safety is enabled

by janeparker 2022. 11. 1.
728x90
반응형

플러터 문법이 바뀌었는지...

인강을 듣다보니 List<Store>(); 가 먹지를 않는다...

 

구글링을 해 보니 

List<Store>();

 

대신

 

<Store>[];

로 명시하면, 에러 문구가 사라진다

 

참조(스택오버플로우): https://stackoverflow.com/questions/63451506/the-default-list-constructor-isnt-available-when-null-safety-is-enabled-try

728x90
반응형