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
David PHAM-VAN
2019-04-01 19:44:30 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
05851354831722c03b30ceead058d900ca6e0858
05851354
1 parent
4be21f58
Add TextStyle::merge()
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
pdf/lib/widgets/theme.dart
pdf/lib/widgets/theme.dart
View file @
0585135
...
...
@@ -74,6 +74,23 @@ class TextStyle {
);
}
TextStyle
merge
(
TextStyle
other
)
{
if
(
other
==
null
)
{
return
this
;
}
return
copyWith
(
color:
other
.
color
,
font:
other
.
font
,
fontSize:
other
.
fontSize
,
letterSpacing:
other
.
letterSpacing
,
wordSpacing:
other
.
wordSpacing
,
lineSpacing:
other
.
lineSpacing
,
height:
other
.
height
,
background:
other
.
background
,
);
}
@override
String
toString
()
=>
'TextStyle(color:
$color
font:
$font
letterSpacing:
$letterSpacing
wordSpacing:
$wordSpacing
lineSpacing:
$lineSpacing
height:
$height
background:
$background
)'
;
...
...
Please
register
or
login
to post a comment