Coaspe

Dart - dynamic vs never vs object 본문

Dart

Dart - dynamic vs never vs object

Coaspe 2022. 11. 1. 21:11
  • Object: The superclass of all Dart classes except Null.
  • Never: Indicates that an expression can never successfully finish evaluating. Most often used for functions that always throw an exception.
  • dynamic: Indicates that you want to disable static checking. Usually you should use Object or Object? instead.

  • Object: Null을 제외한 모든 Dart 클래스의 superclass
  • Never: Evaluating(평가)가 절대 완료되지 않은 expression을 의미합니다. 항상 exception을 발생하는 함수에 사용됩니다.
  • Dynamic: 정적 타입 체킹을 사용하지 않습니다. 보통 Object나 Object?를 사용하는 것을 권장합니다. 
Comments