[Flutter] Using this in a constructor ์ ๋ํ์ฌ
ยท
๐ง flutter
about using this in a constructor this.propertyName ์ ์งง๊ณ ๊ฐ๋จํ๊ฒ constructor์ values์ ๊ฐ์ ํ ๋นํ ๋ ์ฌ์ฉํ๋ค. class MyColor { int red; int green; int blue; MyColor(this.red, this.green, this.blue); } final color = MyColor(80, 80, 128); ์ ์๋ ์ฝ๋์์ this.์ class ๋ณ์์ ๊ฐ์ ๋ฃ๊ฒ ๋ค๋ ๊ฒ์ ์๋ฏธํ๋ค. ์ด๋ฌํ ๋ฐฉ์์ named parameters์์๋ ์ฌ์ฉ๋๋ค. using this in named parameters class MyColor { ... MyColor({required this.red, required this.gree..