deliveryboy commit

dev
suresh 2 years ago
parent 130839069d
commit 0bd37c03c6

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

@ -1,365 +1,441 @@
import 'dart:convert';
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_flutter_android/google_maps_flutter_android.dart';
import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:watermanagement_deliveryboy/model/getdeliveryboy_model.dart'; import 'package:image_picker/image_picker.dart';
import 'package:watermanagement_deliveryboy/settings.dart'; import 'package:watermanagement/delivrybookingdata.dart';
import 'package:watermanagement/login.dart';
import 'package:watermanagement/settings.dart';
import 'dart:io';
class Dashboard extends StatefulWidget { class Dashboard extends StatefulWidget {
const Dashboard({Key? key}) : super(key: key); const Dashboard({super.key});
@override @override
State<Dashboard> createState() => _DashboardState(); State<Dashboard> createState() => _DashboardState();
} }
class _DashboardState extends State<Dashboard> with TickerProviderStateMixin { class _DashboardState extends State<Dashboard> {
bool isSupplierDataLoading=false; int _selectedIndex = 0;
bool isSereverIssue = false;
bool isSereverIssueConnected = false; TextEditingController tankNameController = TextEditingController();
bool isSereverIssuePending = false; TextEditingController blockNameController = TextEditingController();
TextEditingController capacityController = TextEditingController();
List<GetDeliveryboyDetailsModel> connectedSuppliersList = [];
bool isLoading=false;
Future<void> getConnectedSuppliersData() async { static const TextStyle optionStyle =
isLoading = true; TextStyle(fontSize: 30, fontWeight: FontWeight.bold);
final ImagePicker _picker = ImagePicker();
Future pickImageFromGallery() async {
try { try {
var response = await AppSettings.getdeliveryboybookings(); final image = await _picker.pickImage(source: ImageSource.gallery);
if (image == null) return;
final imageTemp = File(image.path);
setState(() { setState(() {
connectedSuppliersList = AppSettings.updatedImage = imageTemp;
((jsonDecode(response)['data']) as List).map((dynamic model) {
return GetDeliveryboyDetailsModel.fromJson(model);
}).toList();
isLoading = false;
}); });
// uploadProfileApi(AppSettings.updatedImage);
AppSettings.saveProfile(image.path);
} catch (e) { } on PlatformException catch (e) {
print('Failed to pick image: $e');
}
}
Future takeImageFromCamera() async {
try {
final image = await _picker.pickImage(source: ImageSource.camera);
if (image == null) return;
final imageTemp = File(image.path);
setState(() { setState(() {
isLoading = false; AppSettings.updatedImage = imageTemp;
isSereverIssueConnected = true;
}); });
//uploadProfileApi(AppSettings.updatedImage);
AppSettings.saveProfile(image.path);
} on PlatformException catch (e) {
print('Failed to pick image: $e');
} }
} }
Widget _dashBoard() {
@override return Container(
void initState() { color: screenBackgroundColor,
// TODO: implement initState child: Column(
getConnectedSuppliersData(); children: <Widget>[
super.initState(); Container(
} height: MediaQuery.of(context).size.height * .330,
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(0),
),
//color: Colors.red,
child: FittedBox(
child:Image(
image: const AssetImage('images/appbgsuplier.png'),
),
fit: BoxFit.fill,
)
),
SizedBox(
height: 5
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => DelivryBookingData()),
);
},
child: Container(
padding: EdgeInsets.all(05),
margin: EdgeInsets.only(left:15, top:10, right: 0, bottom:0),
//height: MediaQuery.of(context).size.height * .05,
//width: MediaQuery.of(context).size.width * .45,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
),
// Change button text when light changes state.
Widget connectedTankers(){
if (connectedSuppliersList.length != 0) {
return ListView.builder(
padding: EdgeInsets.all(8),
itemCount: connectedSuppliersList.length,
itemBuilder: (BuildContext context, int index) {
return Card(
child: Padding(
padding: EdgeInsets.all(8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
// width: MediaQuery.of(context).size.width * .75,
child: Column( child: Column(
mainAxisAlignment: children: [
MainAxisAlignment.spaceBetween, Container(
crossAxisAlignment: CrossAxisAlignment.start, padding: EdgeInsets.fromLTRB(35, 10,0,0),
children: [ child: new SvgPicture.asset("assets/images/tanklevels.svg")
Row(
children: [
Text('TankerName :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
),
Text(
connectedSuppliersList[index]
.tankerName
.toUpperCase(),
style: valuesTextStyle()),
],
),
Row(
children: [
Text('Bookingid :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
),
Text(
connectedSuppliersList [index]
.bookingid
.toString(),
style: valuesTextStyle()),
],
),
Row(
children: [
Text('SupplierId :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
),
Text(connectedSuppliersList[index].supplierId,
style: valuesTextStyle()),
],
), ),
Row( Text('Booking Data',style: dashboardTextStyle(),),
children: [
Text('DateOfOrder :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
),
Text(connectedSuppliersList[index].dateOfOrder,
style: valuesTextStyle()),
],
),
Row(
children: [
Text('Typeofwater :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
),
Text(connectedSuppliersList[index].typeofwater,
style: valuesTextStyle()),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Column(
children: [
IconButton(
iconSize: 30,
icon: const Icon(
Icons.phone,
color: primaryColor,
),
onPressed: () async {
final Uri _phoneUri = Uri(
scheme: "tel",
path: connectedSuppliersList[index]
.delivery_agent_mobile);
try {
await launch(
_phoneUri.toString());
} catch (error) {
throw ("Cannot dial");
}
},
),
Text(
'Call now',
style: iconBelowTextStyle(),
),
],
),
SizedBox(
width: 30,
),
Column(
children: [
IconButton(
iconSize: 30,
icon: const Icon(
Icons.start,
color: primaryColor,
),
onPressed: () {
/* showTankerBookingDialog(
tankersList[index]);*/
},
),
Text(
'Start Trip',
style: iconBelowTextStyle(),
),
],
),
SizedBox(
width: 30,
),
Column(
children: [
IconButton(
iconSize: 30,
icon: const Icon(
Icons.download,
color: primaryColor,
),
onPressed: () {
/* Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new BookedTanerDetails(myObject:tankersList[index].tanker_name)));*/
},
),
Text(
'Download Water',
style: iconBelowTextStyle(),
),
],
),
],
)
], ],
), ),
), ),
/* Expanded( )),
child:TextButton(
child: const Text( ],
'Connect', ),
style: TextStyle(fontSize: 15,
decoration: TextDecoration.underline,color: primaryColor), //==============================list2
),
onPressed: () { ],
}, ),
)),*/ );
/* Expanded( }
child: IconButton(
showLogoutAlertDialog(context){
return showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return StatefulBuilder(
builder: (BuildContext context, StateSetter setState) {
return AlertDialog(
title: const Text('Do you really want to logout?'),
actions: <Widget>[
TextButton(
child: Text('No',style:textButtonStyle()),
onPressed: () { onPressed: () {
//showTankerUpdateDialog(tankersList[index]); Navigator.of(context).pop();
}, },
icon: Icon(Icons.edit),
color: primaryColor,
), ),
), TextButton(
SizedBox( child: Text('Yes',style:textButtonStyle()),
width: 5, onPressed: () async{
), await AppSettings.clearSharedPreferences();
Expanded( await Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => Login()),(Route<dynamic> route) => false,);
child: IconButton(
onPressed: () async {
showDialog(
context: context,
builder: (BuildContext context) =>
AlertDialog(
title: const Text(
'Do you want to delete Tanker?',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
actionsAlignment:
MainAxisAlignment.spaceBetween,
actions: [
TextButton(
onPressed: () async {
bool deletePipelineStatus =
await AppSettings.deleteTanker(
tankersList[index]
.tanker_name);
if (deletePipelineStatus) {
getTankers();
AppSettings.longSuccessToast(
'Tanker deleted successfully');
Navigator.of(context).pop(true);
} else {
AppSettings.longFailedToast(
'Tanker deletion failed');
Navigator.of(context).pop(true);
}
},
child: const Text('Yes',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
),
TextButton(
onPressed: () {
Navigator.of(context).pop(true);
},
child: const Text('No',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
),
],
),
);
}, },
icon: Icon(Icons.delete),
color: primaryColor,
), ),
)*/ ]
],
);
});
}
);
}
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
if(_selectedIndex==0){
final shouldPop = await showDialog<bool>(context: context, builder: (context) {
return AlertDialog(
title: const Text('Do you want to exit app?',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
actionsAlignment: MainAxisAlignment.spaceBetween,
actions: [
TextButton(
onPressed: () {
SystemNavigator.pop();
},
child: const Text('Yes',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
), ),
), TextButton(
onPressed: () {
Navigator.of(context).pop(false);
},
child: const Text('No',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
),
],
); );
},
);
return shouldPop!;
}
else{
setState(() {
_selectedIndex=0;
}); });
} return false;
else { }
return Center(
child: Padding( },
padding: EdgeInsets.fromLTRB(0, 40, 0, 0), child: Scaffold(
child: isSereverIssueConnected resizeToAvoidBottomInset: false,
? Column( appBar:AppSettings.appBar('Arminta Water Management'),
mainAxisAlignment: MainAxisAlignment.center, drawer: Drawer(
children: [ // Add a ListView to the drawer. This ensures the user can scroll
Image( // through the options in the drawer if there isn't enough vertical
image: AssetImage('images/serverissue.png'), // space to fit everything.
// height: MediaQuery.of(context).size.height * .10, //backgroundColor: screenBackgroundColor,
child: ListView(
// Important: Remove any padding from the ListView.
padding: EdgeInsets.zero,
children: [
DrawerHeader(
decoration: const BoxDecoration(
color: primaryColor,
),
child: Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: GestureDetector(
child: Container(
width: MediaQuery.of(context).size.width * .20,
height: MediaQuery.of(context).size.height * .15,
decoration: BoxDecoration(
shape: BoxShape.circle,
image: DecorationImage(
image: (AppSettings.updatedImage != null) ? FileImage(AppSettings.updatedImage!) as ImageProvider : AssetImage("images/profile_pic.png"), // picked file
fit: BoxFit.cover)),
),
onTap: () {
showModalBottomSheet<void>(
context: context,
builder: (BuildContext context) {
return SizedBox(
height: 200,
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
GestureDetector(
child: Icon(
Icons.camera_alt_outlined,
size: 100,
color: greyColor,
),
onTap: () async {
await takeImageFromCamera();
Navigator.pop(context);
},
),
SizedBox(
width:
MediaQuery.of(context).size.width * .20,
),
GestureDetector(
child: Icon(
Icons.photo,
size: 100,
color: greyColor,
),
onTap: () async {
await pickImageFromGallery();
Navigator.pop(context);
},
),
],
),
),
);
});
},
),),
Text(
AppSettings.deliveryBoyname,
style: TextStyle(color: Colors.white, fontSize: 15),
),
Text(
AppSettings.phoneNumber,
style: TextStyle(color: Colors.white, fontSize: 15),
),
/* Text(
AppSettings.email,
style: TextStyle(color: Colors.white, fontSize: 15),
),*/
],
),
Container()
],
)),
ListTile(
title: Row(
children: const [
Image(image: const AssetImage('images/editprofileblue.png'),height: 25,width: 25,fit: BoxFit.fill),
const SizedBox(
width: 10,
),
const SizedBox(
width: 10,
),
Text('Edit Profile',style: TextStyle(color:primaryColor)),
],
), ),
SizedBox( onTap: () {
height: 20,
/* Navigator.push(
context,
MaterialPageRoute(builder: (context) => UpdateProfile()),
);*/
},
),
Divider(
color: Colors.grey,
),
// Add Tanks
ListTile(
title: Row(
children: const [
Image(image: const AssetImage('images/connectionsblue.png'),height: 25,width: 25,fit: BoxFit.fill),
const SizedBox(
width: 10,
),
Text('Booking Data',style: TextStyle(color:primaryColor)),
],
), ),
Text( onTap: () {
'There is an issue at server please try after some time',style:serverIssueTextStyle() ,), Navigator.push(
], context,
) MaterialPageRoute(builder: (context) => DelivryBookingData()),
: Column( );
mainAxisAlignment: MainAxisAlignment.center, },
children: [ ),
Image( Divider(
image: AssetImage('images/no_data.png'), color: Colors.grey,
// height: MediaQuery.of(context).size.height * .10, ),
ListTile(
title: Row(
children: const [
Image(image: const AssetImage('images/customercareblue.png'),height: 25,width: 25,fit: BoxFit.fill),
const SizedBox(
width: 10,
),
Text('Customer Support', style: TextStyle(color:primaryColor)),
],
), ),
SizedBox( onTap: () {},
height: 20, ),
Divider(
color: Colors.grey,
),
ListTile(
title: Row(
children: const [
Image(image: const AssetImage('images/logoutblue.png'),height: 25,width: 25,fit: BoxFit.fill),
const SizedBox(
width: 10,
),
Text('Logout', style: TextStyle(color:primaryColor)),
],
), ),
Text( onTap: () async{
'No Connected Tankers',style:serverIssueTextStyle() ,),
],
), showLogoutAlertDialog(context);
));
}
}
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
appBar: AppSettings.appBar('Deliveryboy'),
body: isLoading?Center(
child: CircularProgressIndicator(
color: primaryColor,
strokeWidth: 5.0,
),
):connectedTankers(),
));
}
},
),
],
),
),
body: _dashBoard(),
/*body: IndexedStack(
index: _selectedIndex,
children: screens,
),*/
/* bottomNavigationBar: Container(
//height: MediaQuery.of(context).size.height,
child: BottomNavigationBar(
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(
Icons.home,
),
label: 'Home',
),
BottomNavigationBarItem(
icon: Icon(Icons.propane_tank),
label: 'Add Tanks',
),
*//*BottomNavigationBarItem(
icon: Icon(Icons.private_connectivity_outlined),
label: 'CreateConnections',
),*//*
BottomNavigationBarItem(
icon: Icon(Icons.list_alt),
label: 'Add Tanker',
),
],
currentIndex: _selectedIndex,
selectedItemColor: primaryColor,
unselectedItemColor: greyColor,
showUnselectedLabels: true,
onTap: _onItemTapped,
),
),*/
),
);
}
} }

