toCamelCase function

String toCamelCase(
  1. String? fieldName
)

Converts field name to CamelCase format

Implementation

String toCamelCase(String? fieldName) => fieldName != null
    ? fieldName.length == 1
        ? fieldName.toUpperCase()
        : fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1)
    : '';