string method

String? string({
  1. int? decimalPlaces,
})

Implementation

String? string({int? decimalPlaces}) {
  return sprintf("%.${decimalPlaces}f", [this?.toDouble() ?? 0.0]);
}