insert invoice pages
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
import 'package:fcs/pages/invoice/package_info.dart';
|
||||
import 'package:fcs/pages/util.dart';
|
||||
import 'package:fcs/pages_fcs/package_editor.dart';
|
||||
import 'package:fcs/vo/package.dart';
|
||||
import 'package:fcs/widget/bottom_up_page_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class PackageListRow extends StatefulWidget {
|
||||
final bool isReadOnly;
|
||||
final Package package;
|
||||
const PackageListRow({this.package});
|
||||
const PackageListRow({this.package, this.isReadOnly});
|
||||
|
||||
@override
|
||||
_PackageListRowtate createState() => _PackageListRowtate();
|
||||
@@ -29,11 +32,17 @@ class _PackageListRowtate extends State<PackageListRow> {
|
||||
padding: EdgeInsets.only(left: 15, right: 15),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => PackageEditor(package: _package)),
|
||||
);
|
||||
if (widget.isReadOnly) {
|
||||
Navigator.push(
|
||||
context,
|
||||
BottomUpPageRoute(PackageInfo(package: _package)),
|
||||
);
|
||||
} else {
|
||||
Navigator.push(
|
||||
context,
|
||||
BottomUpPageRoute(PackageEditor(package: _package)),
|
||||
);
|
||||
}
|
||||
},
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
|
||||
Reference in New Issue
Block a user