일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- edwith
- Java
- 이클립스
- MySQL
- 자바
- oracle
- 웹개발
- SQL
- Eclipse
- Unity
- 쿠키런킹덤크리스마스
- 개발자
- 쿠킹덤공략
- 쿠킹덤
- 유니티
- 홀리데이익스프레스
- 딥러닝
- 오블완
- 노마드코더
- dart
- 크리스마스
- 쿠키런킹덤공략
- JavaScript
- Spring
- programmers
- HTML
- 프로그래머스
- 쿠키런킹덤
- 자바스크립트
- 티스토리챌린지
- Today
- Total
목록dart (29)
Dev study and notes
class Strong { final double strengthLevel = 1500.99; } class QuickRunner { void runQuick() { print('runnnnnnnnnnn!'); } } class Tall { final double height = 1.99; } class Horse with Strong, QuickRunner {} class Kid with QuickRunner {} enum Team { blue, red } class Player with Strong, QuickRunner, Tall { final Team team; Player({ required this.team, }); } void main() { var player = Player( team: ..
class Human { final String name; Human(this.name); void sayHello() { print('Hi, my name is $name'); } } enum Team { blue, red } class Player extends Human { final Team team; Player({ required this.team, required String name, }) : super(name); @override void sayHello() { super.sayHello(); print('and I play for ${team}'); } } void main() { var player = Player( team: Team.red, name: 'lunch', ); pla..
abstract class Human { void walk(); } enum Team { red, blue } enum XPLevel { beginner, medium, pro } class Player extends Human { String name; XPLevel xp; Team team; Player({ required this.name, required this.xp, required this.team, }); void walk() { print('I am walking'); } void sayHello() { print("Hi my name is $name"); } } class Coach extends Human { void walk() { print('the coash is walking'..
enum Team { red, blue } enum XPLevel { beginner, medium, pro } class Player { String name; XPLevel xp; Team team; Player({ required this.name, required this.xp, required this.team, }); void sayHello() { print("Hi my name is $name"); } } void main() { var lunch = Player( name: 'lunch', xp: XPLevel.medium, team: Team.red, ) ..name = 'john' ..xp = XPLevel.beginner ..team = Team.blue ..sayHello(); p..
class Player { String name; int xp; String team; Player({ required this.name, required this.xp, required this.team, }); void sayHello() { print("Hi my name is $name"); } } void main() { var lunch = Player( name: 'lunch', xp: 120, team: 'red', ) ..name = 'john' ..xp = 9999 ..team = 'blue' ..sayHello(); print(lunch.name); } // PRINT // >>> // Hi my name is john // john
class Player { final String name; int xp, age; String team; Player({ required this.name, required this.xp, required this.team, required this.age, }); Player.createBluePlayer({ required String name, required int age, }) : this.age = age, this.name = name, this.team = 'blue', this.xp = 0; Player.createRedPlayer( String name, int age, ) : this.age = age, this.name = name, this.team = 'red', this.xp..
class Player { final String name; int xp; String team; int age; Player({ required this.name, required this.xp, required this.team, required this.age, }); void sayHello() { print("Hi my name is $name"); } } void main() { var player = Player( name: 'lunch', xp: 9999, team: 'red', age: 100, ); print(player.name); player.sayHello(); var player2 = Player( name: 'lunch2', xp: 222, team: 'blue', age: 2..
class Player { final String name; int xp = 9999; Player(this.name, this.xp); void sayHello() { print("Hi my name is $name"); } } void main() { var player = Player('lunch', 9999); print(player.name); player.sayHello(); var player2 = Player('lunch2', 2222); player2.sayHello(); } // PRINT // >>> // lunch // Hi my name is lunch // Hi my name is lunch2
class Player { final String name = 'lunch'; int xp = 9999; void sayHello() { print("Hi my name is $name"); } } void main() { var player = Player(); print(player.name); player.sayHello(); } // PRINT // >>> // lunch // Hi my name is lunch
typedef ListOfInts = List; ListOfInts reverseListOfNumbers(List list) { var reversed = list.reversed; return reversed.toList(); } typedef UserInfo = Map; String sayHi(UserInfo userInfo) { return 'Hi! ${userInfo['name']}'; } void main() { print(reverseListOfNumbers([1, 2, 3])); print(sayHi({'name': 'lunch'})); } // PRINT // >>> // [3, 2, 1] // Hi! lunch