Open kyuyoungheo opened 4 months ago
Nullable 문서의 이 목차가 도움이 됨 https://dart.dev/null-safety/understanding-null-safety#working-with-nullable-types
Swift like guard, if let 구문은 없고 if(foo != null)
로만 사용하는 듯
Kotlin like Elvis Operator도 없음
Optional Chaining은 있음
언래핑 방법
답변 감사! 추가로 dart nullable operator 발견해서 공유함!
https://medium.com/flutter-community/null-aware-operators-281c18407afe
https://www.darttutorial.org/dart-tutorial/dart-null-aware-operators/
오 ??= 이거 신기하네요
삼항 연산자 가능 isDone ? Colors.red : Colors.blue 굿
삼항 연산자 가능
isDone ? Colors.red : Colors.blue
굿
삼항연산자는 프로그래밍 언어라면 당연히 있어야... ㅋㅋㅋㅋ
옵셔널을 어떻게 구현했고 어떤 종류의 언래핑 방법이 있지?