|
|
|
@ -4,11 +4,8 @@ import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
|
import 'package:watermanagement/adddeliveryboy.dart';
|
|
|
|
|
import 'package:watermanagement/addtankers.dart';
|
|
|
|
|
import 'package:watermanagement/conect_request_customers.dart';
|
|
|
|
|
import 'package:watermanagement/conected_customers.dart';
|
|
|
|
|
import 'package:watermanagement/getdeliveryboydata.dart';
|
|
|
|
|
import 'package:watermanagement/login.dart';
|
|
|
|
|
import 'package:watermanagement/place_picker.dart';
|
|
|
|
|
import 'package:watermanagement/request_customers.dart';
|
|
|
|
|
import 'package:watermanagement/settings.dart';
|
|
|
|
|
import 'package:image_picker/image_picker.dart';
|
|
|
|
|
import 'package:watermanagement/tankersview.dart';
|
|
|
|
@ -92,6 +89,17 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<String> getStorageDirectory() async {
|
|
|
|
|
|
|
|
|
|
if (Platform.isAndroid) {
|
|
|
|
|
|
|
|
|
|
return (await getExternalStorageDirectory()).path;
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
return (await getApplicationDocumentsDirectory()).path;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future pickImageFromGallery() async {
|
|
|
|
|
try {
|
|
|
|
|
final image = await _picker.pickImage(source: ImageSource.gallery);
|
|
|
|
@ -100,7 +108,7 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
|
setState(() {
|
|
|
|
|
AppSettings.updatedImage = imageTemp;
|
|
|
|
|
});
|
|
|
|
|
uploadProfileApi(AppSettings.updatedImage);
|
|
|
|
|
uploadProfileApi(image.path);
|
|
|
|
|
AppSettings.saveProfile(image.path);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -118,7 +126,7 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
|
AppSettings.updatedImage = imageTemp;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
uploadProfileApi(AppSettings.updatedImage);
|
|
|
|
|
uploadProfileApi(image.path);
|
|
|
|
|
AppSettings.saveProfile(image.path);
|
|
|
|
|
|
|
|
|
|
} on PlatformException catch (e) {
|
|
|
|
@ -134,7 +142,7 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * .330,
|
|
|
|
|
height: MediaQuery.of(context).size.height * .250,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(0),
|
|
|
|
@ -142,7 +150,7 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
|
//color: Colors.red,
|
|
|
|
|
child: FittedBox(
|
|
|
|
|
child:Image(
|
|
|
|
|
image: const AssetImage('images/appbgsuplier.png'),
|
|
|
|
|
image: const AssetImage('images/appbgsupplier.png'),
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
fit: BoxFit.fill,
|
|
|
|
|