Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
dart_pdf
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Kondamon
2021-10-20 12:09:32 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
David PHAM-VAN
2021-10-20 08:35:41 -0300
Commit
518b259d9f7f425a88e1a5f0375efd67257323d3
518b259d
1 parent
bb85b671
Fixes crash when array is empty (no characters)
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
pdf/lib/src/widgets/text.dart
pdf/lib/src/widgets/text.dart
View file @
518b259
...
...
@@ -503,10 +503,16 @@ class _Line {
final
bool
justify
;
double
get
height
=>
parent
.
_spans
.
sublist
(
firstSpan
,
lastSpan
)
double
get
height
{
final
list
=
parent
.
_spans
.
sublist
(
firstSpan
,
lastSpan
);
if
(
list
.
length
>
0
)
{
return
list
.
reduce
((
a
,
b
)
=>
a
.
height
>
b
.
height
?
a
:
b
)
.
height
;
}
else
{
return
0
;
}
}
@override
String
toString
()
=>
...
...
Please
register
or
login
to post a comment