Update SDK

This commit is contained in:
2025-12-15 00:25:01 -05:00
parent 110c5d99a1
commit f4bf073d52
2 changed files with 76 additions and 32 deletions

View File

@@ -33,10 +33,23 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Git Bash (for Flutter internal scripts)
shell: pwsh
run: |
# Add Git Bash to PATH for Flutter internal scripts that might need it
$gitPath = "${env:ProgramFiles}\Git\bin"
if (Test-Path $gitPath) {
$env:PATH = "$gitPath;$env:PATH"
echo "PATH=$env:PATH" >> $env:GITHUB_ENV
Write-Host "Added Git Bash to PATH: $gitPath"
} else {
Write-Host "Git Bash not found at expected location"
}
- name: Setup Flutter - name: Setup Flutter
uses: subosito/flutter-action@v2 uses: subosito/flutter-action@v2
with: with:
flutter-version: '3.22.3' flutter-version: '3.27.1'
channel: 'stable' channel: 'stable'
cache: true cache: true
@@ -44,6 +57,10 @@ jobs:
shell: pwsh shell: pwsh
run: flutter config --enable-windows-desktop run: flutter config --enable-windows-desktop
- name: Verify Flutter setup
shell: pwsh
run: flutter doctor -v
- name: Create production .env file - name: Create production .env file
working-directory: flutter_app working-directory: flutter_app
shell: pwsh shell: pwsh
@@ -59,10 +76,6 @@ jobs:
shell: pwsh shell: pwsh
run: flutter pub get run: flutter pub get
- name: Flutter doctor
shell: pwsh
run: flutter doctor -v
- name: Setup Certificate for Signing - name: Setup Certificate for Signing
working-directory: flutter_app working-directory: flutter_app
shell: pwsh shell: pwsh
@@ -101,17 +114,34 @@ jobs:
# Run our custom build script # Run our custom build script
.\build_windows.ps1 -Release .\build_windows.ps1 -Release
# Rename the archive to include version # The build script creates: build\rmtPocketWatcher-Windows-v{version}-release.zip
# Rename to simpler format for release
$version = "${{ needs.get-version.outputs.version }}" $version = "${{ needs.get-version.outputs.version }}"
if (Test-Path "build\rmtPocketWatcher-Windows-Standalone.zip") {
Rename-Item "build\rmtPocketWatcher-Windows-Standalone.zip" "rmtPocketWatcher-Windows-v$version.zip" # Find the generated zip and rename it
$sourceZip = "build\rmtPocketWatcher-Windows-v$version-release.zip"
if (Test-Path $sourceZip) {
Move-Item $sourceZip "rmtPocketWatcher-Windows-v$version.zip" -Force
Write-Host "Created rmtPocketWatcher-Windows-v$version.zip"
} else {
# Fallback: find any matching zip
$zipFiles = Get-ChildItem -Path "build" -Filter "rmtPocketWatcher-Windows-*.zip" -ErrorAction SilentlyContinue
if ($zipFiles) {
Move-Item $zipFiles[0].FullName "rmtPocketWatcher-Windows-v$version.zip" -Force
Write-Host "Created rmtPocketWatcher-Windows-v$version.zip from $($zipFiles[0].Name)"
}
} }
# Also create a simple executable-only archive # Create portable (single exe) archive
if (Test-Path "build\windows\standalone\rmtpocketwatcher.exe") { if (Test-Path "build\windows\standalone\rmtpocketwatcher.exe") {
Compress-Archive -Path "build\windows\standalone\rmtpocketwatcher.exe" -DestinationPath "rmtPocketWatcher-Windows-Portable-v$version.zip" -CompressionLevel Optimal Compress-Archive -Path "build\windows\standalone\rmtpocketwatcher.exe" -DestinationPath "rmtPocketWatcher-Windows-Portable-v$version.zip" -CompressionLevel Optimal -Force
Write-Host "Created rmtPocketWatcher-Windows-Portable-v$version.zip"
} }
# List created artifacts
Write-Host "Artifacts created:"
Get-ChildItem -Filter "*.zip" | ForEach-Object { Write-Host " - $($_.Name)" }
- name: Upload Windows artifacts - name: Upload Windows artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
@@ -138,16 +168,20 @@ jobs:
- name: Setup Flutter - name: Setup Flutter
uses: subosito/flutter-action@v2 uses: subosito/flutter-action@v2
with: with:
flutter-version: '3.22.3' flutter-version: '3.27.1'
channel: 'stable' channel: 'stable'
cache: true cache: true
- name: Setup Android SDK - name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Accept Android licenses
shell: bash shell: bash
run: | run: yes | sdkmanager --licenses || true
# Install Android SDK using Flutter's built-in tools
flutter doctor --android-licenses || echo "Licenses handled" - name: Verify Flutter setup
flutter doctor -v shell: bash
run: flutter doctor -v
- name: Create production .env file - name: Create production .env file
working-directory: flutter_app working-directory: flutter_app

View File

@@ -318,8 +318,12 @@ class _PriceChartState extends State<PriceChart> {
_yAxisMax = _baseYAxisMax; _yAxisMax = _baseYAxisMax;
} }
// Calculate 65% of viewport height for the chart
final screenHeight = MediaQuery.of(context).size.height;
final chartHeight = screenHeight * 0.65;
return Container( return Container(
height: 250, // Reduced from 300 for more compact layout height: chartHeight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: const Color(0xFF0A0E27), color: const Color(0xFF0A0E27),
borderRadius: BorderRadius.circular(4), borderRadius: BorderRadius.circular(4),
@@ -333,23 +337,28 @@ class _PriceChartState extends State<PriceChart> {
_yAxisMax = _baseYAxisMax; _yAxisMax = _baseYAxisMax;
}); });
}, },
child: Listener( child: NotificationListener<ScrollNotification>(
onPointerSignal: (pointerSignal) { onNotification: (ScrollNotification notification) {
if (pointerSignal is PointerScrollEvent) { // Consume scroll notifications to prevent them from bubbling up
setState(() { return true;
// Scroll up = zoom in (decrease Y max), scroll down = zoom out (increase Y max)
final delta = pointerSignal.scrollDelta.dy;
final zoomFactor = delta > 0 ? 1.1 : 0.9; // Zoom sensitivity
_yAxisMax *= zoomFactor;
// Clamp Y-axis max to reasonable bounds
final minY = maxPrice * 0.1; // Don't zoom in too much
final maxY = maxPrice * 10; // Don't zoom out too much
_yAxisMax = _yAxisMax.clamp(minY, maxY);
});
}
}, },
child: Listener(
onPointerSignal: (pointerSignal) {
if (pointerSignal is PointerScrollEvent) {
setState(() {
// Scroll up = zoom in (decrease Y max), scroll down = zoom out (increase Y max)
final delta = pointerSignal.scrollDelta.dy;
final zoomFactor = delta > 0 ? 1.1 : 0.9; // Zoom sensitivity
_yAxisMax *= zoomFactor;
// Clamp Y-axis max to reasonable bounds
final minY = maxPrice * 0.1; // Don't zoom in too much
final maxY = maxPrice * 10; // Don't zoom out too much
_yAxisMax = _yAxisMax.clamp(minY, maxY);
});
}
},
child: LineChart( child: LineChart(
LineChartData( LineChartData(
backgroundColor: const Color(0xFF0A0E27), backgroundColor: const Color(0xFF0A0E27),
@@ -491,6 +500,7 @@ class _PriceChartState extends State<PriceChart> {
handleBuiltInTouches: true, handleBuiltInTouches: true,
), ),
), ),
),
), ),
), ),
), ),