toDate method

String toDate()

Implementation

String toDate() => length > 0
    ? DateFormat('dd MMM yyyy').format(DateTime.tryParse(this)?.toLocal() ??
        DateTime.fromMillisecondsSinceEpoch(
          int.parse(this),
        ).toLocal())
    : this;