|
|
|
|
@ -1,20 +1,16 @@
|
|
|
|
|
import 'package:barcode_scan/platform_wrapper.dart';
|
|
|
|
|
import 'package:driverapp/config/size_config.dart';
|
|
|
|
|
import 'package:driverapp/core/enum/viewstate.dart';
|
|
|
|
|
import 'package:driverapp/core/viewModels/orders_view_model.dart';
|
|
|
|
|
import 'package:driverapp/uitl/app_toast.dart';
|
|
|
|
|
import 'package:driverapp/uitl/utils.dart';
|
|
|
|
|
import 'package:driverapp/pages/delivery/information_page.dart';
|
|
|
|
|
import 'package:driverapp/pages/orders/pending_orders_page.dart';
|
|
|
|
|
import 'package:driverapp/uitl/app_toast.dart';
|
|
|
|
|
import 'package:driverapp/uitl/utils.dart';
|
|
|
|
|
import 'package:driverapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:driverapp/widgets/others/rounded_container.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
import '../base/base_view.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:driverapp/app-icons/driver_app_icons.dart';
|
|
|
|
|
import 'package:driverapp/widgets/others/rounded_container.dart';
|
|
|
|
|
import 'package:driverapp/pages/orders/pending_orders_page.dart';
|
|
|
|
|
import 'package:driverapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
|
|
|
|
|
class DashboardScreen extends StatefulWidget {
|
|
|
|
|
@override
|
|
|
|
|
@ -385,70 +381,71 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
model.orders[index].firstName +
|
|
|
|
|
' ' +
|
|
|
|
|
model.orders[index].lastName,
|
|
|
|
|
style: TextStyle(fontSize: 18.0),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
model.orders[index].mobileNumber,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Color(0xff30B7B9),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 15.0),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
model.orders[index].firstName +
|
|
|
|
|
' ' +
|
|
|
|
|
model.orders[index].lastName,
|
|
|
|
|
style: TextStyle(fontSize: 18.0),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
model.orders[index].mobileNumber,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Color(0xff30B7B9),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 15.0),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Text(
|
|
|
|
|
'Olaya ST, Behind kfc next to king ,Olaya ST ',
|
|
|
|
|
style: TextStyle(color: Colors.black45),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: CircleAvatar(
|
|
|
|
|
backgroundColor: Colors.black45,
|
|
|
|
|
radius: 28.0,
|
|
|
|
|
child: CircleAvatar(
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
maxRadius: 25.1,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
'Olaya ST, Behind kfc next to king ,Olaya ST ',
|
|
|
|
|
'3 K.m \n away',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black45),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: CircleAvatar(
|
|
|
|
|
backgroundColor: Colors.black45,
|
|
|
|
|
radius: 28.0,
|
|
|
|
|
child: CircleAvatar(
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
maxRadius: 25.1,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding:
|
|
|
|
|
const EdgeInsets.all(8.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
'3 K.m \n away',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Color(0xff30B7B9),
|
|
|
|
|
fontSize: 12.5,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.w600),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
color: Color(0xff30B7B9),
|
|
|
|
|
fontSize: 12.5,
|
|
|
|
|
fontWeight: FontWeight.w600),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => OrdersListScreen()),
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) =>
|
|
|
|
|
InformationPage(model.orders[index])));
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|