AOSSIE-Org / AOSSIE-Org/DocPilot

fix: deprecated withOpacity() calls should use Color.withValues()

Open
#39 1 comment 0 reactions 0 assignees View on GitHub
stale
Dominant language
Dart
Stars
18
Forks
24
PR merge metrics
No merged PRs in 30d

Description

## Description

Several files in the codebase use the deprecated `Color.withOpacity()` method. As of Flutter 3.27+, `withOpacity()` is deprecated in favor of `Color.withValues(alpha: ...)`, which provides better color space handling.

## Affected Files

- `lib/features/transcription/presentation/transcription_screen.dart` — 4 occurrences
- `lib/screens/transcription_detail_screen.dart` — 2 occurrences
- `lib/screens/prescription_screen.dart` — (via `ElevatedButton` disabled states)

## Expected Fix

Replace all `.withOpacity(x)` calls with `.withValues(alpha: x)`.

## References
- [Flutter deprecation notice](https://api.flutter.dev/flutter/dart-ui/Color/withOpacity.html)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.