Pettify is an all-in-one solution for pet owners, offering functionalities such as adding pets, setting task reminders, AI pet doctor consultations, shopping for pet essentials, and tracking your pets. This repository contains the module PetTrack which enables real-time location tracking of pets through a mobile app.
- Add Pets: Register your pets with their details.
- Set Task Reminders: Never miss a vet appointment or feeding time.
- AI Pet Doctor: Consult with an AI-driven virtual vet.
- Shop Pet Essentials: Buy food, toys, and other pet supplies.
- Track Your Pet: Real-time location tracking using the pet's chip.
- Flutter SDK: Install Flutter
- Firebase Project: Set up Firebase
-
Clone the repository:
https://github.com/Fuzail-Raza/pet_track.git cd Pettify -
Install dependencies:
flutter pub get
-
Set up Firebase:
- Download
google-services.jsonfrom your Firebase project and place it inandroid/app. - Download
GoogleService-Info.plistfrom your Firebase project and place it inios/Runner.
- Download
-
Configure Android permissions: Add the following permissions to
AndroidManifest.xml:<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
-
Configure iOS permissions: Add the following keys to
Info.plist:<key>NSLocationWhenInUseUsageDescription</key> <string>We need your location to track your pet.</string>
Run the app on a physical device as emulators may not provide accurate location data.
flutter run- Input your email in the form field.
- Fetch Pet Data: Click the "Fetch" button to retrieve the list of your registered pets.
- Select a Pet: Tap on a pet from the list to start tracking.
- Real-time Updates: The app will request location permissions and start tracking the pet's location.
- Save Location: The pet's location is periodically updated and saved in Firestore.
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(const MyApp());
}- Fetches pet data from Firestore.
- Displays a list of pets associated with the entered email.
- Utilizes the
locationpackage to get real-time location updates. - Saves the pet's location in Firestore.
flutter: SDK for building apps.firebase_core: Core functionalities for Firebase.cloud_firestore: Firestore database integration.google_maps_flutter: Google Maps integration.location: For accessing device location.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Commit your changes (
git commit -am 'Add some feature'). - Push to the branch (
git push origin feature-branch). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
For any queries, please contact [fuzailraza161@gmail.com].
Enjoy using Pettify and keep your pets safe and happy! 🐾