modify
This commit is contained in:
@@ -15,8 +15,6 @@ import 'package:flutter_icons/flutter_icons.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:timeline_list/timeline.dart';
|
||||
import 'package:timeline_list/timeline_model.dart';
|
||||
|
||||
class PaymentPage extends StatefulWidget {
|
||||
final Invoice invoice;
|
||||
@@ -40,9 +38,7 @@ class _PaymentPageState extends State<PaymentPage> {
|
||||
Invoice _invoice = new Invoice();
|
||||
bool _isLoading = false;
|
||||
List<String> _receipts = [
|
||||
"assets/photos/1.jpg",
|
||||
"assets/photos/2.jpg",
|
||||
"assets/photos/3.jpg"
|
||||
"assets/photos/amazon_ins.png",
|
||||
];
|
||||
bool isNew;
|
||||
|
||||
@@ -50,6 +46,7 @@ class _PaymentPageState extends State<PaymentPage> {
|
||||
void initState() {
|
||||
if (widget.invoice != null) {
|
||||
_invoice = widget.invoice;
|
||||
multiImgController.setImageUrls = _receipts;
|
||||
}
|
||||
super.initState();
|
||||
}
|
||||
@@ -63,8 +60,6 @@ class _PaymentPageState extends State<PaymentPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var owner = Provider.of<MainModel>(context).isOwner();
|
||||
|
||||
// var images = isNew ? [] : _images;
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
@@ -81,6 +76,23 @@ class _PaymentPageState extends State<PaymentPage> {
|
||||
body: Card(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(15.0),
|
||||
child: Container(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
LocalText(context, 'total.amount',
|
||||
color: Colors.black, fontSize: 16),
|
||||
Text(
|
||||
' \$ ${_invoice.amount}',
|
||||
style: TextStyle(
|
||||
color: primaryColor,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold),
|
||||
)
|
||||
],
|
||||
)),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(15.0),
|
||||
child: Container(
|
||||
@@ -89,7 +101,7 @@ class _PaymentPageState extends State<PaymentPage> {
|
||||
LocalText(context, 'remaining_balance',
|
||||
color: Colors.black, fontSize: 16),
|
||||
Text(
|
||||
'${_invoice.amount}',
|
||||
' \$ ${_invoice.amount - _invoice.receipts[0].amount}',
|
||||
style: TextStyle(
|
||||
color: primaryColor,
|
||||
fontSize: 16,
|
||||
@@ -105,21 +117,30 @@ class _PaymentPageState extends State<PaymentPage> {
|
||||
title: LocalText(context, 'payment.attachment',
|
||||
color: Colors.black, fontSize: 16),
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 20),
|
||||
child: Row(children: <Widget>[
|
||||
LocalText(
|
||||
context,
|
||||
"invoice.payment",
|
||||
color: Colors.grey,
|
||||
fontSize: 14,
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 20),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 8),
|
||||
child: Text(
|
||||
'${dateFormatter.format(_invoice.receipts[0].date)} ',
|
||||
style: TextStyle(
|
||||
color: Colors.black, fontSize: 16),
|
||||
),
|
||||
),
|
||||
MultiImageFile(
|
||||
enabled: true,
|
||||
controller: multiImgController,
|
||||
title: "Receipt File",
|
||||
)
|
||||
])),
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 10),
|
||||
child: MultiImageFile(
|
||||
enabled: true,
|
||||
controller: multiImgController,
|
||||
title: "Receipt File",
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 25,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user