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 tankerCapacityController = TextEditingController();
TextEditingController tankerPriceController = TextEditingController(); TextEditingController tankerPriceController = TextEditingController();
bool isCapacityText = false; bool isCapacityText = false;
bool isLoading = false; bool isLoading = false;
bool isTankerDataLoading = false; bool isTankerDataLoading = false;
@ -35,6 +37,7 @@ class _AddTankersState extends State<AddTankers> {
bool isTenChecked = false; bool isTenChecked = false;
bool isFifteenChecked = false; bool isFifteenChecked = false;
bool isTwentyChecked = false; bool isTwentyChecked = false;
bool isUpdateDrinkingChecked = false; bool isUpdateDrinkingChecked = false;
bool isUpdateBoreChecked = false; bool isUpdateBoreChecked = false;
bool isUpdateFiveChecked = false; bool isUpdateFiveChecked = false;
@ -79,7 +82,7 @@ class _AddTankersState extends State<AddTankers> {
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
const SizedBox( const SizedBox(
height: 55, height: 15,
), ),
Container( Container(
height: MediaQuery.of(context).size.height * .15, height: MediaQuery.of(context).size.height * .15,
@ -121,7 +124,7 @@ class _AddTankersState extends State<AddTankers> {
const SizedBox( const SizedBox(
height: 5, height: 5,
), ),
/* Container( Container(
padding: const EdgeInsets.all(10), padding: const EdgeInsets.all(10),
child: TextFormField( child: TextFormField(
cursorColor: greyColor, cursorColor: greyColor,
@ -181,7 +184,7 @@ class _AddTankersState extends State<AddTankers> {
), //alternative phone number ), //alternative phone number
const SizedBox( const SizedBox(
height: 5, height: 5,
),*/ ),
Visibility( Visibility(
visible: true, visible: true,
child: Container( child: Container(
@ -485,6 +488,8 @@ class _AddTankersState extends State<AddTankers> {
onPressed: () async{ onPressed: () async{
if (tankerNameController.text != '' && if (tankerNameController.text != '' &&
tankerPhoneNumberController.text != '' &&
tankerAlternativePhoneNumberController.text != '' &&
tankerCapacityController.text != '' && tankerCapacityController.text != '' &&
tankerPriceController.text != '') { tankerPriceController.text != '') {
/* waterPrice=[]; /* waterPrice=[];
@ -505,8 +510,8 @@ class _AddTankersState extends State<AddTankers> {
var payload = new Map<String, dynamic>(); var payload = new Map<String, dynamic>();
payload["tankerName"] = tankerNameController.text.toString(); payload["tankerName"] = tankerNameController.text.toString();
// payload["phoneNumber"] = tankerPhoneNumberController.text.toString(); payload["phoneNumber"] = tankerPhoneNumberController.text.toString();
// payload["alternative_phoneNumber"] = tankerAlternativePhoneNumberController.text.toString(); payload["alternative_phoneNumber"] = tankerAlternativePhoneNumberController.text.toString();
payload["capacity"] = tankerCapacityController.text.toString(); payload["capacity"] = tankerCapacityController.text.toString();
// payload["typeofwater"] = waterTypes; // payload["typeofwater"] = waterTypes;
payload["typeofwater"] =dropdownTypeOfWater.toString(); payload["typeofwater"] =dropdownTypeOfWater.toString();
@ -522,9 +527,9 @@ class _AddTankersState extends State<AddTankers> {
AppSettings.longSuccessToast( AppSettings.longSuccessToast(
"Tanker Created Successfully"); "Tanker Created Successfully");
tankerNameController.text = ''; tankerNameController.text = '';
//tankerPhoneNumberController.text = ''; tankerPhoneNumberController.text = '';
tankerCapacityController.text = ''; tankerCapacityController.text = '';
//tankerAlternativePhoneNumberController.text=''; tankerAlternativePhoneNumberController.text='';
tankerPriceController.text=''; tankerPriceController.text='';
//tankerDrinkingPriceController.text=''; //tankerDrinkingPriceController.text='';
//tankerBorePriceController.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 '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/google_maps_place_picker_mb/google_maps_place_picker.dart';
import 'package:watermanagement/keys.dart'; import 'package:watermanagement/keys.dart';
import 'package:url_launcher/url_launcher.dart';
class ConectedPendingCustomers extends StatefulWidget { class ConectedPendingCustomers extends StatefulWidget {
const ConectedPendingCustomers({Key? key}) : super(key: key); const ConectedPendingCustomers({Key? key}) : super(key: key);
@ -150,31 +149,6 @@ class _ConectedPendingCustomersState extends State<ConectedPendingCustomers> wit
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, 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: [ children: [
Text( Text(
connectedCustomersList[index] connectedCustomersList[index]
@ -194,43 +168,14 @@ class _ConectedPendingCustomersState extends State<ConectedPendingCustomers> wit
.toUpperCase(), .toUpperCase(),
style: valuesTextStyle()), style: valuesTextStyle()),
SizedBox(height: 10,), SizedBox(height: 10,),
Text( Text(maxLines:3,
connectedCustomersList[index] connectedCustomersList[index]
.customer_address .customer_address
.toUpperCase(), .toUpperCase(),
style: valuesTextStyle()) 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( TextButton(
child: Text( child: Text(
'Accept', 'Accept',
@ -370,6 +316,9 @@ class _ConectedPendingCustomersState extends State<ConectedPendingCustomers> wit
} }
}, },
), ),
], ],

@ -62,7 +62,6 @@ class AppSettings {
static String email = ''; static String email = '';
static String phoneNumber = ''; static String phoneNumber = '';
static String description = ''; static String description = '';
static String startingprice = '';
static String accessToken = ''; static String accessToken = '';
static String customerId = ''; static String customerId = '';
static String supplierId = ''; static String supplierId = '';
@ -312,6 +311,8 @@ class AppSettings {
} }
} }
static Future<bool> updateProfile(payload) async { static Future<bool> updateProfile(payload) async {
try { try {
var response = await http.put( var response = await http.put(
@ -326,8 +327,6 @@ class AppSettings {
phoneNumber = _response['phone']; phoneNumber = _response['phone'];
email = _response['emails'][0]['email']; email = _response['emails'][0]['email'];
description = _response['description']; description = _response['description'];
startingprice = _response['startingPrice'];
return true; return true;
} else { } 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'; import 'google_maps_place_picker_mb/src/place_picker.dart';
class SignIn extends StatefulWidget { class SignIn extends StatefulWidget {
const SignIn({super.key}); const SignIn({super.key});
@ -48,10 +52,12 @@ class _SignInState extends State<SignIn> {
double lng = 0; double lng = 0;
PickResult? selectedPlace; PickResult? selectedPlace;
bool _mapsInitialized = false; bool _mapsInitialized = false;
final String _mapsRenderer = "latest"; final String _mapsRenderer = "latest";
var kInitialPosition = const LatLng(15.462477, 78.717401); var kInitialPosition = const LatLng(15.462477, 78.717401);
locationmap.Location location = locationmap.Location(); locationmap.Location location = locationmap.Location();
final GoogleMapsFlutterPlatform mapsImplementation = final GoogleMapsFlutterPlatform mapsImplementation =
@ -494,6 +500,7 @@ class _SignInState extends State<SignIn> {
try { try {
if (signUpStatus) { if (signUpStatus) {
var phoneVerifyPayload = new Map<String, dynamic>(); var phoneVerifyPayload = new Map<String, dynamic>();
phoneVerifyPayload["phoneVerificationCode"] = phoneVerifyPayload["phoneVerificationCode"] =
"11111"; "11111";
phoneVerifyPayload["phone"] = phoneVerifyPayload["phone"] =
@ -511,6 +518,7 @@ class _SignInState extends State<SignIn> {
MaterialPageRoute( MaterialPageRoute(
builder: (context) => const Login()), builder: (context) => const Login()),
); );
} else { } else {
Navigator.of(context, rootNavigator: true).pop(); Navigator.of(context, rootNavigator: true).pop();
AppSettings.longFailedToast( AppSettings.longFailedToast(

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

@ -24,8 +24,6 @@ class _UpdateprofileState extends State<UpdateProfile> {
TextEditingController mobileNumberController = TextEditingController(); TextEditingController mobileNumberController = TextEditingController();
TextEditingController emailController = TextEditingController(); TextEditingController emailController = TextEditingController();
TextEditingController descriptionController = TextEditingController(); TextEditingController descriptionController = TextEditingController();
TextEditingController startingPriceController = TextEditingController();
@ -38,8 +36,6 @@ class _UpdateprofileState extends State<UpdateProfile> {
mobileNumberController.text=AppSettings.phoneNumber; mobileNumberController.text=AppSettings.phoneNumber;
emailController.text=AppSettings.email; emailController.text=AppSettings.email;
descriptionController.text=AppSettings.description; descriptionController.text=AppSettings.description;
startingPriceController.text=AppSettings.startingprice;
// descriptionController.text=AppSettings.suppliername; // descriptionController.text=AppSettings.suppliername;
@ -255,34 +251,6 @@ class _UpdateprofileState extends State<UpdateProfile> {
SizedBox( SizedBox(
height: 10, 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( Container(
padding: const EdgeInsets.all(10), padding: const EdgeInsets.all(10),
child: TextFormField( child: TextFormField(
@ -325,12 +293,12 @@ class _UpdateprofileState extends State<UpdateProfile> {
onPrimary: Colors.white, // foreground onPrimary: Colors.white, // foreground
), ),
onPressed: () async{ onPressed: () async{
var payload = new Map<String, dynamic>(); var payload = new Map<String, dynamic>();
payload["suppliername"] = nameController.text.toString(); payload["suppliername"] = nameController.text.toString();
payload["phone"] = mobileNumberController.text.toString(); payload["phone"] = mobileNumberController.text.toString();
payload["emails"] = [{"email":emailController.text.toString()}]; payload["emails"] = [{"email":emailController.text.toString()}];
payload["description"] = descriptionController.text.toString(); payload["description"] = descriptionController.text.toString();
payload["startingPrice"] = startingPriceController.text.toString();
payload["status"] = "active"; payload["status"] = "active";
bool signUpStatus = await AppSettings.updateProfile(payload); bool signUpStatus = await AppSettings.updateProfile(payload);
@ -343,6 +311,7 @@ class _UpdateprofileState extends State<UpdateProfile> {
); );
AppSettings.longSuccessToast("profile updated"); AppSettings.longSuccessToast("profile updated");
} else { } else {
AppSettings.longFailedToast("profile not updated"); AppSettings.longFailedToast("profile not updated");
} }
} }
@ -350,10 +319,12 @@ class _UpdateprofileState extends State<UpdateProfile> {
print(exception); print(exception);
AppSettings.longFailedToast("Please enter valid details"); AppSettings.longFailedToast("Please enter valid details");
} }
}, },
child: Text('Update'), child: Text('Update'),
) )
), ),
], ],
), ),
)), )),

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

Loading…
Cancel
Save