개발/Flutter
final vs const
Byunpa24
2021. 6. 28. 10:48
반응형
final과 const 둘다 한번 초기화되면 새롭게 변형될 수 없다. both are immutable
final = runtime . 앱이 실행될때
const = compile time constant. 선언과 동시에 초기화
compile time constant = runtime constant
final 변수는 build method 내에서 rebuild 될 수 있음
반응형