Show PDF as route

This commit is contained in:
Hillel Coren 2021-01-19 11:49:15 +02:00
parent 65c290f5f2
commit 73996c68bc
1 changed files with 31 additions and 31 deletions

View File

@ -177,23 +177,7 @@ class _InvoicePdfViewState extends State<InvoicePdfView> {
Spacer(), Spacer(),
]; ];
return Scaffold( final deliveryNote = Theme(
backgroundColor: Colors.grey,
appBar: widget.showAppBar
? AppBar(
centerTitle: false,
automaticallyImplyLeading: isMobile(context),
title: Row(
children: [
if (isDesktop(context)) ...[
Text(localization.lookup('${invoice.entityType}') +
' ' +
(invoice.number ?? '')),
Spacer(),
],
if (isDesktop(context)) ...activitySelector,
if (isDesktop(context)) ...pageSelector,
Theme(
data: ThemeData( data: ThemeData(
unselectedWidgetColor: state.headerTextColor, unselectedWidgetColor: state.headerTextColor,
), ),
@ -217,7 +201,23 @@ class _InvoicePdfViewState extends State<InvoicePdfView> {
activeColor: state.accentColor, activeColor: state.accentColor,
), ),
), ),
), );
return Scaffold(
backgroundColor: Colors.grey,
appBar: widget.showAppBar
? AppBar(
centerTitle: false,
automaticallyImplyLeading: isMobile(context),
title: Row(
children: [
Text(localization.lookup('${invoice.entityType}') +
' ' +
invoice.number),
Spacer(),
if (isDesktop(context)) ...activitySelector,
if (isDesktop(context)) ...pageSelector,
if (isDesktop(context)) deliveryNote,
], ],
), ),
actions: <Widget>[ actions: <Widget>[