diff --git a/ltx_flutter/lib/constants/colors.dart b/ltx_flutter/lib/constants/colors.dart index 82b6a27..e0e3820 100644 --- a/ltx_flutter/lib/constants/colors.dart +++ b/ltx_flutter/lib/constants/colors.dart @@ -18,7 +18,7 @@ enum CategoryColor { final String hex; name() { - return this.toString().split('.').last; + return toString().split('.').last; } backgroundColor() { diff --git a/ltx_flutter/lib/pages/categories_page.dart b/ltx_flutter/lib/pages/categories_page.dart index e9fc2db..c17287e 100644 --- a/ltx_flutter/lib/pages/categories_page.dart +++ b/ltx_flutter/lib/pages/categories_page.dart @@ -48,6 +48,7 @@ class _CategoriesPageState extends State { } return CategoryRow(category: category); } + return null; }, ); }), @@ -79,26 +80,26 @@ class CategoryRow extends StatelessWidget { children: [ Container( constraints: BoxConstraints(maxHeight: 80, maxWidth: 70), - color: category?.backgroundColor, + color: category.backgroundColor, child: SizedBox.expand( child: Center( child: Text( style: TextStyle( fontWeight: FontWeight.bold, - color: category?.foregroundColor, + color: category.foregroundColor, fontSize: 18, ), - category!.number.toString())), + category.number.toString())), ), ), Expanded( child: Padding( - padding: EdgeInsets.only(left: category!.leftPadding()), + padding: EdgeInsets.only(left: category.leftPadding()), child: Text( style: TextStyle( fontSize: 17, ), - category!.name, + category.name, ), ), ), @@ -110,7 +111,7 @@ class CategoryRow extends StatelessWidget { fontSize: 13, color: Colors.white38, ), - "${category?.description}", + "${category.description}", ), ), ),