diff --git a/lib/entities/PizzaRecipe/Ingredient.dart b/lib/entities/PizzaRecipe/Ingredient.dart index 02cdd48..fddfd30 100644 --- a/lib/entities/PizzaRecipe/Ingredient.dart +++ b/lib/entities/PizzaRecipe/Ingredient.dart @@ -12,7 +12,7 @@ class Ingredient { Widget getIngredientWidget(int weight){ return Row( children: [ - Text("${this.name}: "), + Text("${this.name.capitalize()}: "), Text("${this.getAbsolute(weight)}$unit") ], ); diff --git a/lib/util.dart b/lib/util.dart index 285e5c2..5f712c1 100644 --- a/lib/util.dart +++ b/lib/util.dart @@ -19,4 +19,10 @@ Future> getRecipes() async { Future loadAsset(String path) async { return await rootBundle.loadString(path); +} + +extension StringExtensions on String { + String capitalize() { + return this[0].toUpperCase() + this.substring(1); + } } \ No newline at end of file