77 lines
1.7 KiB
Markdown
77 lines
1.7 KiB
Markdown
|
# Implementierung
|
||
|
|
||
|
## Grundaufbau
|
||
|
|
||
|
### Entwicklungsumgebung
|
||
|
|
||
|
### Flutter Version Management
|
||
|
|
||
|
Zur Installation von Flutter und Dart empfiehlt
|
||
|
sich ein Version Manager. Der bekannteste Version
|
||
|
Manager ist FVM (Flutter Version Management), doch
|
||
|
der neuere Manager Puro bietet viele Vorteile.
|
||
|
|
||
|
MacOS und Linux
|
||
|
|
||
|
```bash
|
||
|
curl -o- https://puro.dev/install.sh | PURO_VERSION="1.4.4" bash
|
||
|
```
|
||
|
|
||
|
Windows
|
||
|
|
||
|
```powershell
|
||
|
Invoke-WebRequest -Uri "https://puro.dev/builds/1.4.4/windows-x64/puro.exe" -OutFile "$env:temp\puro.exe"; &"$env:temp\puro.exe" install-puro --promote
|
||
|
```
|
||
|
|
||
|
Puro Optimierungen:
|
||
|
|
||
|
- parallel git clone and engine download
|
||
|
- global cache for git history
|
||
|
- global cache for engine versions
|
||
|
|
||
|
With other approaches, each Flutter repository is in its own folder, requiring you to download and store the git history, engine, and framework of each version:
|
||
|
|
||
|
Puro implements a technology similar to GitLab's object deduplication to avoid downloading the same git objects over and over again. It also uses symlinks to share the same engine version between multiple installations:
|
||
|
|
||
|
```bash
|
||
|
puro use -g stable
|
||
|
```
|
||
|
|
||
|
```bash
|
||
|
puro create bachelor_elinux 3.19.0
|
||
|
```
|
||
|
|
||
|
```bash
|
||
|
puro use bachelor_elinux
|
||
|
```
|
||
|
|
||
|
`.puro.json`:
|
||
|
|
||
|
```json
|
||
|
{
|
||
|
"env": "bachelor_elinux"
|
||
|
}
|
||
|
```
|
||
|
|
||
|
`.vscode/settings.json`
|
||
|
|
||
|
```json
|
||
|
{
|
||
|
"dart.flutterSdkPath": "/Users/fabian/.puro/envs/bachelor_elinux/flutter",
|
||
|
"dart.sdkPath": "/Users/fabian/.puro/envs/bachelor_elinux/flutter/bin/cache/dart-sdk"
|
||
|
}
|
||
|
```
|
||
|
|
||
|
```bash
|
||
|
puro flutter --version
|
||
|
```
|
||
|
|
||
|
```bash
|
||
|
Flutter 3.19.0 • channel stable • https://github.com/flutter/flutter.git
|
||
|
Framework • revision bae5e49bc2 (6 days ago) • 2024-02-13 17:46:18 -0800
|
||
|
Engine • revision 04817c99c9
|
||
|
Tools • Dart 3.3.0 • DevTools 2.31.1
|
||
|
```
|
||
|
|
||
|
## Setup von Raspberry Pi
|