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
2020-04-26 19:53:18 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
50e2bbece8f31cbd32ff99436e9252c1dce52d70
50e2bbec
1 parent
997755ab
Add VerticalDivider Widget
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
1 deletions
pdf/CHANGELOG.md
pdf/lib/widgets/basic.dart
pdf/CHANGELOG.md
View file @
50e2bbe
...
...
@@ -7,7 +7,7 @@
-
Add dashed lines to Decoration Widgets
-
Add TableRow decoration
-
Add Chart Widget
[
Marco Papula
]
-
Add Divider Widget
-
Add Divider
and VerticalDivider
Widget
-
Replace Theme with ThemeData
## 1.6.2
...
...
pdf/lib/widgets/basic.dart
View file @
50e2bbe
...
...
@@ -819,3 +819,56 @@ class Divider extends StatelessWidget {
);
}
}
class
VerticalDivider
extends
StatelessWidget
{
VerticalDivider
({
this
.
width
,
this
.
thickness
,
this
.
indent
,
this
.
endIndent
,
this
.
color
,
})
:
assert
(
width
==
null
||
width
>=
0.0
),
assert
(
thickness
==
null
||
thickness
>=
0.0
),
assert
(
indent
==
null
||
indent
>=
0.0
),
assert
(
endIndent
==
null
||
endIndent
>=
0.0
);
/// The color to use when painting the line.
final
PdfColor
color
;
/// The amount of empty space to the trailing edge of the divider.
final
double
endIndent
;
/// The divider's width extent.
final
double
width
;
/// The amount of empty space to the leading edge of the divider.
final
double
indent
;
/// The thickness of the line drawn within the divider.
final
double
thickness
;
@override
Widget
build
(
Context
context
)
{
final
double
width
=
this
.
width
??
16
;
final
double
thickness
=
this
.
thickness
??
1
;
final
double
indent
=
this
.
indent
??
0
;
final
double
endIndent
=
this
.
endIndent
??
0
;
return
SizedBox
(
width:
width
,
child:
Center
(
child:
Container
(
width:
thickness
,
margin:
EdgeInsets
.
only
(
top:
indent
,
bottom:
endIndent
),
decoration:
BoxDecoration
(
border:
BoxBorder
(
left:
true
,
color:
color
,
width:
thickness
,
),
),
),
),
);
}
}
...
...
Please
register
or
login
to post a comment