toTime method

String toTime()

Implementation

String toTime() => length > 0
    ? DateFormat('hh:mm aaa').format(DateTime.tryParse(this)?.toLocal() ??
        DateTime.fromMillisecondsSinceEpoch(
          int.parse(this),
        ).toLocal())
    : this;