Before you begin, ensure you have the following installed on your system:
- Flutter SDK: Download and install Flutter SDK from the official website.
- Android Studio: Install Android Studio which includes Android SDK, Emulator, and other tools.
- Xcode (for iOS development): Required for building and running the iOS version of the app. Install from the Mac App Store.
- VS Code (optional): Install Visual Studio Code as the preferred code editor.
- Git: Version control system for cloning the project repository.
- Follow the instructions for Windows from the Flutter install guide.
- Download and install Android Studio from here.
- Open Android Studio and go to
File>Settings>System Settings>Android SDK. - Install the latest Android SDK tools and platforms.
- Set up an Android emulator by going to
AVD Managerand creating a virtual device.
-
Find the Flutter SDK Path:
- Locate the Flutter SDK directory. It should contain
flutterandbindirectories.
- Locate the Flutter SDK directory. It should contain
-
Add Flutter to Path:
- Open the Start Search, type in "env", and select "Edit the system environment variables".
- In the System Properties window, click on "Environment Variables".
- Under "System variables", find the "Path" variable, and click "Edit...".
- Click "New" and add the full path to the
flutter\bindirectory (e.g.,C:\flutter\bin). - Click "OK" to close all dialog boxes.
-
Add Dart to Path (Optional, if not included with Flutter):
- If Dart is installed separately, add the path to the
dart-sdk\bindirectory.
- If Dart is installed separately, add the path to the
-
Verify the Setup:
- Open a new command prompt and run:
flutter doctor
- Open a new command prompt and run:
- Follow the instructions for macOS from the Flutter install guide.
- Download and install Android Studio from here.
- Open Android Studio and go to
Preferences>System Settings>Android SDK. - Install the latest Android SDK tools and platforms.
- Set up an Android emulator by going to
AVD Managerand creating a virtual device.
- Install Xcode from the Mac App Store.
- Open Xcode and go to
Preferences>Locationsto set the command-line tools. - Install CocoaPods by running
sudo gem install cocoapodsin the terminal.
-
Add Flutter to Path:
- Open a terminal and run:
export PATH="$PATH:`pwd`/flutter/bin"
- Add the above line to your
~/.bash_profileor~/.zshrcfile to make the change permanent.
- Open a terminal and run:
-
Add Dart to Path (Optional, if not included with Flutter):
- If Dart is installed separately, add the path to the
dart-sdk/bindirectory.
- If Dart is installed separately, add the path to the
-
Verify the Setup:
- Open a new terminal and run:
flutter doctor
- Open a new terminal and run:
- Open a terminal or command prompt.
- Clone the project repository using Git:
git clone https://github.com/jacobdcook/DoctorAppFlutter cd doctor_app_project
- Navigate to the project directory in the terminal:
cd doctor_app_project - Run the following command to get all the dependencies:
flutter pub get
- Follow the instructions to set up Firebase for your Flutter project from the official guide.
- Ensure the
google-services.json(for Android) andGoogleService-Info.plist(for iOS) files are properly placed in the project.
- Ensure your Android device or emulator is running.
- Run the app using the following command:
flutter run
- Open the iOS project in Xcode:
open ios/Runner.xcworkspace
- Select your device or simulator and click the Run button.
- To build the APK file for Android, run:
flutter build apk --release
- The APK file will be located in
build/app/outputs/flutter-apk/app-release.apk.
- To build the IPA file for iOS, run:
flutter build ios --release
- Open the iOS project in Xcode:
open ios/Runner.xcworkspace
- Select your device and archive the project by going to
Product>Archive. - Follow the steps to export the IPA file.
- Firebase Configuration: Ensure that your Firebase project is properly configured and that all necessary files are included in the project.
- Third-Party Libraries: Make sure all third-party libraries are correctly added to the
pubspec.yamlfile and installed usingflutter pub get.
If you encounter any issues during the installation process, refer to the Flutter documentation or seek assistance from the project maintainer.
This installation guide provides detailed steps to set up, build, and run the Doctor App on your local machine. Follow each step carefully to ensure a successful setup.