tryParse static method

NepaliDateTime? tryParse(
  1. String formattedString
)
override

Constructs a new NepaliDateTime instance based on formattedString.

Implementation

static NepaliDateTime? tryParse(String formattedString) {
  try {
    return parse(formattedString);
  } on FormatException {
    return null;
  }
}