fix for slides
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:fcs/model/invoice_model.dart';
|
||||
import 'package:fcs/model/main_model.dart';
|
||||
import 'package:fcs/model/shipment_model.dart';
|
||||
import 'package:fcs/model_fcs/package_model.dart';
|
||||
import 'package:fcs/pages_fcs/package_list_row.dart';
|
||||
@@ -38,10 +39,12 @@ class _InvoiceListState extends State<InvoiceList> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var owner = Provider.of<MainModel>(context).isOwner();
|
||||
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
child: DefaultTabController(
|
||||
length: 3,
|
||||
length: 2,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
@@ -65,22 +68,21 @@ class _InvoiceListState extends State<InvoiceList> {
|
||||
bottom: TabBar(
|
||||
unselectedLabelColor: Colors.grey,
|
||||
tabs: [
|
||||
Tab(text: "Boxes"),
|
||||
Tab(text: "Pending"),
|
||||
Tab(text: "Paid"),
|
||||
],
|
||||
),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton.extended(
|
||||
floatingActionButton:owner? FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
_newInvoice();
|
||||
},
|
||||
icon: Icon(Icons.add),
|
||||
label: Text(AppTranslations.of(context).text("invoices.add")),
|
||||
backgroundColor: primaryColor,
|
||||
),
|
||||
):null,
|
||||
body: TabBarView(
|
||||
children: [_packages(), _pending(), _paided()],
|
||||
children: [ _pending(), _paided()],
|
||||
)),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -128,23 +128,33 @@ class _InvoiceListRowState extends State<InvoiceListRow> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(0),
|
||||
child: getStatus(_invoice.status),
|
||||
),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(0),
|
||||
// child: getStatus(_invoice.status),
|
||||
// ),
|
||||
_invoice.status=="Pending"?
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 10.0),
|
||||
child: InkWell(
|
||||
child: Icon(
|
||||
Icons.payment,
|
||||
color: primaryColor,
|
||||
child: RaisedButton(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Icon(
|
||||
Icons.payment,
|
||||
color: primaryColor,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left:8.0),
|
||||
child: Text("Payment"),
|
||||
)
|
||||
],
|
||||
),
|
||||
onTap: () {
|
||||
onPressed: () {
|
||||
Navigator.of(context)
|
||||
.push(BottomUpPageRoute(PaymentPage(invoice: _invoice)));
|
||||
},
|
||||
),
|
||||
),
|
||||
)),
|
||||
):Container(),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: InkWell(
|
||||
|
||||
@@ -30,8 +30,7 @@ class _PaymentPDFScreenState extends State<PaymentPDFScreen>
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: primaryColor,
|
||||
title: LocalText(context, 'pdf_view.title',
|
||||
color: Colors.white, fontSize: 20),
|
||||
title:Text("Invoice File"),
|
||||
actions: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(Icons.share),
|
||||
@@ -95,21 +94,21 @@ class _PaymentPDFScreenState extends State<PaymentPDFScreen>
|
||||
// )
|
||||
],
|
||||
),
|
||||
floatingActionButton: FutureBuilder<PDFViewController>(
|
||||
future: _controller.future,
|
||||
builder: (context, AsyncSnapshot<PDFViewController> snapshot) {
|
||||
if (snapshot.hasData) {
|
||||
return FloatingActionButton.extended(
|
||||
label: Text("Go to ${pages ~/ 2}"),
|
||||
onPressed: () async {
|
||||
await snapshot.data.setPage(pages ~/ 2);
|
||||
},
|
||||
);
|
||||
}
|
||||
// floatingActionButton: FutureBuilder<PDFViewController>(
|
||||
// future: _controller.future,
|
||||
// builder: (context, AsyncSnapshot<PDFViewController> snapshot) {
|
||||
// if (snapshot.hasData) {
|
||||
// return FloatingActionButton.extended(
|
||||
// label: Text("Go to ${pages ~/ 2}"),
|
||||
// onPressed: () async {
|
||||
// await snapshot.data.setPage(pages ~/ 2);
|
||||
// },
|
||||
// );
|
||||
// }
|
||||
|
||||
return Container();
|
||||
},
|
||||
),
|
||||
// return Container();
|
||||
// },
|
||||
// ),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user