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-12-23 10:36:29 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0770bb8d04d05d6c5c8c4c9e84421c6b56fe4962
0770bb8d
1 parent
5434d31d
Add LayoutWidgetBuilder
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
pdf/CHANGELOG.md
pdf/lib/widgets/basic.dart
pdf/CHANGELOG.md
View file @
0770bb8
...
...
@@ -3,6 +3,7 @@
## 1.14.0
-
A borderRadius can only be given for a uniform Border
-
Add LayoutWidgetBuilder
## 1.13.0
...
...
pdf/lib/widgets/basic.dart
View file @
0770bb8
...
...
@@ -675,6 +675,33 @@ class Builder extends StatelessWidget {
Widget
build
(
Context
context
)
=>
builder
(
context
);
}
/// The signature of the [LayoutBuilder] builder function.
typedef
LayoutWidgetBuilder
=
Widget
Function
(
Context
context
,
BoxConstraints
constraints
);
/// Builds a widget tree that can depend on the parent widget's size.
class
LayoutBuilder
extends
StatelessWidget
{
/// Creates a widget that defers its building until layout.
LayoutBuilder
({
@required
this
.
builder
,
})
:
assert
(
builder
!=
null
);
/// Called at layout time to construct the widget tree.
final
LayoutWidgetBuilder
builder
;
BoxConstraints
_constraints
;
@override
void
layout
(
Context
context
,
BoxConstraints
constraints
,
{
bool
parentUsesSize
=
false
})
{
_constraints
=
constraints
;
super
.
layout
(
context
,
constraints
);
}
@override
Widget
build
(
Context
context
)
=>
builder
(
context
,
_constraints
);
}
class
FullPage
extends
SingleChildWidget
{
FullPage
({
@required
this
.
ignoreMargins
,
...
...
Please
register
or
login
to post a comment