Dart Study #2 클래스, 상속
·
Flutter/Dart
Class void main() { // constructor Idol blackPink = const Idol( name:'블랙핑크', members:['지수', '제니', '리사', '로제']); blackPink.sayHello(); blackPink.introduce(); // named constructor Idol blackPink2 = Idol.fromList([ ['지수', '제니', '리사', '로제'], '블랙핑크' ]); blackPink2.sayHello(); blackPink2.introduce(); } class Idol { final String name; final List members; // constructor const Idol({ required this.name, ..