how to add the location when the photo was taken, for example when the smartphone wants to take a picture and the camera is open then the location is already available in the image picker and when the photo is taken, the location becomes a watermark on the photo. here's the code I made
Future pickImage(ImageSource source) async {
try {
final image = await ImagePicker.pickImage(source: source);
if(image == null) return;
final imageTemporary = File(image.path);
print(imageTemporary);
setState(() => this.image = imageTemporary);
} on PlatformException catch(e) {
print('failed to pick image');
}
}
and
Container(padding: EdgeInsets.all(5),child: Row(children: [
Column(
children: [
image != null ? Image.file(image,
width: 50, height: 50, fit: BoxFit.cover,) : Text("Rumah Depan"),
Container(
margin: const EdgeInsets.fromLTRB(15, 5, 0, 0),
child: RaisedButton(
padding: EdgeInsets.all(10),
onPressed: () {
pickImage(ImageSource.camera);
},
child: Icon(Icons.camera),
),
),