feat: Enhance TTS player functionality and UI
- Added resume functionality to TTS player when paused. - Display voice name or language in TTS player UI. - Improved error handling in reader provider with debug messages. - Updated TTS service to configure Vietnamese voice and handle platform-specific audio settings. - Removed wakelock dependency and related code. - Fixed search screen error handling. - Updated settings screen to navigate to home after sign out. - Improved splash screen with timer management. - Enhanced main app error handling with logging. - Removed unused package_info_plus and wakelock_plus dependencies. - Added environment variable support for mobile runtime. - Integrated Google Sign-In configuration for Android. - Created logging observer for Riverpod providers. - Added scripts for environment setup and Google Sign-In validation.
This commit is contained in:
Executable
+45
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
ENV_FILE="$ROOT_DIR/.env.mobile"
|
||||
|
||||
if [[ ! -f "$ENV_FILE" ]]; then
|
||||
echo "Missing $ENV_FILE"
|
||||
echo "Create it from .env.mobile.example"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
get_env() {
|
||||
local key="$1"
|
||||
awk -F'=' -v k="$key" '$1==k{print substr($0, index($0,$2)); exit}' "$ENV_FILE" | sed 's/^"//; s/"$//'
|
||||
}
|
||||
|
||||
BASE_URL="$(get_env BASE_URL)"
|
||||
GOOGLE_SERVER_CLIENT_ID="$(get_env GOOGLE_SERVER_CLIENT_ID)"
|
||||
GOOGLE_CLIENT_ID="$(get_env GOOGLE_CLIENT_ID)"
|
||||
|
||||
if [[ -z "$BASE_URL" ]]; then
|
||||
echo "BASE_URL is required in $ENV_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "$GOOGLE_SERVER_CLIENT_ID" ]]; then
|
||||
echo "GOOGLE_SERVER_CLIENT_ID is required in $ENV_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
if [[ -n "$GOOGLE_CLIENT_ID" ]]; then
|
||||
flutter run \
|
||||
--dart-define=BASE_URL="$BASE_URL" \
|
||||
--dart-define=GOOGLE_SERVER_CLIENT_ID="$GOOGLE_SERVER_CLIENT_ID" \
|
||||
--dart-define=GOOGLE_CLIENT_ID="$GOOGLE_CLIENT_ID" \
|
||||
"$@"
|
||||
else
|
||||
flutter run \
|
||||
--dart-define=BASE_URL="$BASE_URL" \
|
||||
--dart-define=GOOGLE_SERVER_CLIENT_ID="$GOOGLE_SERVER_CLIENT_ID" \
|
||||
"$@"
|
||||
fi
|
||||
Reference in New Issue
Block a user