GeoMark Camera A Flutter package to capture photos with geo-location tagging and overlay translated location text on images.
Features Capture images using the device camera.
Request and use location permissions to tag photos with location info.
Translate location text dynamically.
Crop captured images before saving.
Overlay translated location text on the captured photo.
Save final images to device gallery under a custom album.
Easy-to-use widget with built-in provider state management.
π Getting Started
- Add the package Since this is a local or private package, add it in your pubspec.yaml under dependencies:
yaml
- dependencies: geo_mark_camera: path: ../geo_mark_camera # Adjust path as needed Run flutter pub get to install the package.
π Permissions
- Android Add the following permissions to your AndroidManifest.xml file located at android/app/src/main/AndroidManifest.xml:
AndroidManifest.xml
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
Additionally, add the following activity for image cropping:
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
Note: Starting from Android 10 (API level 29), scoped storage is enforced, so you may not need to request storage permissions unless your app targets Android 9 (API level 28) or lower. For more details, refer to the Flutter documentation.
Additionally, if your app targets Android 11 (API level 30) or higher, add the following to your AndroidManifest.xml to declare the use of the camera:
- iOS For iOS, add the following keys to your Info.plist file located at ios/Runner/Info.plist:
info.plist
<key>NSCameraUsageDescription</key>
<string>We need access to your camera to capture photos with location tagging.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>We need access to your location to tag photos with geolocation information.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>We need access to your photo library to save tagged photos.</string>
π¦ Usage
- Import the package into your Dart file:
dart
import 'package:geo_mark_camera/geo_mark_camera.dart'; Use the provided widget to capture and save photos with geolocation tagging:
dart
GeoMarkCamera(
onImageCaptured: (image) {
// Handle the captured image
},
)
π License
This package is licensed under the MIT License. See the LICENSE file for more information.