Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #93

Merged
merged 3 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ Step buildItemsStep({
GridView.count(
crossAxisCount: 8,
shrinkWrap: true,
childAspectRatio: 1.0 / 1.2,
children: items.map((item) {
return ItemCard(
number: item.number,
name: item.name,
imageUrl: item.imageUrls.firstOrNull,
trailing: IconButton(
icon: const Icon(Icons.remove_circle),
Expand Down
15 changes: 15 additions & 0 deletions apps/librarian/lib/widgets/item_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ class ItemCard extends StatelessWidget {
const ItemCard({
super.key,
required this.number,
this.name,
this.imageUrl,
this.notes,
this.trailing,
this.onTap,
});

final int number;
final String? name;
final String? imageUrl;
final String? notes;
final Widget? trailing;
Expand Down Expand Up @@ -65,6 +67,19 @@ class ItemCard extends StatelessWidget {
],
),
),
if (name != null)
Padding(
padding: const EdgeInsets.only(
left: 8.0,
right: 8.0,
bottom: 8.0,
),
child: Text(
name!,
overflow: TextOverflow.ellipsis,
style: Theme.of(context).textTheme.labelSmall,
),
),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion apps/librarian/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
version: 1.0.0+22
version: 1.0.0+23

environment:
sdk: '>=3.0.0'
Expand Down