|  |  |  | @ -9,6 +9,7 @@ import 'package:watermanagement/login.dart'; | 
			
		
	
		
			
				
					|  |  |  |  | import 'package:watermanagement/settings.dart'; | 
			
		
	
		
			
				
					|  |  |  |  | import 'package:image_picker/image_picker.dart'; | 
			
		
	
		
			
				
					|  |  |  |  | import 'package:watermanagement/tankersview.dart'; | 
			
		
	
		
			
				
					|  |  |  |  | import 'dart:convert'; | 
			
		
	
		
			
				
					|  |  |  |  | import 'dart:io'; | 
			
		
	
		
			
				
					|  |  |  |  | import 'package:watermanagement/updateprofile.dart'; | 
			
		
	
		
			
				
					|  |  |  |  | import 'booking_requests.dart'; | 
			
		
	
	
		
			
				
					|  |  |  | @ -94,13 +95,15 @@ class _DashboardState extends State<Dashboard> { | 
			
		
	
		
			
				
					|  |  |  |  |       final image = await _picker.pickImage(source: ImageSource.gallery); | 
			
		
	
		
			
				
					|  |  |  |  |       if (image == null) return; | 
			
		
	
		
			
				
					|  |  |  |  |       final imageTemp = File(image.path); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       AppSettings.preLoaderDialog(context); | 
			
		
	
		
			
				
					|  |  |  |  |       var res = await AppSettings.uploadImageHTTPNew(image); | 
			
		
	
		
			
				
					|  |  |  |  |       print(jsonDecode(res)); | 
			
		
	
		
			
				
					|  |  |  |  |       Navigator.of(context, rootNavigator: true).pop(); | 
			
		
	
		
			
				
					|  |  |  |  |       setState(() { | 
			
		
	
		
			
				
					|  |  |  |  |         AppSettings.updatedImage = imageTemp; | 
			
		
	
		
			
				
					|  |  |  |  |         AppSettings.profilePictureUrl = jsonDecode(res)['picture']; | 
			
		
	
		
			
				
					|  |  |  |  |       }); | 
			
		
	
		
			
				
					|  |  |  |  |       uploadProfileApi(image.path); | 
			
		
	
		
			
				
					|  |  |  |  |       AppSettings.saveProfile(image.path); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       AppSettings.saveData('profile', jsonDecode(res)['picture'], 'STRING'); | 
			
		
	
		
			
				
					|  |  |  |  |     } on PlatformException catch (e) { | 
			
		
	
		
			
				
					|  |  |  |  |       print('Failed to pick image: $e'); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
	
		
			
				
					|  |  |  | @ -111,13 +114,14 @@ class _DashboardState extends State<Dashboard> { | 
			
		
	
		
			
				
					|  |  |  |  |       final image = await _picker.pickImage(source: ImageSource.camera); | 
			
		
	
		
			
				
					|  |  |  |  |       if (image == null) return; | 
			
		
	
		
			
				
					|  |  |  |  |       final imageTemp = File(image.path); | 
			
		
	
		
			
				
					|  |  |  |  |       AppSettings.preLoaderDialog(context); | 
			
		
	
		
			
				
					|  |  |  |  |       var res = await AppSettings.uploadImageHTTPNew(image); | 
			
		
	
		
			
				
					|  |  |  |  |       print(jsonDecode(res)); | 
			
		
	
		
			
				
					|  |  |  |  |       Navigator.of(context, rootNavigator: true).pop(); | 
			
		
	
		
			
				
					|  |  |  |  |       setState(() { | 
			
		
	
		
			
				
					|  |  |  |  |         AppSettings.updatedImage = imageTemp; | 
			
		
	
		
			
				
					|  |  |  |  |         AppSettings.profilePictureUrl = jsonDecode(res)['picture']; | 
			
		
	
		
			
				
					|  |  |  |  |       }); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       uploadProfileApi(image.path); | 
			
		
	
		
			
				
					|  |  |  |  |       AppSettings.saveProfile(image.path); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       AppSettings.saveData('profile', jsonDecode(res)['picture'], 'STRING'); | 
			
		
	
		
			
				
					|  |  |  |  |     } on PlatformException catch (e) { | 
			
		
	
		
			
				
					|  |  |  |  |       print('Failed to pick image: $e'); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
	
		
			
				
					|  |  |  | @ -428,15 +432,26 @@ class _DashboardState extends State<Dashboard> { | 
			
		
	
		
			
				
					|  |  |  |  |                         children: [ | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                          Expanded(child:  GestureDetector( | 
			
		
	
		
			
				
					|  |  |  |  |                          Expanded( | 
			
		
	
		
			
				
					|  |  |  |  |                            child: GestureDetector( | 
			
		
	
		
			
				
					|  |  |  |  |                              child: Container( | 
			
		
	
		
			
				
					|  |  |  |  |                              width: MediaQuery.of(context).size.width * .20, | 
			
		
	
		
			
				
					|  |  |  |  |                              height: MediaQuery.of(context).size.height * .15, | 
			
		
	
		
			
				
					|  |  |  |  |                                width: (MediaQuery.of(context).size.width > 600) | 
			
		
	
		
			
				
					|  |  |  |  |                                    ? MediaQuery.of(context).size.width * .30 | 
			
		
	
		
			
				
					|  |  |  |  |                                    : MediaQuery.of(context).size.width * .60, // Adjusted width for tablet | 
			
		
	
		
			
				
					|  |  |  |  |                                height: (MediaQuery.of(context).size.width > 600) | 
			
		
	
		
			
				
					|  |  |  |  |                                    ? MediaQuery.of(context).size.height * .25 | 
			
		
	
		
			
				
					|  |  |  |  |                                    : MediaQuery.of(context).size.height * .50, // Adjusted height for tablet | 
			
		
	
		
			
				
					|  |  |  |  |                                decoration: BoxDecoration( | 
			
		
	
		
			
				
					|  |  |  |  |                                  shape: BoxShape.circle, | 
			
		
	
		
			
				
					|  |  |  |  |                                  shape: BoxShape.rectangle, | 
			
		
	
		
			
				
					|  |  |  |  |                                  border: Border.all(width: 2, color: Colors.blueGrey), | 
			
		
	
		
			
				
					|  |  |  |  |                                  image: DecorationImage( | 
			
		
	
		
			
				
					|  |  |  |  |                                      image: (AppSettings.updatedImage != null) ? FileImage(AppSettings.updatedImage!) as ImageProvider : AssetImage("images/profile_pic.png"), // picked file | 
			
		
	
		
			
				
					|  |  |  |  |                                      fit: BoxFit.cover)), | 
			
		
	
		
			
				
					|  |  |  |  |                                    image: (AppSettings.profilePictureUrl != '' && | 
			
		
	
		
			
				
					|  |  |  |  |                                        AppSettings.profilePictureUrl != 'null') | 
			
		
	
		
			
				
					|  |  |  |  |                                        ? NetworkImage(AppSettings.profilePictureUrl) as ImageProvider | 
			
		
	
		
			
				
					|  |  |  |  |                                        : AssetImage(" images/profile_pic.png"), // picked file | 
			
		
	
		
			
				
					|  |  |  |  |                                    fit: BoxFit.fitWidth, | 
			
		
	
		
			
				
					|  |  |  |  |                                  ), | 
			
		
	
		
			
				
					|  |  |  |  |                                ), | 
			
		
	
		
			
				
					|  |  |  |  |                              ), | 
			
		
	
		
			
				
					|  |  |  |  |                              onTap: () { | 
			
		
	
		
			
				
					|  |  |  |  |                                showModalBottomSheet<void>( | 
			
		
	
	
		
			
				
					|  |  |  | @ -446,7 +461,8 @@ class _DashboardState extends State<Dashboard> { | 
			
		
	
		
			
				
					|  |  |  |  |                                        height: 200, | 
			
		
	
		
			
				
					|  |  |  |  |                                        child: Center( | 
			
		
	
		
			
				
					|  |  |  |  |                                          child: Row( | 
			
		
	
		
			
				
					|  |  |  |  |                                          mainAxisAlignment: MainAxisAlignment.center, | 
			
		
	
		
			
				
					|  |  |  |  |                                            mainAxisAlignment: | 
			
		
	
		
			
				
					|  |  |  |  |                                            MainAxisAlignment.center, | 
			
		
	
		
			
				
					|  |  |  |  |                                            children: <Widget>[ | 
			
		
	
		
			
				
					|  |  |  |  |                                              GestureDetector( | 
			
		
	
		
			
				
					|  |  |  |  |                                                child: Icon( | 
			
		
	
	
		
			
				
					|  |  |  | @ -460,8 +476,10 @@ class _DashboardState extends State<Dashboard> { | 
			
		
	
		
			
				
					|  |  |  |  |                                                }, | 
			
		
	
		
			
				
					|  |  |  |  |                                              ), | 
			
		
	
		
			
				
					|  |  |  |  |                                              SizedBox( | 
			
		
	
		
			
				
					|  |  |  |  |                                              width: | 
			
		
	
		
			
				
					|  |  |  |  |                                              MediaQuery.of(context).size.width * .20, | 
			
		
	
		
			
				
					|  |  |  |  |                                                width: MediaQuery.of(context) | 
			
		
	
		
			
				
					|  |  |  |  |                                                    .size | 
			
		
	
		
			
				
					|  |  |  |  |                                                    .width * | 
			
		
	
		
			
				
					|  |  |  |  |                                                    .20, | 
			
		
	
		
			
				
					|  |  |  |  |                                              ), | 
			
		
	
		
			
				
					|  |  |  |  |                                              GestureDetector( | 
			
		
	
		
			
				
					|  |  |  |  |                                                child: Icon( | 
			
		
	
	
		
			
				
					|  |  |  | @ -480,7 +498,10 @@ class _DashboardState extends State<Dashboard> { | 
			
		
	
		
			
				
					|  |  |  |  |                                      ); | 
			
		
	
		
			
				
					|  |  |  |  |                                    }); | 
			
		
	
		
			
				
					|  |  |  |  |                              }, | 
			
		
	
		
			
				
					|  |  |  |  |                          ),), | 
			
		
	
		
			
				
					|  |  |  |  |                            ), | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                          ), | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                           Text( | 
			
		
	
		
			
				
					|  |  |  |  |                             AppSettings.suppliername, | 
			
		
	
	
		
			
				
					|  |  |  | 
 |