update invoice
This commit is contained in:
86
lib/pages/rates/custom_list.dart
Normal file
86
lib/pages/rates/custom_list.dart
Normal file
@@ -0,0 +1,86 @@
|
||||
import 'package:fcs/domain/entities/custom.dart';
|
||||
import 'package:fcs/domain/vo/delivery_address.dart';
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/pages/delivery_address/delivery_address_editor.dart';
|
||||
import 'package:fcs/pages/main/util.dart';
|
||||
import 'package:fcs/pages/rates/custom_editor.dart';
|
||||
import 'package:fcs/pages/widgets/bottom_up_page_route.dart';
|
||||
import 'package:fcs/pages/widgets/local_text.dart';
|
||||
import 'package:fcs/pages/widgets/progress.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'custom_row.dart';
|
||||
import 'model/shipment_rate_model.dart';
|
||||
|
||||
class CustomList extends StatefulWidget {
|
||||
const CustomList({Key key}) : super(key: key);
|
||||
@override
|
||||
_CustomListState createState() => _CustomListState();
|
||||
}
|
||||
|
||||
class _CustomListState extends State<CustomList> {
|
||||
bool _isLoading = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var shipmentRateModel = Provider.of<ShipmentRateModel>(context);
|
||||
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
leading: new IconButton(
|
||||
icon: new Icon(CupertinoIcons.back),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
),
|
||||
backgroundColor: primaryColor,
|
||||
title: LocalText(
|
||||
context,
|
||||
"Customs",
|
||||
fontSize: 20,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: ListView.separated(
|
||||
separatorBuilder: (c, i) => Divider(
|
||||
color: primaryColor,
|
||||
),
|
||||
itemCount: shipmentRateModel.customs.length,
|
||||
itemBuilder: (context, index) {
|
||||
return _row(context, shipmentRateModel.customs[index]);
|
||||
}),
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
_row(BuildContext context, Custom custom) {
|
||||
return InkWell(
|
||||
onTap: () => Navigator.pop<Custom>(context, custom),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: CustomRow(
|
||||
key: ValueKey(custom.id),
|
||||
custom: custom,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user