setBottomEndFormat method

void setBottomEndFormat({
  1. int? yyyy,
  2. int? mm,
  3. int? dd,
})

Implementation

void setBottomEndFormat({int? yyyy, int? mm, int? dd}) {
  setState(() {
    endDateStr = (yyyy != null)
        ? widget.format
            .replaceAll('yyyy', yyyy.toString())
            .replaceAll(
                'mm',
                mm.toString().length == 1
                    ? '0' + mm.toString()
                    : mm.toString())
            .replaceAll(
                'dd',
                dd.toString().length == 1
                    ? '0' + dd.toString()
                    : dd.toString())
        : '';
  });
}