This Flutter app allows users to input a location (city name, address, or coordinates) and displays it on a map. The purpose of this project is to demonstrate my ability to handle user input, integrate maps, and follow best coding practices in Flutter.
-
Location Input Screen:
- A simple interface where users can input a location.
- Basic validation ensures that the input is not left empty.
- A button directs the user to the map display screen.
-
Location Display on Map:
- Displays the entered location with a marker on a map.
- Integrates a Flutter package to handle map rendering (e.g.,
flutter_map
orgoogle_maps_flutter
). - Optionally, the user can switch between map types (satellite, terrain, etc.).
- Includes error handling for invalid locations or connection issues.
-
Bonus Features:
- Option to detect and display the user’s current location with a marker.
- Toggle between different map types for better user experience.
-
First Screen:
- A text field for location input, with validation and error messages for empty fields.
- A button to proceed to the next screen after valid input.
-
Second Screen:
- Loads a map using the input location from the first screen.
- Displays a marker on the map at the location entered.
- Optional: Button to switch between map types (satellite, terrain, normal).
- Optional: Button to detect and display the user's current location.
- Flutter SDK installed on your system.
- A map API key if using a map provider like Google Maps (for
google_maps_flutter
). - An emulator or connected physical device to test the app.
-
Clone the Repository:
git clone https://github.com/HiBorn4/Reside_Locator.git cd Reside_Locator
-
Install Dependencies: Run the following command in the project directory to fetch all necessary packages:
flutter pub get
-
Run the App: Launch the app on an emulator or a physical device:
flutter run
- To enable the bonus features (switch map types, detect current location), make sure the device or emulator has location services enabled.
- Modular Code: The code is separated into different files for better maintainability (e.g., screens, services, and widgets).
- Comments: Relevant comments are added to explain key functions, classes, and logic.
- State Management: Basic state management is used to manage user input and location rendering.
- Error Handling: Graceful handling of errors like invalid locations, empty input fields, and API errors.
flutter_map
: For map rendering and interaction.geolocator
: For detecting the user’s current location (optional).provider
andsetState
: For state management (optional, depending on implementation).
- Enhance error handling for network-related issues.
- Allow users to save and revisit locations.
- Implement reverse geocoding for better user experience.
This app demonstrates my understanding of Flutter development, including UI design, state management, and third-party package integration. I am confident in my ability to adapt to different Flutter challenges and build scalable, maintainable applications.
Feel free to reach out if you have any questions or need further clarification.