Updated PDF library
This commit is contained in:
parent
b87a2bf7c6
commit
046ce92cb5
|
|
@ -83,8 +83,7 @@ class _DesignEditState extends State<DesignEdit>
|
||||||
_headerController.text = design.getSection(kDesignHeader);
|
_headerController.text = design.getSection(kDesignHeader);
|
||||||
_footerController.text = design.getSection(kDesignFooter);
|
_footerController.text = design.getSection(kDesignFooter);
|
||||||
_bodyController.text = design.getSection(kDesignBody);
|
_bodyController.text = design.getSection(kDesignBody);
|
||||||
_productsController.text =
|
_productsController.text = design.getSection(kDesignProducts);
|
||||||
design.getSection(kDesignProducts);
|
|
||||||
_tasksController.text = design.getSection(kDesignTasks);
|
_tasksController.text = design.getSection(kDesignTasks);
|
||||||
_includesController.text = design.getSection(kDesignIncludes);
|
_includesController.text = design.getSection(kDesignIncludes);
|
||||||
|
|
||||||
|
|
@ -395,7 +394,7 @@ class _DesignPreviewState extends State<DesignPreview> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_pdfController.dispose();
|
_pdfController?.dispose();
|
||||||
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
@ -408,7 +407,9 @@ class _DesignPreviewState extends State<DesignPreview> {
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
if (kIsWeb)
|
if (widget.pdfBytes == null)
|
||||||
|
SizedBox()
|
||||||
|
else if (kIsWeb)
|
||||||
HtmlElementView(viewType: _pdfString)
|
HtmlElementView(viewType: _pdfString)
|
||||||
else if (_pdfController != null)
|
else if (_pdfController != null)
|
||||||
Padding(
|
Padding(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue