Compare commits

..

No commits in common. '1559952daba84e8fb94075c6893d533fd9953604' and '5db126b7f29c27f4929f79091d9d514aa0dc9309' have entirely different histories.

@ -23,6 +23,8 @@ class _AddTankersState extends State<AddTankers> {
TextEditingController tankerCapacityController = TextEditingController();
TextEditingController tankerPriceController = TextEditingController();
bool isCapacityText = false;
bool isLoading = false;
bool isTankerDataLoading = false;
@ -35,6 +37,7 @@ class _AddTankersState extends State<AddTankers> {
bool isTenChecked = false;
bool isFifteenChecked = false;
bool isTwentyChecked = false;
bool isUpdateDrinkingChecked = false;
bool isUpdateBoreChecked = false;
bool isUpdateFiveChecked = false;
@ -79,7 +82,7 @@ class _AddTankersState extends State<AddTankers> {
child: Column(
children: <Widget>[
const SizedBox(
height: 55,
height: 15,
),
Container(
height: MediaQuery.of(context).size.height * .15,
@ -121,7 +124,7 @@ class _AddTankersState extends State<AddTankers> {
const SizedBox(
height: 5,
),
/* Container(
Container(
padding: const EdgeInsets.all(10),
child: TextFormField(
cursorColor: greyColor,
@ -181,7 +184,7 @@ class _AddTankersState extends State<AddTankers> {
), //alternative phone number
const SizedBox(
height: 5,
),*/
),
Visibility(
visible: true,
child: Container(
@ -485,6 +488,8 @@ class _AddTankersState extends State<AddTankers> {
onPressed: () async{
if (tankerNameController.text != '' &&
tankerPhoneNumberController.text != '' &&
tankerAlternativePhoneNumberController.text != '' &&
tankerCapacityController.text != '' &&
tankerPriceController.text != '') {
/* waterPrice=[];
@ -505,8 +510,8 @@ class _AddTankersState extends State<AddTankers> {
var payload = new Map<String, dynamic>();
payload["tankerName"] = tankerNameController.text.toString();
// payload["phoneNumber"] = tankerPhoneNumberController.text.toString();
// payload["alternative_phoneNumber"] = tankerAlternativePhoneNumberController.text.toString();
payload["phoneNumber"] = tankerPhoneNumberController.text.toString();
payload["alternative_phoneNumber"] = tankerAlternativePhoneNumberController.text.toString();
payload["capacity"] = tankerCapacityController.text.toString();
// payload["typeofwater"] = waterTypes;
payload["typeofwater"] =dropdownTypeOfWater.toString();
@ -522,9 +527,9 @@ class _AddTankersState extends State<AddTankers> {
AppSettings.longSuccessToast(
"Tanker Created Successfully");
tankerNameController.text = '';
//tankerPhoneNumberController.text = '';
tankerPhoneNumberController.text = '';
tankerCapacityController.text = '';
//tankerAlternativePhoneNumberController.text='';
tankerAlternativePhoneNumberController.text='';
tankerPriceController.text='';
//tankerDrinkingPriceController.text='';
//tankerBorePriceController.text='';

@ -14,7 +14,6 @@ import 'google_maps_place_picker_mb/src/models/pick_result.dart';
import 'google_maps_place_picker_mb/src/place_picker.dart';
import 'package:watermanagement/google_maps_place_picker_mb/google_maps_place_picker.dart';
import 'package:watermanagement/keys.dart';
import 'package:url_launcher/url_launcher.dart';
class ConectedPendingCustomers extends StatefulWidget {
const ConectedPendingCustomers({Key? key}) : super(key: key);
@ -150,31 +149,6 @@ class _ConectedPendingCustomersState extends State<ConectedPendingCustomers> wit
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
/* children: [
Text(
connectedCustomersList[index]
.customer_name
.toUpperCase(),
style: valuesTextStyle()),
SizedBox(height: 10,),
Text(
connectedCustomersList[index]
.customer_phone_number
.toUpperCase(),
style: valuesTextStyle()),
SizedBox(height: 10,),
Text(
connectedCustomersList[index]
.customer_building_name
.toUpperCase(),
style: valuesTextStyle()),
SizedBox(height: 10,),
Text(maxLines:3,
connectedCustomersList[index]
.customer_address
.toUpperCase(),
style: valuesTextStyle())
],*/
children: [
Text(
connectedCustomersList[index]
@ -194,43 +168,14 @@ class _ConectedPendingCustomersState extends State<ConectedPendingCustomers> wit
.toUpperCase(),
style: valuesTextStyle()),
SizedBox(height: 10,),
Text(
Text(maxLines:3,
connectedCustomersList[index]
.customer_address
.toUpperCase(),
style: valuesTextStyle())
],
),),
Column(
children: [
IconButton(
iconSize: 30,
icon: const Icon(
Icons.phone,
color: primaryColor,
),
onPressed: () async {
final Uri _phoneUri = Uri(
scheme: "tel",
path: connectedCustomersList[index]
.customer_phone_number);
try {
await launch(
_phoneUri.toString());
} catch (error) {
throw ("Cannot dial");
}
},
),
Text(
'Call now',
style: iconBelowTextStyle(),
),
],
),
),)
],
)
),
),
@ -324,6 +269,7 @@ class _ConectedPendingCustomersState extends State<ConectedPendingCustomers> wit
)
),
TextButton(
child: Text(
'Accept',
@ -370,6 +316,9 @@ class _ConectedPendingCustomersState extends State<ConectedPendingCustomers> wit
}
},
),
],

