diff --git a/CHANGELOG.md b/CHANGELOG.md index 3edc58e..082d893 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.0.2 +## 0.0.3 # Changelog diff --git a/README.md b/README.md index db4e3ec..135e46f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# map_camera_location +# map_camera_flutter A Flutter package that provides a widget for capturing images with the device camera and retrieving the user's location information.
@@ -13,18 +13,18 @@ A Flutter package that provides a widget for capturing images with the device ca ## Getting Started -To use this package, add `map_camera_location` as a dependency in your `pubspec.yaml` file. +To use this package, add `map_camera_flutter` as a dependency in your `pubspec.yaml` file. ```yaml dependencies: - map_camera_location: ^2.0.0 + map_camera_flutter: ^2.0.0 ``` ### Usage Import the package in your Dart file: ```dart -import 'package:map_camera_location/map_camera_location.dart'; +import 'package:map_camera_flutter/map_camera_flutter.dart'; ``` ## Permissions @@ -63,7 +63,7 @@ Here's an example of how to use the `MapCameraLocation` widget: ```dart import 'package:flutter/material.dart'; -import 'package:map_camera_location/map_camera_location.dart'; +import 'package:map_camera_flutter/map_camera_flutter.dart'; void main() { runApp(MyApp()); @@ -75,7 +75,7 @@ class MyApp extends StatelessWidget { return MaterialApp( home: Scaffold( appBar: AppBar( - title: Text('Camera Location Demo'), + title: Text('Camera with map location'), ), body: Center( child: MapCameraLocation( diff --git a/assets/Screenshot_2.png b/assets/Screenshot_2.png new file mode 100644 index 0000000..870ef5d Binary files /dev/null and b/assets/Screenshot_2.png differ diff --git a/lib/src/map_camera.dart b/lib/src/map_camera.dart index a79d240..a36e7ac 100644 --- a/lib/src/map_camera.dart +++ b/lib/src/map_camera.dart @@ -6,23 +6,30 @@ import '../../map_camera_flutter.dart'; -///import 'package:your_app/map_camera_location.dart'; // Import the file where the MapCameraLocation widget is defined +///import 'package:your_app/map_camera_flutter.dart'; // Import the file where the MapCameraLocation widget is defined /// ``` /// void main() { -/// runApp(MyApp()); +/// final cameras = await availableCameras(); +/// final firstCamera = cameras.first; +/// runApp(MyApp(camera: firstCamera)); /// } /// /// class MyApp extends StatelessWidget { +/// final CameraDescription camera; +/// const MyApp({super.key, required this.camera}); +/// /// @override /// Widget build(BuildContext context) { /// return MaterialApp( -/// home: CameraLocationScreen(), +/// home: CameraLocationScreen(camera: firstCamera), /// ); /// } /// } /// /// class CameraLocationScreen extends StatelessWidget { +/// final CameraDescription camera; +/// const MyApp({super.key, required this.camera}); // // Callback function to handle the captured image and location data /// void handleImageAndLocationData(ImageAndLocationData data) { // // You can use the data here as needed @@ -37,7 +44,7 @@ import '../../map_camera_flutter.dart'; /// Widget build(BuildContext context) { /// // Provide the CameraDescription and the handleImageAndLocationData callback function to the MapCameraLocation widget /// return MapCameraLocation( -/// camera: YOUR_CAMERA_DESCRIPTION_OBJECT, // Replace YOUR_CAMERA_DESCRIPTION_OBJECT with your actual CameraDescription +/// camera: camera, // YOUR_CAMERA_DESCRIPTION_OBJECT, // Replace YOUR_CAMERA_DESCRIPTION_OBJECT with your actual CameraDescription /// onImageCaptured: handleImageAndLocationData, /// ); /// } diff --git a/pubspec.yaml b/pubspec.yaml index cf9915b..b3dafbd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: map_camera_flutter description: The MapCameraLocation package provides a convenient way to capture images with map and location data using the device's camera. -version: 0.0.2 +version: 0.0.3 homepage: https://github.com/Always-Bijoy/map_camera_location_flutter environment: