-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathflutter_helper.sh
More file actions
executable file
·70 lines (66 loc) · 1.88 KB
/
Copy pathflutter_helper.sh
File metadata and controls
executable file
·70 lines (66 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
# Flutter development helper script for Linux
# Set Android environment variables
export ANDROID_HOME="$HOME/Android/Sdk"
export ANDROID_SDK_ROOT="$ANDROID_HOME"
export PATH="$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator"
show_help() {
echo "DocLN Flutter Development Helper - Linux"
echo "Usage: $0 [command]"
echo ""
echo "Commands:"
echo " devices - List available devices"
echo " emulators - List available emulators"
echo " start-emu - Start default emulator (Medium_Phone)"
echo " run - Run app on first available device"
echo " build - Build APK for release"
echo " clean - Clean Flutter project"
echo " doctor - Run Flutter doctor"
echo " deps - Get Flutter dependencies"
echo " help - Show this help message"
echo ""
}
case "$1" in
"devices"|"dev")
echo "Available devices:"
flutter devices
;;
"emulators"|"emu-list")
echo "Available emulators:"
emulator -list-avds
;;
"start-emu"|"emu")
echo "Starting default emulator..."
emulator -avd Medium_Phone -no-snapshot-load -no-snapshot-save &
echo "Emulator started in background"
;;
"run"|"r")
echo "Running Flutter app..."
flutter run
;;
"build"|"b")
echo "Building APK for release..."
flutter build apk --release
;;
"clean"|"c")
echo "Cleaning Flutter project..."
flutter clean
flutter pub get
;;
"doctor"|"doc")
echo "Running Flutter doctor..."
flutter doctor -v
;;
"deps"|"d")
echo "Getting Flutter dependencies..."
flutter pub get
;;
"help"|"h"|"--help"|"-h"|"")
show_help
;;
*)
echo "Unknown command: $1"
show_help
exit 1
;;
esac