Compare commits
1 Commits
f303c90702
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 03e33ff749 |
@@ -58,7 +58,6 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||||||
body: MapCameraLocation(
|
body: MapCameraLocation(
|
||||||
camera: widget.camera,
|
camera: widget.camera,
|
||||||
userAgent: 'OxinosMapCameraFlutter/1.0 (contact: support@oxinos.io)',
|
userAgent: 'OxinosMapCameraFlutter/1.0 (contact: support@oxinos.io)',
|
||||||
refererUrl: 'https://oxinos.io',
|
|
||||||
packageName: 'com.oxinos.map_camera_flutter',
|
packageName: 'com.oxinos.map_camera_flutter',
|
||||||
onImageCaptured: (ImageAndLocationData data) {
|
onImageCaptured: (ImageAndLocationData data) {
|
||||||
print('Captured image path: ${data.imagePath}');
|
print('Captured image path: ${data.imagePath}');
|
||||||
|
|||||||
@@ -56,20 +56,18 @@ class MapCameraLocation extends StatefulWidget {
|
|||||||
final CameraDescription camera;
|
final CameraDescription camera;
|
||||||
final ImageAndLocationCallback? onImageCaptured;
|
final ImageAndLocationCallback? onImageCaptured;
|
||||||
final String userAgent;
|
final String userAgent;
|
||||||
final String refererUrl;
|
|
||||||
final String packageName;
|
final String packageName;
|
||||||
|
|
||||||
/// Constructs a MapCameraLocation widget.
|
/// Constructs a MapCameraLocation widget.
|
||||||
///
|
///
|
||||||
/// The [camera] parameter is required and represents the camera to be used for capturing images.
|
/// The [camera] parameter is required and represents the camera to be used for capturing images.
|
||||||
/// The [onImageCaptured] parameter is an optional callback function that will be triggered when an image and location data are captured.
|
/// The [onImageCaptured] parameter is an optional callback function that will be triggered when an image and location data are captured.
|
||||||
/// The [userAgent], [refererUrl], and [packageName] parameters are required for open street map policies https://operations.osmfoundation.org/policies/tiles.
|
/// The [userAgent], and [packageName] parameters are required for open street map policies https://operations.osmfoundation.org/policies/tiles.
|
||||||
const MapCameraLocation({
|
const MapCameraLocation({
|
||||||
super.key,
|
super.key,
|
||||||
required this.camera,
|
required this.camera,
|
||||||
this.onImageCaptured,
|
this.onImageCaptured,
|
||||||
required this.userAgent,
|
required this.userAgent,
|
||||||
required this.refererUrl,
|
|
||||||
required this.packageName,
|
required this.packageName,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -241,8 +239,6 @@ class _MapCameraLocationState extends State<MapCameraLocation> {
|
|||||||
headers: {
|
headers: {
|
||||||
'User-Agent':
|
'User-Agent':
|
||||||
widget.userAgent,
|
widget.userAgent,
|
||||||
'Referer':
|
|
||||||
widget.refererUrl
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
userAgentPackageName:
|
userAgentPackageName:
|
||||||
|
|||||||
Reference in New Issue
Block a user