deCapitalize function Null safety

String deCapitalize(
  1. String input
)

Implementation

String deCapitalize(String input) => input.replaceFirstMapped(
    RegExp(r'(^|\s)[A-Z]'), (match) => match.group(0)!.toLowerCase());