@ -62,7 +62,6 @@ class AppSettings {
static String email = '';
static String phoneNumber = '';
static String description = '';
static String startingprice = '';
static String accessToken = '';
static String customerId = '';
static String supplierId = '';
@ -312,6 +311,8 @@ class AppSettings {
}
}
static Future<bool> updateProfile(payload) async {
try {
var response = await http.put(
@ -326,8 +327,6 @@ class AppSettings {
phoneNumber = _response['phone'];
email = _response['emails'][0]['email'];
description = _response['description'];
startingprice = _response['startingPrice'];
return true;
} else {

@ -16,6 +16,10 @@ import 'google_maps_place_picker_mb/src/models/pick_result.dart';
import 'google_maps_place_picker_mb/src/place_picker.dart';
class SignIn extends StatefulWidget {
const SignIn({super.key});
@ -48,10 +52,12 @@ class _SignInState extends State<SignIn> {
double lng = 0;
PickResult? selectedPlace;
bool _mapsInitialized = false;
final String _mapsRenderer = "latest";
var kInitialPosition = const LatLng(15.462477, 78.717401);
locationmap.Location location = locationmap.Location();
final GoogleMapsFlutterPlatform mapsImplementation =
@ -494,6 +500,7 @@ class _SignInState extends State<SignIn> {
try {
if (signUpStatus) {
var phoneVerifyPayload = new Map<String, dynamic>();
phoneVerifyPayload["phoneVerificationCode"] =
"11111";
phoneVerifyPayload["phone"] =
@ -505,12 +512,13 @@ class _SignInState extends State<SignIn> {
Navigator.of(context, rootNavigator: true).pop();
AppSettings.longSuccessToast(
"User SignUp Successfully");
//showUserSignUSuccessDialog();
// showUserSignUSuccessDialog();
await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const Login()),
);
} else {
Navigator.of(context, rootNavigator: true).pop();
AppSettings.longFailedToast(

@ -127,7 +127,7 @@ class _TankersViewState extends State<TankersView> {
const SizedBox(
height: 30,
),
/* Container(
Container(
//padding: const EdgeInsets.fromLTRB(10, 10, 10, 0),
child: TextFormField(
cursorColor: greyColor,
@ -187,7 +187,7 @@ class _TankersViewState extends State<TankersView> {
)), //alternate phone number
const SizedBox(
height: 30,
),*/
),
Visibility(
visible: true,
child: Container(
@ -478,7 +478,8 @@ class _TankersViewState extends State<TankersView> {
TextButton(
child: Text('Update', style: textButtonStyle()),
onPressed: () async {
if (updateTankerNameController.text != '' ) {
if (updateTankerNameController.text != '' &&
updateTankerPhoneNumberController.text != '') {
/*
waterPrice=[];
if(isDrinkingChecked){
@ -573,9 +574,14 @@ class _TankersViewState extends State<TankersView> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('tankerName :',style: labelTextStyle()),
Text('phoneNumber :',style: labelTextStyle()),
Text('alternative_phoneNumber :',style: labelTextStyle()),
Text('Capacity :',style: labelTextStyle()),
Text('Type Of Water :',style: labelTextStyle()),
Text('price :',style: labelTextStyle()),
],
),
SizedBox(width: 5,),
@ -584,19 +590,23 @@ class _TankersViewState extends State<TankersView> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(modelTanksViewList[index].tanker_name,style: valuesTextStyle()),
//Text(modelTanksViewList[index].tanker_phone,style: valuesTextStyle()),
// Text(modelTanksViewList[index].tanker_alterphone,style: valuesTextStyle()),
Text(modelTanksViewList[index].tanker_phone,style: valuesTextStyle()),
Text(modelTanksViewList[index].tanker_alterphone,style: valuesTextStyle()),
Text(modelTanksViewList[index].capacity+' Ltrs',style: valuesTextStyle()),
Text(modelTanksViewList[index].type_of_water,style: valuesTextStyle()),
Text(modelTanksViewList[index].waterprice,style: valuesTextStyle()),
],
),
],
),
],
),
),
Expanded(child:IconButton(
icon: const Icon(Icons.edit,color: primaryColor,),
onPressed: () {

@ -24,8 +24,6 @@ class _UpdateprofileState extends State<UpdateProfile> {
TextEditingController mobileNumberController = TextEditingController();
TextEditingController emailController = TextEditingController();
TextEditingController descriptionController = TextEditingController();
TextEditingController startingPriceController = TextEditingController();
@ -38,8 +36,6 @@ class _UpdateprofileState extends State<UpdateProfile> {
mobileNumberController.text=AppSettings.phoneNumber;
emailController.text=AppSettings.email;
descriptionController.text=AppSettings.description;
startingPriceController.text=AppSettings.startingprice;
// descriptionController.text=AppSettings.suppliername;
@ -255,34 +251,6 @@ class _UpdateprofileState extends State<UpdateProfile> {
SizedBox(
height: 10,
),
Container(
padding: const EdgeInsets.all(10),
child: TextFormField(
cursorColor: greyColor,
controller: startingPriceController,
decoration: const InputDecoration(
prefixIcon: Icon(
Icons.currency_rupee,
color: greyColor,
),
border: OutlineInputBorder(
borderSide: BorderSide(color: greyColor)),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: greyColor),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: greyColor),
),
labelText: 'Starting Price',
labelStyle: TextStyle(
color: greyColor, //<-- SEE HERE
),
),
),
),//name
const SizedBox(
height: 15,
),
Container(
padding: const EdgeInsets.all(10),
child: TextFormField(
@ -321,16 +289,16 @@ class _UpdateprofileState extends State<UpdateProfile> {
padding: const EdgeInsets.fromLTRB(10, 0, 10, 0),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: primaryColor,// background
onPrimary: Colors.white,// foreground
primary: primaryColor, // background
onPrimary: Colors.white, // foreground
),
onPressed: () async{
var payload = new Map<String, dynamic>();
payload["suppliername"] = nameController.text.toString();
payload["phone"] = mobileNumberController.text.toString();
payload["emails"] = [{"email":emailController.text.toString()}];
payload["description"] = descriptionController.text.toString();
payload["startingPrice"] = startingPriceController.text.toString();
payload["status"] = "active";
bool signUpStatus = await AppSettings.updateProfile(payload);
@ -343,6 +311,7 @@ class _UpdateprofileState extends State<UpdateProfile> {
);
AppSettings.longSuccessToast("profile updated");
} else {
AppSettings.longFailedToast("profile not updated");
}
}
@ -350,10 +319,12 @@ class _UpdateprofileState extends State<UpdateProfile> {
print(exception);
AppSettings.longFailedToast("Please enter valid details");
}
},
child: Text('Update'),
)
),
],
),
)),

@ -71,6 +71,7 @@ flutter_launcher_name:
flutter:
uses-material-design: true
assets:
- images/

Loading…
Cancel
Save