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 16:29:18 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f1c65d149bb731cca7fb53c90c02de44c4bcdf8b
f1c65d14
1 parent
ada72419
Add Divider Widget
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
0 deletions
pdf/CHANGELOG.md
pdf/lib/widgets/basic.dart
pdf/CHANGELOG.md
View file @
f1c65d1
...
...
@@ -7,6 +7,7 @@
-
Add dashed lines to Decoration Widgets
-
Add TableRow decoration
-
Add Chart Widget
[
Marco Papula
]
-
Add Divider Widget
## 1.6.2
...
...
pdf/lib/widgets/basic.dart
View file @
f1c65d1
...
...
@@ -766,3 +766,56 @@ class Opacity extends SingleChildWidget {
}
}
}
class
Divider
extends
StatelessWidget
{
Divider
({
this
.
height
,
this
.
thickness
,
this
.
indent
,
this
.
endIndent
,
this
.
color
,
})
:
assert
(
height
==
null
||
height
>=
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 height extent.
final
double
height
;
/// 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
height
=
this
.
height
??
16
;
final
double
thickness
=
this
.
thickness
??
1
;
final
double
indent
=
this
.
indent
??
0
;
final
double
endIndent
=
this
.
endIndent
??
0
;
return
SizedBox
(
height:
height
,
child:
Center
(
child:
Container
(
height:
thickness
,
margin:
EdgeInsets
.
only
(
left:
indent
,
right:
endIndent
),
decoration:
BoxDecoration
(
border:
BoxBorder
(
bottom:
true
,
color:
color
,
width:
thickness
,
),
),
),
),
);
}
}
...
...
Please
register
or
login
to post a comment