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
2021-04-02 08:42:40 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
dfe7cd12e391ec6d4713aa18607ca12b04055418
dfe7cd12
1 parent
86d5674d
Add Positioned.fill()
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
pdf/CHANGELOG.md
pdf/lib/src/widgets/stack.dart
pdf/CHANGELOG.md
View file @
dfe7cd1
...
...
@@ -3,6 +3,7 @@
## 3.1.1
-
Fix documentation
-
Add Positioned.fill()
## 3.1.0
...
...
pdf/lib/src/widgets/stack.dart
View file @
dfe7cd1
...
...
@@ -20,6 +20,7 @@ import 'package:pdf/pdf.dart';
import
'package:vector_math/vector_math_64.dart'
;
import
'geometry.dart'
;
import
'text.dart'
;
import
'widget.dart'
;
/// How to size the non-positioned children of a [Stack].
...
...
@@ -39,6 +40,46 @@ class Positioned extends SingleChildWidget {
required
Widget
child
,
})
:
super
(
child:
child
);
/// Creates a Positioned object with left, top, right, and bottom set to 0.0
/// unless a value for them is passed.
Positioned
.
fill
({
this
.
left
=
0.0
,
this
.
top
=
0.0
,
this
.
right
=
0.0
,
this
.
bottom
=
0.0
,
required
Widget
child
,
})
:
super
(
child:
child
);
/// Creates a widget that controls where a child of a [Stack] is positioned.
factory
Positioned
.
directional
({
required
TextDirection
textDirection
,
double
?
start
,
double
?
top
,
double
?
end
,
double
?
bottom
,
required
Widget
child
,
})
{
double
?
left
;
double
?
right
;
switch
(
textDirection
)
{
case
TextDirection
.
rtl
:
left
=
end
;
right
=
start
;
break
;
case
TextDirection
.
ltr
:
left
=
start
;
right
=
end
;
break
;
}
return
Positioned
(
left:
left
,
top:
top
,
right:
right
,
bottom:
bottom
,
child:
child
,
);
}
final
double
?
left
;
final
double
?
top
;
...
...
Please
register
or
login
to post a comment