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,285 +1,196 @@
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_deliveryboy/model/getdeliveryboy_model.dart';
import 'package:watermanagement_deliveryboy/settings.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:image_picker/image_picker.dart';
import 'package:watermanagement/delivrybookingdata.dart';
import 'package:watermanagement/login.dart';
import 'package:watermanagement/settings.dart';
import 'dart:io';
class Dashboard extends StatefulWidget {
const Dashboard({Key? key}) : super(key: key);
const Dashboard({super.key});
@override
State<Dashboard> createState() => _DashboardState();
}
class _DashboardState extends State<Dashboard> with TickerProviderStateMixin {
bool isSupplierDataLoading=false;
bool isSereverIssue = false;
bool isSereverIssueConnected = false;
bool isSereverIssuePending = false;
class _DashboardState extends State<Dashboard> {
int _selectedIndex = 0;
TextEditingController tankNameController = TextEditingController();
TextEditingController blockNameController = TextEditingController();
TextEditingController capacityController = TextEditingController();
List<GetDeliveryboyDetailsModel> connectedSuppliersList = [];
bool isLoading=false;
Future<void> getConnectedSuppliersData() async {
isLoading = true;
static const TextStyle optionStyle =
TextStyle(fontSize: 30, fontWeight: FontWeight.bold);
final ImagePicker _picker = ImagePicker();
Future pickImageFromGallery() async {
try {
var response = await AppSettings.getdeliveryboybookings();
final image = await _picker.pickImage(source: ImageSource.gallery);
if (image == null) return;
final imageTemp = File(image.path);
setState(() {
connectedSuppliersList =
((jsonDecode(response)['data']) as List).map((dynamic model) {
return GetDeliveryboyDetailsModel.fromJson(model);
}).toList();
isLoading = false;
AppSettings.updatedImage = imageTemp;
});
// uploadProfileApi(AppSettings.updatedImage);
AppSettings.saveProfile(image.path);
} catch (e) {
setState(() {
isLoading = false;
isSereverIssueConnected = true;
});
} 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(() {
AppSettings.updatedImage = imageTemp;
});
//uploadProfileApi(AppSettings.updatedImage);
AppSettings.saveProfile(image.path);
@override
void initState() {
// TODO: implement initState
getConnectedSuppliersData();
super.initState();
} on PlatformException catch (e) {
print('Failed to pick image: $e');
}
}
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,
Widget _dashBoard() {
return Container(
color: screenBackgroundColor,
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text('TankerName :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
children: <Widget>[
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'),
),
Text(
connectedSuppliersList[index]
.tankerName
.toUpperCase(),
style: valuesTextStyle()),
],
fit: BoxFit.fill,
)
),
Row(
children: [
Text('Bookingid :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
),
Text(
connectedSuppliersList [index]
.bookingid
.toString(),
style: valuesTextStyle()),
],
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.
child: Column(
children: [
Text('SupplierId :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
Container(
padding: EdgeInsets.fromLTRB(35, 10,0,0),
child: new SvgPicture.asset("assets/images/tanklevels.svg")
),
Text(connectedSuppliersList[index].supplierId,
style: valuesTextStyle()),
Text('Booking Data',style: dashboardTextStyle(),),
],
),
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()),
//==============================list2
],
),
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,
),
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: () {
/* showTankerBookingDialog(
tankersList[index]);*/
Navigator.of(context).pop();
},
),
Text(
'Start Trip',
style: iconBelowTextStyle(),
),
],
),
SizedBox(
width: 30,
),
Column(
children: [
IconButton(
iconSize: 30,
icon: const Icon(
Icons.download,
color: primaryColor,
TextButton(
child: Text('Yes',style:textButtonStyle()),
onPressed: () async{
await AppSettings.clearSharedPreferences();
await Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => Login()),(Route<dynamic> route) => false,);
},
),
onPressed: () {
]
/* Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new BookedTanerDetails(myObject:tankersList[index].tanker_name)));*/
);
});
}
);
}
},
),
Text(
'Download Water',
style: iconBelowTextStyle(),
),
],
),
],
)
@override
Widget build(BuildContext context) {
],
),
),
/* 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?',
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,
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);
}
onPressed: () {
SystemNavigator.pop();
},
child: const Text('Yes',
style: TextStyle(
@ -289,7 +200,7 @@ class _DashboardState extends State<Dashboard> with TickerProviderStateMixin {
),
TextButton(
onPressed: () {
Navigator.of(context).pop(true);
Navigator.of(context).pop(false);
},
child: const Text('No',
style: TextStyle(
@ -298,68 +209,233 @@ class _DashboardState extends State<Dashboard> with TickerProviderStateMixin {
)),
),
],
),
);
},
icon: Icon(Icons.delete),
);
return shouldPop!;
}
else{
setState(() {
_selectedIndex=0;
});
return false;
}
},
child: Scaffold(
resizeToAvoidBottomInset: false,
appBar:AppSettings.appBar('Arminta Water Management'),
drawer: Drawer(
// Add a ListView to the drawer. This ensures the user can scroll
// through the options in the drawer if there isn't enough vertical
// space to fit everything.
//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);
},
),
],
),
),
);
});
}
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(
AppSettings.deliveryBoyname,
style: TextStyle(color: Colors.white, fontSize: 15),
),
Text(
'There is an issue at server please try after some time',style:serverIssueTextStyle() ,),
AppSettings.phoneNumber,
style: TextStyle(color: Colors.white, fontSize: 15),
),
/* Text(
AppSettings.email,
style: TextStyle(color: Colors.white, fontSize: 15),
),*/
],
)
: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image(
image: AssetImage('images/no_data.png'),
// height: MediaQuery.of(context).size.height * .10,
),
SizedBox(
height: 20,
Container()
],
)),
ListTile(
title: Row(
children: const [
Image(image: const AssetImage('images/editprofileblue.png'),height: 25,width: 25,fit: BoxFit.fill),
const SizedBox(
width: 10,
),
Text(
'No Connected Tankers',style:serverIssueTextStyle() ,),
const SizedBox(
width: 10,
),
Text('Edit Profile',style: TextStyle(color:primaryColor)),
],
),
));
}
}
onTap: () {
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
appBar: AppSettings.appBar('Deliveryboy'),
body: isLoading?Center(
child: CircularProgressIndicator(
color: primaryColor,
strokeWidth: 5.0,
/* Navigator.push(
context,
MaterialPageRoute(builder: (context) => UpdateProfile()),
);*/
},
),
):connectedTankers(),
));
}
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)),
],
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => DelivryBookingData()),
);
},
),
Divider(
color: Colors.grey,
),
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)),
],
),
onTap: () {},
),
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)),
],
),
onTap: () async{
showLogoutAlertDialog(context);
},
),
],
),
),
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/services.dart';
import 'package:path/path.dart' as Path;
import 'package:watermanagement_deliveryboy/otpscreen.dart';
import 'package:watermanagement_deliveryboy/settings.dart';
import 'package:watermanagement/otpscreen.dart';
import 'package:watermanagement/settings.dart';
class Login extends StatefulWidget {
const Login({super.key});

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

@ -8,6 +8,15 @@ class GetDeliveryboyDetailsModel {
String dateOfOrder='';
String typeofwater='';
String delivery_agent_mobile='';
String capacity='';
String address='';
String price='';
String customerId='';
@ -24,6 +33,11 @@ class GetDeliveryboyDetailsModel {
rtvm.dateOfOrder = json['dateOfOrder'] ??'';
rtvm.typeofwater = json['typeofwater'] ??'';
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:watermanagement_deliveryboy/dashboard.dart';
import 'package:watermanagement_deliveryboy/settings.dart';
import 'package:watermanagement/dashboard.dart';
import 'package:watermanagement/settings.dart';
class OtpScreen extends StatefulWidget {
var phoneNumber;

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

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

@ -1,8 +1,10 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:watermanagement_deliveryboy/dashboard.dart';
import 'package:watermanagement_deliveryboy/login.dart';
import 'package:watermanagement_deliveryboy/settings.dart';
import 'package:watermanagement/dashboard.dart';
import 'package:watermanagement/delivrybookingdata.dart';
import 'package:watermanagement/login.dart';
import 'package:watermanagement/settings.dart';
void main() async{
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
version: 1.0.0+1
@ -64,3 +66,6 @@ flutter:
uses-material-design: true
assets:
- images/
- json/
- assets/images/

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

Loading…
Cancel
Save