- Android Studio or Visual Studio Code
- Git
- Flutter SDK
- Dart
Open Android Studio:
-
Navigate to File -> New -> Project from Version Control.
-
Enter the repository URL: https://github.com/Redback-Operations/redback-smartbike-mobile.git
-
Choose the directory to save the project on your computer. Click Clone.
Add a .env file in the root project directory with the following content:
API_URL_BASE = http://<your_machine_network_address>:8000
API_URL_BASE = http://<192.168.3.103>:8000
Note: MUST USE HTTP protocol, not HTTPS! Use this address and port to host the backend
Navigate to the pubspec.yaml file and run:
pub get
This command will install all the necessary Flutter dependencies specified in pubspec.yaml.
Ensure that the backend server is running as the mobile app will need to communicate with it.
Using VS Code: Open lib/main.dart and press the run (play) button at the top right.
Using Android Studio: Run the project directly from the IDE.
-
New Features and Fixes: Always create a new branch before starting work on a new feature or fix:
bash
git checkout -b<name-of-fix-or-feature>
-
Commit Changes: Commit your changes frequently to maintain a good history and easier code reviews:
bash
git add .
git commit -m "Describe the changes here"
git push (You might need to set the upstream branch if it's a new branch) -
Pull Changes: It's good practice to pull the latest changes from the repository before starting on new features: bash
git pull
-
Merge Conflicts: If you encounter merge conflicts after pulling changes, consider saving your work in a separate file before attempting to resolve conflicts. This precaution helps avoid accidental data loss.
-
IDE and SDK Compatibility: Ensure that your development environment matches the versions known to work with the app:
IDE: Android Studio Iguana | 2023.2.1,
Xcode Version 15.4
Flutter: 3.22.3 Stable
Dart: 3.4.4 (comes with Flutter)
Java: v17 (comes with Android Studio Iguana)
DevTools: 3.34.3
Happy Coding!
Remember, if in doubt about any steps or issues, contact your project leader for assistance.