add invoice pdf
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:fcs/domain/constants.dart';
|
||||
import 'package:fcs/domain/entities/invoice.dart';
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/pages/invoice/invoice_info.dart';
|
||||
import 'package:fcs/pages/widgets/bottom_up_page_route.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@@ -12,7 +12,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
import 'invoice_editor.dart';
|
||||
import 'payment_page.dart';
|
||||
import 'payment_pdf_screen.dart';
|
||||
|
||||
@@ -81,11 +80,11 @@ class _InvoiceListRowState extends State<InvoiceListRow> {
|
||||
owner
|
||||
? Navigator.of(context).push(CupertinoPageRoute(
|
||||
builder: (context) => PaymentPDFScreen(
|
||||
path: pdfPath,
|
||||
url: _invoice.invoiceURL,
|
||||
)))
|
||||
: Navigator.of(context).push(CupertinoPageRoute(
|
||||
builder: (context) => PaymentPDFScreen(
|
||||
path: pdfPath,
|
||||
url: _invoice.invoiceURL,
|
||||
)));
|
||||
},
|
||||
child: new Row(
|
||||
@@ -132,7 +131,7 @@ class _InvoiceListRowState extends State<InvoiceListRow> {
|
||||
// padding: const EdgeInsets.all(0),
|
||||
// child: getStatus(_invoice.status),
|
||||
// ),
|
||||
_invoice.status == "Pending"
|
||||
_invoice.status == invoice_issued_status
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(left: 10.0),
|
||||
child: InkWell(
|
||||
@@ -191,10 +190,11 @@ class _InvoiceListRowState extends State<InvoiceListRow> {
|
||||
),
|
||||
],
|
||||
),
|
||||
onPressed: () {
|
||||
onPressed: () async {
|
||||
//to go invoice info page
|
||||
Navigator.pop(context);
|
||||
Navigator.of(context).push(CupertinoPageRoute(
|
||||
builder: (context) => InvoiceInfoPage(invoice: _invoice)));
|
||||
builder: (context) => InvoiceInfo(invoice: _invoice)));
|
||||
},
|
||||
)
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user