add shipments
This commit is contained in:
@@ -57,16 +57,6 @@ class _ShipmentListState extends State<ShipmentList> {
|
||||
// onPressed: () => showPlacesSearch(context),
|
||||
),
|
||||
],
|
||||
// bottom: TabBar(
|
||||
// unselectedLabelColor: Colors.grey,
|
||||
// tabs: [
|
||||
// Tab(
|
||||
// text: "Upcoming",
|
||||
// ),
|
||||
// Tab(text: "Completed"),
|
||||
// Tab(text: "Canceled"),
|
||||
// ],
|
||||
// ),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
@@ -87,14 +77,6 @@ class _ShipmentListState extends State<ShipmentList> {
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return ShipmentListRow(pickUp: pickupModel.pickups[index]);
|
||||
}),
|
||||
// body: TabBarView(
|
||||
// children: [
|
||||
// //Icon(Icons.directions_car),
|
||||
// _upComing(),
|
||||
// _completed(),
|
||||
// _canceled()
|
||||
// ],
|
||||
// )
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -103,67 +85,4 @@ class _ShipmentListState extends State<ShipmentList> {
|
||||
_newPickup() {
|
||||
Navigator.of(context).push(BottomUpPageRoute(ShipmentEditor()));
|
||||
}
|
||||
|
||||
Widget _upComing() {
|
||||
var pickupModel = Provider.of<ShipmentModel>(context);
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: new ListView.separated(
|
||||
separatorBuilder: (context, index) => Divider(
|
||||
color: Colors.black,
|
||||
),
|
||||
scrollDirection: Axis.vertical,
|
||||
padding: EdgeInsets.only(top: 15),
|
||||
shrinkWrap: true,
|
||||
itemCount: pickupModel.upcoming.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return ShipmentListRow(pickUp: pickupModel.upcoming[index]);
|
||||
}),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _completed() {
|
||||
var pickupModel = Provider.of<ShipmentModel>(context);
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: new ListView.separated(
|
||||
separatorBuilder: (context, index) => Divider(
|
||||
color: Colors.black,
|
||||
),
|
||||
scrollDirection: Axis.vertical,
|
||||
padding: EdgeInsets.only(top: 15),
|
||||
shrinkWrap: true,
|
||||
itemCount: pickupModel.completed.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return ShipmentListRow(pickUp: pickupModel.completed[index]);
|
||||
}),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _canceled() {
|
||||
var pickupModel = Provider.of<ShipmentModel>(context);
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: new ListView.separated(
|
||||
separatorBuilder: (context, index) => Divider(
|
||||
color: Colors.black,
|
||||
),
|
||||
scrollDirection: Axis.vertical,
|
||||
padding: EdgeInsets.only(top: 15),
|
||||
shrinkWrap: true,
|
||||
itemCount: pickupModel.canceled.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return ShipmentListRow(pickUp: pickupModel.canceled[index]);
|
||||
}),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user