add pagination for invoice and update ui for material 3

This commit is contained in:
tzw
2024-01-26 16:56:20 +06:30
parent 93a5fe071a
commit 8d0f712bf4
32 changed files with 351 additions and 635 deletions

View File

@@ -3,7 +3,7 @@ import 'package:fcs/domain/entities/user.dart';
import 'package:fcs/helpers/theme.dart';
import 'package:fcs/pages/customer/model/customer_model.dart';
import 'package:fcs/pages/invoice/editor/invoice_editor.dart';
import 'package:fcs/pages/widgets/local_text.dart';
import 'package:fcs/pages/widgets/local_app_bar.dart';
import 'package:fcs/pages/widgets/progress.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@@ -44,20 +44,7 @@ class _InvoiceCustomerListState extends State<InvoiceCustomerList> {
return LocalProgress(
inAsyncCall: _isLoading,
child: Scaffold(
appBar: AppBar(
centerTitle: true,
leading: new IconButton(
icon: new Icon(CupertinoIcons.back),
onPressed: () => Navigator.of(context).pop(),
),
backgroundColor: primaryColor,
title: LocalText(
context,
"customer.list.title",
fontSize: 20,
color: Colors.white,
),
),
appBar: LocalAppBar(labelKey: 'customer.list.title'),
body: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
@@ -83,12 +70,10 @@ class _InvoiceCustomerListState extends State<InvoiceCustomerList> {
Widget _item(User customer) {
return InkWell(
onTap: () async {
bool created = await Navigator.of(context).push(CupertinoPageRoute(
bool? created = await Navigator.of(context).push(CupertinoPageRoute(
builder: (context) => InvoiceEditor(
customer: customer,
fcsShipment: widget.fcsShipment,
)));
if (created) {
customer: customer, fcsShipment: widget.fcsShipment)));
if (created ?? false) {
_load();
}
},