filePathToCamelIdentifierWithExt function
Converts a file path to a camelCase identifier, including the file extension as a suffix.
Example: assets/images/cat.png → assetsImagesCatPng
Implementation
String filePathToCamelIdentifierWithExt(String filePath) {
final withoutExtension = p.withoutExtension(filePath);
final ext = p.extension(filePath).replaceFirst('.', '');
if (ext.isEmpty) return toCamelIdentifier(withoutExtension);
return toCamelIdentifier('${withoutExtension}_$ext');
}