YearMonth constructor Null safety

YearMonth(
  1. {int? year,
  2. Month? month}
)

Implementation

factory YearMonth({
  $core.int? year,
  Month? month,
}) {
  final _result = create();
  if (year != null) {
    _result.year = year;
  }
  if (month != null) {
    _result.month = month;
  }
  return _result;
}