Null safety

  • Variables are non-nullable by default.
  • Variables which may contain null values must have ? appended to their types, e.g. int? myNum.

References