Skip to content

Commit

Permalink
feat: ui improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
TomBursch committed Dec 5, 2021
1 parent df3892c commit 1ba5b3e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
1 change: 1 addition & 0 deletions lib/l10n/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"underConstruction": "Baustelle",
"unreachableMessage": "Hmmmm... der Server wurde nicht erreicht",
"unsupportedBackendMessage": "Die Server version wird nicht unterstützt, bitte update die/den App/Server",
"usedIn": "Benutzt in",
"user": "Benutzer",
"userAdd": "Benutzer hinzufügen",
"userDelete": "Benutzer löschen",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"underConstruction": "Under Construction",
"unreachableMessage": "Hmmmm... coulnd't reach server",
"unsupportedBackendMessage": "The server version is not supported, please update the app/backend",
"usedIn": "Used in",
"user": "User",
"userAdd": "Add User",
"userDelete": "Delete User",
Expand Down
30 changes: 22 additions & 8 deletions lib/pages/item_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,28 @@ class _ItemPageState extends State<ItemPage> {
),
sliver: SliverList(
delegate: SliverChildBuilderDelegate(
(context, i) => Padding(
padding: const EdgeInsets.symmetric(horizontal: 13),
child: RecipeItemWidget(
recipe: state.recipes[i],
onUpdated: cubit.refresh,
),
),
childCount: state.recipes.length,
(context, i) {
if (i == 0) {
return Padding(
padding:
const EdgeInsets.fromLTRB(13, 0, 13, 8),
child: Text(
AppLocalizations.of(context).usedIn + ':',
style: Theme.of(context).textTheme.headline6,
),
);
}
i = i - 1;
return Padding(
padding:
const EdgeInsets.symmetric(horizontal: 13),
child: RecipeItemWidget(
recipe: state.recipes[i],
onUpdated: cubit.refresh,
),
);
},
childCount: state.recipes.length + 1,
),
),
);
Expand Down

0 comments on commit 1ba5b3e

Please sign in to comment.