Skip to content

Commit

Permalink
fixed short desciptions
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-the-shark committed May 24, 2021
1 parent b119627 commit ebc3a38
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions lib/widgets/expander.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ class _ExpanderState extends State<Expander> {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
MarkdownBody(data: widget.body.split(" ").getRange(0, 50).join(" ")),
TextButton.icon(
onPressed: () => setState(() {
expanded = true;
}),
icon: const Icon(Icons.keyboard_arrow_down),
label: Text("Czytaj więcej"))
MarkdownBody(data: widget.body.split(" ").take(50).join(" ")),
if (widget.body.split(" ").length > 50)
TextButton.icon(
onPressed: () => setState(() {
expanded = true;
}),
icon: const Icon(Icons.keyboard_arrow_down),
label: Text("Czytaj więcej"))
],
);
else
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: A new Flutter application.
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 0.7.1+7
version: 0.7.2+8

environment:
sdk: ">=2.6.0 <3.0.0"
Expand Down

0 comments on commit ebc3a38

Please sign in to comment.