Skip to content

Commit

Permalink
fix: FIxing item label to show. #275
Browse files Browse the repository at this point in the history
  • Loading branch information
LuchoTurtle committed Oct 4, 2023
1 parent bef0bf5 commit d9450d4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Binary file added assets/sample.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ PODS:
- Flutter
- image_picker_ios (0.0.1):
- Flutter
- integration_test (0.0.1):
- Flutter
- OrderedSet (5.0.0)
- pasteboard (0.0.1):
- Flutter
Expand Down Expand Up @@ -78,6 +80,7 @@ DEPENDENCIES:
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
- gallery_saver (from `.symlinks/plugins/gallery_saver/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
- pasteboard (from `.symlinks/plugins/pasteboard/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
Expand Down Expand Up @@ -109,6 +112,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/gallery_saver/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
integration_test:
:path: ".symlinks/plugins/integration_test/ios"
pasteboard:
:path: ".symlinks/plugins/pasteboard/ios"
path_provider_foundation:
Expand All @@ -131,6 +136,7 @@ SPEC CHECKSUMS:
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
gallery_saver: 9fc173c9f4fcc48af53b2a9ebea1b643255be542
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
integration_test: 13825b8a9334a850581300559b8839134b124670
OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
pasteboard: 982969ebaa7c78af3e6cc7761e8f5e77565d9ce0
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
Expand Down
7 changes: 5 additions & 2 deletions lib/presentation/widgets/items.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ class _ItemCardState extends State<ItemCard> {

final checkboxSize = deviceWidth > 425.0 ? 30.0 : 20.0;

// Text shown in the item
final textToShow = widget.item.description.split('\n').first;

return Container(
key: itemCardWidgetKey,
constraints: const BoxConstraints(minHeight: 70),
Expand Down Expand Up @@ -155,7 +158,7 @@ class _ItemCardState extends State<ItemCard> {
// On mobile
if (ResponsiveBreakpoints.of(context).isMobile) {
return Text(
widget.item.description,
textToShow,
style: TextStyle(
fontSize: 20,
decoration: widget.item.completed ? TextDecoration.lineThrough : TextDecoration.none,
Expand All @@ -168,7 +171,7 @@ class _ItemCardState extends State<ItemCard> {
// On tablet and up
else {
return Text(
widget.item.description,
textToShow,
style: TextStyle(
fontSize: 25,
decoration: widget.item.completed ? TextDecoration.lineThrough : TextDecoration.none,
Expand Down

0 comments on commit d9450d4

Please sign in to comment.