@ -0,0 +1,366 @@
import 'dart:convert';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_flutter_android/google_maps_flutter_android.dart';
import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart';
import 'package:flutter/services.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:watermanagement/model/getdeliveryboy_model.dart';
import 'package:watermanagement/settings.dart';
class DelivryBookingData extends StatefulWidget {
const DelivryBookingData({Key? key}) : super(key: key);
@override
State<DelivryBookingData> createState() => _DelivryBookingDataState();
}
class _DelivryBookingDataState extends State<DelivryBookingData> with TickerProviderStateMixin {
bool isSupplierDataLoading=false;
bool isSereverIssue = false;
bool isSereverIssueConnected = false;
bool isSereverIssuePending = false;
List<GetDeliveryboyDetailsModel> connectedSuppliersList = [];
bool isLoading=false;
Future<void> getConnectedSuppliersData() async {
isLoading = true;
try {
var response = await AppSettings.getdeliveryboybookings();
setState(() {
connectedSuppliersList =
((jsonDecode(response)['data']) as List).map((dynamic model) {
return GetDeliveryboyDetailsModel.fromJson(model);
}).toList();
isLoading = false;
});
} catch (e) {
setState(() {
isLoading = false;
isSereverIssueConnected = true;
});
}
}
@override
void initState() {
// TODO: implement initState
getConnectedSuppliersData();
super.initState();
}
Widget connectedTankers(){
if (connectedSuppliersList.length != 0) {
return ListView.builder(
padding: EdgeInsets.all(8),
itemCount: connectedSuppliersList.length,
itemBuilder: (BuildContext context, int index) {
return Card(
child: Padding(
padding: EdgeInsets.all(8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
// width: MediaQuery.of(context).size.width * .75,
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text('TankerName :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
),
Text(
connectedSuppliersList[index]
.tankerName
.toUpperCase(),
style: valuesTextStyle()),
],
),
Row(
children: [
Text('Bookingid :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
),
Text(
connectedSuppliersList [index]
.bookingid
.toString(),
style: valuesTextStyle()),
],
),
Row(
children: [
Text('SupplierId :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
),
Text(connectedSuppliersList[index].supplierId,
style: valuesTextStyle()),
],
),
Row(
children: [
Text('DateOfOrder :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
),
Text(connectedSuppliersList[index].dateOfOrder,
style: valuesTextStyle()),
],
),
Row(
children: [
Text('Typeofwater :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
),
Text(connectedSuppliersList[index].typeofwater,
style: valuesTextStyle()),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Column(
children: [
IconButton(
iconSize: 30,
icon: const Icon(
Icons.phone,
color: primaryColor,
),
onPressed: () async {
final Uri _phoneUri = Uri(
scheme: "tel",
path: connectedSuppliersList[index]
.delivery_agent_mobile);
try {
await launch(
_phoneUri.toString());
} catch (error) {
throw ("Cannot dial");
}
},
),
Text(
'Call now',
style: iconBelowTextStyle(),
),
],
),
SizedBox(
width: 30,
),
Column(
children: [
IconButton(
iconSize: 30,
icon: const Icon(
Icons.start,
color: primaryColor,
),
onPressed: () {
/* showTankerBookingDialog(
tankersList[index]);*/
},
),
Text(
'Start Trip',
style: iconBelowTextStyle(),
),
],
),
SizedBox(
width: 30,
),
Column(
children: [
IconButton(
iconSize: 30,
icon: const Icon(
Icons.download,
color: primaryColor,
),
onPressed: () {
/* Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new BookedTanerDetails(myObject:tankersList[index].tanker_name)));*/
},
),
Text(
'Download Water',
style: iconBelowTextStyle(),
),
],
),
],
)
],
),
),
/* Expanded(
child:TextButton(
child: const Text(
'Connect',
style: TextStyle(fontSize: 15,
decoration: TextDecoration.underline,color: primaryColor),
),
onPressed: () {
},
)),*/
/* Expanded(
child: IconButton(
onPressed: () {
//showTankerUpdateDialog(tankersList[index]);
},
icon: Icon(Icons.edit),
color: primaryColor,
),
),
SizedBox(
width: 5,
),
Expanded(
child: IconButton(
onPressed: () async {
showDialog(
context: context,
builder: (BuildContext context) =>
AlertDialog(
title: const Text(
'Do you want to delete Tanker?',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
actionsAlignment:
MainAxisAlignment.spaceBetween,
actions: [
TextButton(
onPressed: () async {
bool deletePipelineStatus =
await AppSettings.deleteTanker(
tankersList[index]
.tanker_name);
if (deletePipelineStatus) {
getTankers();
AppSettings.longSuccessToast(
'Tanker deleted successfully');
Navigator.of(context).pop(true);
} else {
AppSettings.longFailedToast(
'Tanker deletion failed');
Navigator.of(context).pop(true);
}
},
child: const Text('Yes',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
),
TextButton(
onPressed: () {
Navigator.of(context).pop(true);
},
child: const Text('No',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
),
],
),
);
},
icon: Icon(Icons.delete),
color: primaryColor,
),
)*/
],
),
),
);
});
}
else {
return Center(
child: Padding(
padding: EdgeInsets.fromLTRB(0, 40, 0, 0),
child: isSereverIssueConnected
? Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image(
image: AssetImage('images/serverissue.png'),
// height: MediaQuery.of(context).size.height * .10,
),
SizedBox(
height: 20,
),
Text(
'There is an issue at server please try after some time',style:serverIssueTextStyle() ,),
],
)
: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image(
image: AssetImage('images/no_data.png'),
// height: MediaQuery.of(context).size.height * .10,
),
SizedBox(
height: 20,
),
Text(
'No Connected Tankers',style:serverIssueTextStyle() ,),
],
),
));
}
}
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
appBar: AppSettings.appBar('Deliveryboy'),
body: isLoading?Center(
child: CircularProgressIndicator(
color: primaryColor,
strokeWidth: 5.0,
),
):connectedTankers(),
));
}
}

