Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 35 additions & 30 deletions GettingStarted.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,51 @@
# Getting Started
# Getting started
## Android development with Windows 11
This IDE setup ist tested on Windows 11.

For setup first you need the following things:
- Flutter Version 3.27.1
- Android SDK and Android Emulator
- Flutter
- IDE like Android Studio or VS Code with Flutter Plugin installed.

## Steps to run App
1.⁠ ⁠Clone the repository with Git
Use paths for SDKs without spaces and sepcial characers.

```git clone https://github.com/simonoppowa/OpenNutriTracker.git```
### Setup Android SDK and Emulator
1. Download Android Studio from https://developer.android.com/studio and install. Keep "Android Virtual Device" checked. Start Android Studio after installation.

2.⁠ ⁠Get Dependencies
2. Install the Android SDK when asked.

```flutter pub get```
3. After finishing the SDK installation you should the "Welcome to Android Studio" Screen. Click on "More Actions" -> "SDK Manager", switch to "SDK Tools" tab and check "Android SDK Command-line Tools (latest)", click "OK" and install the tools.

3.⁠ ⁠Run Build Runner to generate Files
4. Check under "More Actions" -> "Virtual Device Manager" if a virtual phone was set up, if not create one, e.g. a Medium Phone with Default Settings.

```flutter pub run build_runner build```
5. Close Android Studio.

### Setup Flutter SDK
1. Download Flutter 3.27.1 from https://docs.flutter.dev/install/archive and extract.

2. Add the bin folder in the folder where you extracted Flutter to the Path variable in "Advanced System Settings" -> "Environement Variables..." -> "System variables" -> "Path"

### Setup the Workspace in Visual Studio Code (VSC)
1. Create a new folder, open the folder in VSC.

4.⁠ ⁠Run App
2. Configure the Android SDK path for Flutter:

```flutter run lib/main.dart```
```flutter config --android-sdk "e:\path\to\androidSDK"```

## Running the Application
3.⁠ ⁠Clone the repository with git in a VSC terminal (make sure the active folder in the terminal is your created folder from step 1):

The application can be run on multiple platforms. Here are the commands for each:
```git clone https://github.com/simonoppowa/OpenNutriTracker.git .```

### Web (Chrome)
```bash
flutter run -d chrome
```
4.⁠ ⁠Get Dependencies.

```flutter pub get```

5.⁠ ⁠Run Build Runner to generate Files.

```flutter pub run build_runner build```

### iOS
```bash
open -a Simulator
flutter run
```
At the best revert all the visible generated files now, only env.g.dart is needed, it is not checked in because it is in .gitignore.

### macOS
```bash
flutter run -d macos
```
6.⁠ ⁠Restart VSC, VSC detects now that this is a flutter project. On the Bottom Right "No Device" ist displayed, click on it, then select "Start Medium Phone" on the command Palette on the top. Wait for the phone to boot up.

### Android
```bash
flutter run -d android
```
7. Press F5 to start a debug session (may taka a while on the first time). Keep the virtual phone running all the time, just start and stop Debugging.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ See [Data Protection](https://www.iubenda.com/privacy-policy/53501884)
## Contribution
Contributions to OpenNutriTracker are welcome! If you find any issues or have suggestions for new features, please open an issue or submit a pull request. Make sure to follow the project's code style and guidelines.

## Getting Started
### Getting Started With Development
See the [Getting Started](GettingStarted.md) file for more information.


## Disclaimer
OpenNutriTracker is not a medical application. All data provided is not validated and should be used with caution. Please maintain a healthy lifestyle and consult a professional if you have any problems. Use during illness, pregnancy or lactation is not recommended.

Expand All @@ -78,4 +77,4 @@ For questions, suggestions, or collaborations, feel free to contact the project
Simon Oppowa

- GitHub: [@simonoppowa](https://github.com/simonoppowa)
- Email: [[email protected]](mailto:[email protected])
- Email: [[email protected]](mailto:[email protected])