{"id":20940260,"url":"https://github.com/mohamedmagdy2301/maps_app","last_synced_at":"2025-04-22T17:25:50.238Z","repository":{"id":258402326,"uuid":"873801607","full_name":"mohamedmagdy2301/maps_app","owner":"mohamedmagdy2301","description":"This تطيبق الخريطه is a Flutter application that integrates OpenStreetMap functionality to provide location tracking, route directions, search features, and history management. It uses the flutter_bloc package to implement state management and provides a user-friendly interface for navigating maps and viewing routes.","archived":false,"fork":false,"pushed_at":"2025-03-13T12:29:39.000Z","size":5247,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T17:11:56.432Z","etag":null,"topics":["dart","flutter","flutter-map","flutter-maps","map","maps","open-street-map","open-street-maps","osm"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohamedmagdy2301.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-16T18:36:38.000Z","updated_at":"2025-03-13T12:29:43.000Z","dependencies_parsed_at":"2025-03-13T03:37:05.681Z","dependency_job_id":null,"html_url":"https://github.com/mohamedmagdy2301/maps_app","commit_stats":null,"previous_names":["mohamedmagdy2301/maps_app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedmagdy2301%2Fmaps_app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedmagdy2301%2Fmaps_app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedmagdy2301%2Fmaps_app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedmagdy2301%2Fmaps_app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohamedmagdy2301","download_url":"https://codeload.github.com/mohamedmagdy2301/maps_app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250286217,"owners_count":21405386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","flutter","flutter-map","flutter-maps","map","maps","open-street-map","open-street-maps","osm"],"created_at":"2024-11-18T23:09:43.079Z","updated_at":"2025-04-22T17:25:50.229Z","avatar_url":"https://github.com/mohamedmagdy2301.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# *\"وَقُلْ رَبِّ زِدْنِي عِلْمًا\"*\n\n\u003c/div\u003e\n\u003cbr clear=\"both\"\u003e\n\u003ca href=\"https://git.io/typing-svg\"\u003e\u003cimg src=\"https://readme-typing-svg.demolab.com?font=Protest+Guerrilla\u0026weight=900\u0026size=45\u0026pause=1000\u0026color=F78918\u0026width=835\u0026height=100\u0026lines=تطيبق+الخريطه%F0%9F%98%8A%E2%9C%8C%EF%B8%8F\" alt=\"Typing SVG\" /\u003e\u003c/a\u003e\n\u003cbr clear=\"both\"\u003e\n\n## Overview\nThis **`تطيبق الخريطه`** is a Flutter application that integrates OpenStreetMap functionality to provide location tracking, route directions, search features, and history management. It uses the **flutter_bloc** package to implement state management and provides a user-friendly interface for navigating maps and viewing routes.\n\n[![Flutter Version](https://img.shields.io/badge/Flutter-v3.0-blue.svg)](https://flutter.dev/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n---\n\n## Features\n- **Current Location Tracking**: Automatically detects and displays the user's current location.\n- **Search Functionality**: Search for locations using names and receive location suggestions.\n- **Route Directions**: Displays routes between the user's current location and a selected destination.\n- **History Management**: Saves searched locations and allows users to clear the history.\n- **Interactive Map**: Supports zooming, tapping on the map to set destinations, and viewing routes with polyline overlays.\n\n---\n\n## Screenshots\n\n| Permission Maps Screen | Current Location Screen | Destination Location Screen | Directions Route Screen |\n|---|---|---|---|\n| ![Screenshot](assets/screenshots/premisions.png) | ![Screenshot](assets/screenshots/currant.png) | ![Screenshot](assets/screenshots/diestation.png)  | ![Screenshot](assets/screenshots/directoins.png)  |\n\n| Info Location Screen | Search Location Screen |  No History Screen |  History Locations Screen |\n|---|---|---|---|\n| ![Screenshot](assets/screenshots/info.png) | ![Screenshot](assets/screenshots/search.png) | ![Screenshot](assets/screenshots/no-history.png)  | ![Screenshot](assets/screenshots/history.png)  |\n\n---\n\n## Getting Started\n\n### Prerequisites\n- Install Flutter SDK: [Flutter Installation Guide](https://docs.flutter.dev/get-started/install)\n- Add dependencies in `pubspec.yaml`:\n  ```yaml\n  dependencies:\n    flutter:\n      sdk: flutter\n    flutter_bloc: ^8.1.1\n    flutter_map: ^5.0.0\n    latlong2: ^0.8.1\n    geolocator: ^13.0.1\n    geocoding: ^3.0.0\n    shared_preferences: ^2.0.15\n  ```\n\n### Setup\n1. Clone the repository:\n   ```bash\n   git clone \u003crepository_url\u003e\n   ```\n2. Navigate to the project directory:\n   ```bash\n   cd map-app\n   ```\n3. Get Flutter packages:\n   ```bash\n   flutter pub get\n   ```\n4. Run the app:\n   ```bash\n   flutter run\n   ```\n\n---\n\n## Folder Structure\n- **core/cubit**: Contains the BLoC cubits for managing state:\n  - `get_location_cubit.dart`: Tracks current location.\n  - `route_cubit.dart`: Handles route generation.\n  - `search_cubit.dart`: Manages location search and suggestions.\n- **screens**: Contains UI screens:\n  - `home_screen.dart`: Main map interface.\n  - `search_screen.dart`: Search and select destinations.\n  - `history_screen.dart`: Displays search history.\n- **widgets**: Reusable UI components like map builder, action buttons, etc.\n\n---\n\n## Main Components\n\n### 1. **Home Screen**\n- **Map Display**: Uses `FlutterMap` to render the OpenStreetMap tiles.\n- **Floating Buttons**:\n  - **Go to My Location**: Centers the map on the user's current location.\n  - **Route Information**: Displays route details if a route is active.\n  - **Get Directions**: Initiates directions between the current location and a tapped point.\n\n### 2. **Search Screen**\n- **Search Field**: Search for locations and view suggestions.\n- **Suggestions**: Fetches and displays location suggestions dynamically.\n- **Route Setup**: Automatically generates a route after selecting a location.\n\n### 3. **History Screen**\n- **View History**: Displays previously searched locations.\n- **Clear History**: Allows clearing of saved search data.\n\n### 4. **Custom Map Widgets**\n- `FlutterMapBuilder`: Renders the map and handles route overlays.\n- `AppBarHome`: Custom app bar for the home screen.\n\n---\n\n## Configuration\n- **Shared Preferences**: Used for storing search history locally.\n- **Map Tiles**: Configured via the `urlTemplate` in `FlutterMapBuilder`:\n  ```dart\n  const String urlTemplate = \"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\";\n  ```\n\n---\n\n## Contributing\n\nContributions are welcome! Feel free to submit a Pull Request with improvements, bug fixes, or new features.\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature/my-feature`).\n3. Make your changes and commit (`git commit -am 'Add new feature'`).\n4. Push to the branch (`git push origin feature/my-feature`).\n5. Create a new Pull Request.\n\n## Congratulations\n\nYou’ve successfully integrated **`تطيبق الخريطه`** into your Flutter app! For more advanced features and customization options.\n\nIf you found this guide helpful, don’t forget to ⭐ star this repository on GitHub to show your support!\n\nThank you for reading!\n\n## Contact\n\nFor any questions or inquiries, feel free to reach out:\n\n- **GitHub:** [mohamedmagdy2301](https://github.com/mohamedmagdy2301)\n- **Email:** [mohammedmego15@gmail.com](mohammedmego15@gmail.com)\n  \n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamedmagdy2301%2Fmaps_app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohamedmagdy2301%2Fmaps_app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamedmagdy2301%2Fmaps_app/lists"}