@ -1,8 +1,9 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:path/path.dart' as Path; import 'package:path/path.dart' as Path;
import 'package:watermanagement_deliveryboy/otpscreen.dart'; import 'package:watermanagement/otpscreen.dart';
import 'package:watermanagement_deliveryboy/settings.dart'; import 'package:watermanagement/settings.dart';
class Login extends StatefulWidget { class Login extends StatefulWidget {
const Login({super.key}); const Login({super.key});

@ -1,7 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:sizer/sizer.dart'; import 'package:sizer/sizer.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:watermanagement_deliveryboy/splash_screen.dart'; import 'package:watermanagement/splash_screen.dart';
void main () async { void main () async {
// Set default home. // Set default home.

@ -8,6 +8,15 @@ class GetDeliveryboyDetailsModel {
String dateOfOrder=''; String dateOfOrder='';
String typeofwater=''; String typeofwater='';
String delivery_agent_mobile=''; String delivery_agent_mobile='';
String capacity='';
String address='';
String price='';
String customerId='';
@ -24,6 +33,11 @@ class GetDeliveryboyDetailsModel {
rtvm.dateOfOrder = json['dateOfOrder'] ??''; rtvm.dateOfOrder = json['dateOfOrder'] ??'';
rtvm.typeofwater = json['typeofwater'] ??''; rtvm.typeofwater = json['typeofwater'] ??'';
rtvm.delivery_agent_mobile = json['delivery_agent_mobile'] ??''; rtvm.delivery_agent_mobile = json['delivery_agent_mobile'] ??'';
rtvm.capacity = json['capacity'] ??'';
rtvm.address = json['address'] ??'';
rtvm.price = json['price'] ??'';
rtvm.customerId = json['customerId'] ??'';

@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:watermanagement_deliveryboy/dashboard.dart'; import 'package:watermanagement/dashboard.dart';
import 'package:watermanagement_deliveryboy/settings.dart'; import 'package:watermanagement/settings.dart';
class OtpScreen extends StatefulWidget { class OtpScreen extends StatefulWidget {
var phoneNumber; var phoneNumber;

@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:watermanagement_deliveryboy/settings.dart'; import 'package:watermanagement/settings.dart';
class Dialogs { class Dialogs {

@ -11,7 +11,8 @@ import 'package:intl/intl.dart';
import 'package:flutter_styled_toast/flutter_styled_toast.dart'; import 'package:flutter_styled_toast/flutter_styled_toast.dart';
import 'dart:async'; import 'dart:async';
import 'package:geolocator/geolocator.dart'; import 'package:geolocator/geolocator.dart';
import 'package:watermanagement_deliveryboy/preloader.dart'; import 'package:watermanagement/preloader.dart';
const Color primaryColor = Color(0XFF0D4E84); const Color primaryColor = Color(0XFF0D4E84);
const Color greyColor = Color(0XFF8F8E8E); const Color greyColor = Color(0XFF8F8E8E);
@ -88,7 +89,7 @@ class AppSettings {
static String customerId = ''; static String customerId = '';
static String customerIdsign = ''; static String customerIdsign = '';
static String profileImage = ''; static String profileImage = '';
static List<String> storedPreferenceValidKeys = ['username', 'access_token']; static List<String> storedPreferenceValidKeys = ['deliveryBoyname', 'access_token'];
static String preloadText = 'Please wait'; static String preloadText = 'Please wait';
static String latitude = ''; static String latitude = '';
static String longitude = ''; static String longitude = '';

@ -1,8 +1,10 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:watermanagement_deliveryboy/dashboard.dart'; import 'package:watermanagement/dashboard.dart';
import 'package:watermanagement_deliveryboy/login.dart'; import 'package:watermanagement/delivrybookingdata.dart';
import 'package:watermanagement_deliveryboy/settings.dart'; import 'package:watermanagement/login.dart';
import 'package:watermanagement/settings.dart';
void main() async{ void main() async{
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);

@ -1,4 +1,6 @@
name: watermanagement_deliveryboy name: watermanagement
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1 version: 1.0.0+1
@ -64,3 +66,6 @@ flutter:
uses-material-design: true uses-material-design: true
assets: assets:
- images/ - images/
- json/
- assets/images/

@ -7,7 +7,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:watermanagement_deliveryboy/splash_screen.dart'; import 'package:watermanagement/splash_screen.dart';
void main() { void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async { testWidgets('Counter increments smoke test', (WidgetTester tester) async {

Loading…
Cancel
Save