pascalCase function
blog_posts -> BlogPosts.
Implementation
String pascalCase(String name) {
final out =
_words(name).map((w) => w[0].toUpperCase() + w.substring(1)).join();
if (out.isEmpty) return "Table";
return RegExp(r"^[0-9]").hasMatch(out) ? "T$out" : out;
}