CCExtractor / CCExtractor/ultimate_alarm_clock

chore: resolve accumulated Flutter analyzer warnings and lint violations

Open
#958 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
112
Forks
227
PR merge metrics
No merged PRs in 30d

Description

## Problem

The codebase has accumulated a significant number of Flutter analyzer warnings and lint violations over time. These include deprecated API usages, formatting inconsistencies, dead code, unnecessary null checks, and widget convention violations.

Left unaddressed, these issues:
- Increase noise in the analyzer output, making it harder to spot real problems
- Reduce compatibility with newer Flutter SDK versions
- Make the codebase harder to maintain and onboard new contributors to

## Current state

Running `flutter analyze` produces warnings across multiple categories:

- **Deprecated APIs** — `WillPopScope` and other widgets/methods removed or deprecated in recent Flutter versions
- **Formatting** — lines exceeding 80 columns, missing trailing commas
- **Const correctness** — missing `const` constructors and literals; unnecessary `Container` widgets
- **Dead code** — unused imports, variables, private helpers, unreachable switch branches
- **Null / type safety** — unnecessary null checks, redundant `is` type assertions
- **Widget conventions** — missing braces on control flow, `@immutable` violations, constructor style

## Expected state

- `flutter analyze` returns zero warnings
- All deprecated APIs replaced with their modern equivalents
- Codebase consistently formatted to the Dart style guide
- No unused code cluttering the project

## Acceptance criteria

- [x] `WillPopScope` fully migrated to `PopScope` (requires Flutter ≥ 3.12 — confirm SDK lower bound)
- [x] `flutter analyze` passes clean on CI
- [x] No functional behavior changes introduced
- [x] All existing tests continue to pass

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.