Jalali.fromDateTime constructor

Jalali.fromDateTime(
  1. DateTime dateTime
)

Create a Jalali date by using DateTime object

throws on null argument

non-null

Implementation

factory Jalali.fromDateTime(DateTime dateTime) {
  ArgumentError.checkNotNull(dateTime, 'dateTime');

  return Gregorian.fromDateTime(dateTime).toJalali();
}