mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-01 01:47:41 +00:00
13 lines
No EOL
426 B
Dart
13 lines
No EOL
426 B
Dart
import 'package:intl/intl.dart';
|
|
|
|
String normalizeKeyName(String key) {
|
|
final parts = key.split('_');
|
|
final firstWord = parts.removeAt(0);
|
|
final capitalized = parts
|
|
.map((e) => toBeginningOfSentenceCase(e))
|
|
.fold('', (String acc, String word) => acc + word);
|
|
return firstWord + capitalized;
|
|
}
|
|
|
|
String generateConst(String name, Map<String, dynamic> config) =>
|
|
'const $name = \'${config["$name"]}\';\n'; |