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-16 07:38:36 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fac1fb22a8c177c1c42e43d605337e09de0bfc37
fac1fb22
1 parent
5688adc1
Use covariant on SpanningWidget
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
24 deletions
pdf/CHANGELOG.md
pdf/lib/src/widgets/flex.dart
pdf/lib/src/widgets/grid_view.dart
pdf/lib/src/widgets/multi_page.dart
pdf/lib/src/widgets/table.dart
pdf/lib/src/widgets/wrap.dart
pdf/CHANGELOG.md
View file @
fac1fb2
...
...
@@ -6,6 +6,7 @@
-
Improve Text rendering
-
Add individual cell decoration
-
Improve Bullet Widget
-
Use covariant on SpanningWidget
## 3.2.0
...
...
pdf/lib/src/widgets/flex.dart
View file @
fac1fb2
...
...
@@ -67,12 +67,10 @@ class _FlexContext extends WidgetContext {
int
lastChild
=
0
;
@override
void
apply
(
WidgetContext
other
)
{
if
(
other
is
_FlexContext
)
{
void
apply
(
_FlexContext
other
)
{
firstChild
=
other
.
firstChild
;
lastChild
=
other
.
lastChild
;
}
}
@override
WidgetContext
clone
()
{
...
...
@@ -504,11 +502,9 @@ class Flex extends MultiChildWidget implements SpanningWidget {
bool
get
hasMoreWidgets
=>
true
;
@override
void
restoreContext
(
WidgetContext
context
)
{
if
(
context
is
_FlexContext
)
{
void
restoreContext
(
_FlexContext
context
)
{
_context
.
firstChild
=
context
.
lastChild
;
}
}
@override
WidgetContext
saveContext
()
{
...
...
pdf/lib/src/widgets/grid_view.dart
View file @
fac1fb2
...
...
@@ -32,14 +32,12 @@ class _GridViewContext extends WidgetContext {
double
?
childMainAxis
;
@override
void
apply
(
WidgetContext
other
)
{
if
(
other
is
_GridViewContext
)
{
void
apply
(
_GridViewContext
other
)
{
firstChild
=
other
.
firstChild
;
lastChild
=
other
.
lastChild
;
childCrossAxis
=
other
.
childCrossAxis
;
childMainAxis
=
other
.
childMainAxis
;
}
}
@override
WidgetContext
clone
()
{
...
...
@@ -337,11 +335,9 @@ class GridView extends MultiChildWidget implements SpanningWidget {
bool
get
hasMoreWidgets
=>
true
;
@override
void
restoreContext
(
WidgetContext
context
)
{
if
(
context
is
_GridViewContext
)
{
void
restoreContext
(
_GridViewContext
context
)
{
_context
.
firstChild
=
context
.
lastChild
;
}
}
@override
WidgetContext
saveContext
()
{
...
...
pdf/lib/src/widgets/multi_page.dart
View file @
fac1fb2
...
...
@@ -34,7 +34,7 @@ import 'widget.dart';
abstract
class
WidgetContext
{
WidgetContext
clone
();
void
apply
(
WidgetContext
other
);
void
apply
(
covariant
WidgetContext
other
);
}
abstract
class
SpanningWidget
extends
Widget
{
...
...
@@ -48,7 +48,7 @@ abstract class SpanningWidget extends Widget {
/// Aplpy the context for next layout
@protected
void
restoreContext
(
WidgetContext
context
);
void
restoreContext
(
covariant
WidgetContext
context
);
}
class
NewPage
extends
Widget
{
...
...
pdf/lib/src/widgets/table.dart
View file @
fac1fb2
...
...
@@ -141,12 +141,10 @@ class _TableContext extends WidgetContext {
int
lastLine
=
0
;
@override
void
apply
(
WidgetContext
other
)
{
if
(
other
is
_TableContext
)
{
void
apply
(
_TableContext
other
)
{
firstLine
=
other
.
firstLine
;
lastLine
=
other
.
lastLine
;
}
}
@override
WidgetContext
clone
()
{
...
...
@@ -425,7 +423,7 @@ class Table extends Widget implements SpanningWidget {
}
@override
void
restoreContext
(
Widget
Context
context
)
{
void
restoreContext
(
_Table
Context
context
)
{
_context
.
apply
(
context
);
_context
.
firstLine
=
_context
.
lastLine
;
}
...
...
pdf/lib/src/widgets/wrap.dart
View file @
fac1fb2
...
...
@@ -50,12 +50,10 @@ class _WrapContext extends WidgetContext {
int
lastChild
=
0
;
@override
void
apply
(
WidgetContext
other
)
{
if
(
other
is
_WrapContext
)
{
void
apply
(
_WrapContext
other
)
{
firstChild
=
other
.
firstChild
;
lastChild
=
other
.
lastChild
;
}
}
@override
WidgetContext
clone
()
{
...
...
@@ -394,11 +392,9 @@ class Wrap extends MultiChildWidget implements SpanningWidget {
}
@override
void
restoreContext
(
WidgetContext
context
)
{
if
(
context
is
_WrapContext
)
{
void
restoreContext
(
_WrapContext
context
)
{
_context
.
firstChild
=
context
.
lastChild
;
}
}
@override
WidgetContext
saveContext
()
{
...
...
Please
register
or
login
to post a comment