insert shipment form

This commit is contained in:
Thinzar Win
2020-06-01 14:24:45 +06:30
parent cb88e7b65c
commit 2e84ab17b9
20 changed files with 918 additions and 353 deletions

View File

@@ -1,4 +1,6 @@
import 'package:fcs/widget/localization/app_translations.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
@@ -30,58 +32,64 @@ class _StaffListState extends State<StaffList> {
inAsyncCall: _isLoading,
child: Scaffold(
appBar: AppBar(
centerTitle: true,
leading: new IconButton(
icon: new Icon(Icons.close),
onPressed: () => Navigator.of(context).pop(),
),
backgroundColor: primaryColor,
title: LocalText(
context,
'staff.title',
'staff.list.title',
color: Colors.white,
fontSize: 18,
fontSize: 20,
),
),
// floatingActionButton: FloatingActionButton(
// backgroundColor: primaryColor,
// child: Icon(Icons.add),
// onPressed: () {
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) => EmployeeEditor()),
// );
// },
// ),
body: new ListView.builder(
padding: EdgeInsets.only(left: 10, right: 10, top: 15),
floatingActionButton: FloatingActionButton.extended(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => StaffEditor()),
);
},
icon: Icon(Icons.add),
label: Text(AppTranslations.of(context).text("staff.new")),
backgroundColor: primaryColor,
),
body: new ListView.separated(
separatorBuilder: (context, index) => Divider(
color: Colors.black,
),
scrollDirection: Axis.vertical,
padding: EdgeInsets.only(left: 15, right: 15, top: 15),
shrinkWrap: true,
itemCount: employeeModel.employees.length,
itemBuilder: (BuildContext context, int index) {
User _user = employeeModel.employees[index];
return Container(
child: Card(
elevation: 10,
color: Colors.white,
child: InkWell(
User user = employeeModel.employees[index];
return Stack(
children: <Widget>[
InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
StaffEditor(staff: _user)),
builder: (context) => StaffEditor(staff: user)),
);
},
child: Row(
children: <Widget>[
Expanded(
child: new Padding(
padding: const EdgeInsets.symmetric(vertical: 20.0),
padding: const EdgeInsets.symmetric(vertical: 10.0),
child: new Row(
children: <Widget>[
new Padding(
padding: new EdgeInsets.symmetric(
horizontal: 32.0 - dotSize / 2),
child: Image.asset(
"assets/employee.png",
width: 40,
height: 40,
child: Icon(
SimpleLineIcons.people,
color: primaryColor,
size: 40,
),
),
new Expanded(
@@ -90,16 +98,20 @@ class _StaffListState extends State<StaffList> {
CrossAxisAlignment.start,
children: <Widget>[
new Text(
_user.name,
user.name,
style: new TextStyle(
fontSize: 15.0,
color: secondaryColor),
color: primaryColor),
),
new Text(
_user.phoneNumber,
style: new TextStyle(
fontSize: 13.0,
color: secondaryColor),
Padding(
padding:
const EdgeInsets.only(top: 8.0),
child: new Text(
user.phoneNumber,
style: new TextStyle(
fontSize: 15.0,
color: Colors.grey),
),
),
],
),
@@ -108,20 +120,10 @@ class _StaffListState extends State<StaffList> {
),
),
),
_user.status == null
? Container()
: Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: getStatus(_user.status),
),
],
)
],
),
),
),
],
);
}),
),