Skip to content

chore: fix Flutter analyzer and lint issues#959

Open
NihalDR wants to merge 73 commits into
CCExtractor:mainfrom
NihalDR:lint
Open

chore: fix Flutter analyzer and lint issues#959
NihalDR wants to merge 73 commits into
CCExtractor:mainfrom
NihalDR:lint

Conversation

@NihalDR

@NihalDR NihalDR commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Addresses a broad set of Flutter analyzer warnings and lint violations across the codebase. No functional behavior changes — this is a pure code-quality and compatibility pass.

Changes

Formatting

  • Enforced Dart 80-column line length throughout
  • Added trailing commas to all multi-line argument lists and widget trees
  • Added targeted // ignore: lines_longer_than_80_chars for deeply nested widget trees where auto-formatting produces worse results; the lint rule itself remains enabled

Const correctness

  • Added const constructors and const literals wherever the analyzer allows
  • Replaced unnecessary Container wrappers with lighter SizedBox, Padding, or ColoredBox equivalents

API modernisation

  • Migrated all WillPopScope usages to PopScope (required for Flutter 3.12+)
  • Updated other deprecated Flutter APIs flagged by the analyzer

Dead code removal

  • Removed unused imports, variables, and private helper methods
  • Removed unreachable default branches from exhaustive switch statements
  • Removed redundant .toList() calls and unnecessary type casts

Null / type safety

  • Removed unnecessary null checks (! and ?? x where the value is non-nullable)
  • Removed unnecessary is type checks
  • Fixed invalid accesses to @protected members

Widget conventions

  • Added missing braces to single-statement if/else blocks
  • Aligned constructor declarations to lint rules (super parameters, key handling)
  • Ensured all widget classes satisfy @immutable requirements

Testing

  • flutter analyze passes with zero warnings
  • All existing tests pass
  • Manually verified screens affected by WillPopScopePopScope migration

Fixes

#958

Rijuth Menon and others added 30 commits April 14, 2025 21:49
…l widget errors, and resolve overflow issues
SQLite Database Schema Migration for Alarm Clock App
Resolved merge conflicts between shared alarm functionality and system ringtones:
- Combined shared alarm features with system ringtone support
- Merged MainActivity.kt with both shared alarm methods and system ringtone methods
- Integrated time input controllers with shared alarm functionality
- Preserved both notification systems and audio management
- Fixed all import conflicts and maintained backward compatibility

Features merged:
✅ Shared alarm functionality with push notifications
✅ System ringtone selection and playback
✅ Max snooze count settings
✅ Time input controllers
✅ Guardian angel improvements
✅ Audio focus management
✅ Controller lifecycle improvements
…ed alarm functionality

- Combined negative condition alarm logic (4 activity condition types) with shared alarm system
- Updated database schema to version 3 with activityConditionType and weatherConditionType columns
- Enhanced AlarmReceiver to support both shared and local alarms with proper logging
- Updated BootReceiver with shared alarm rescheduling after boot
- Modified MainActivity with proper alarm cancellation logic preserving dual alarm types
- Fixed database providers to support both Firestore (shared) and SQLite (local) storage
- Integrated AlarmUtils.scheduleAlarm calls throughout the system
- Fixed snooze button instantly closing when duration is 0
- Added default 5-minute snooze when snoozeDuration is 0 or unset
- Enhanced debug logs UI with improved cards and filtering
- Added sunrise alarm effect widget for visual wake-up experience
- Improved alarm ring controller with better error handling
- Enhanced shared alarm functionality and location/weather conditions
mahendra-918 and others added 30 commits August 23, 2025 22:38
- Remove node_modules/ directory (58 files) from version control
- Remove ios/Podfile.lock from tracking
- Update .gitignore to prevent future build artifacts
- Add comprehensive ignore patterns for build/, gradle/, lock files
- Clean up repository for professional GSoC submission

This removes unnecessary artifacts while preserving all legitimate GSoC work.
Co-authored-by: Inderjeet Singh <inderjet05@gmail.com>
…tor#915)

Fixes CCExtractor#914

- Removed duplicate import of debug_view.dart
- Removed unused import of DebugController
- Resolves analyzer warnings that fail CI
* Implement a graceful UI fallback when system ringtones are unavailable on iOS

* fix(android): remove null-unsafe unwraps in location/weather services

Resolve crash-prone null assertions in LocationFetcherService and WeatherFetcherService with guarded parsing, logging, and graceful exits.\n\nCloses CCExtractor#931

* fix(android): make foreground start API-safe for minSdk 24

Use SDK-gated foreground service startup to avoid 3-arg startForeground on older Android versions.\n\nRefs CCExtractor#933
…tractor#926)

* Implement a graceful UI fallback when system ringtones are unavailable on iOS

* Update alarm_challenge_controller.dart

* Update share_dialog.dart

* Fix email validation regex in share_dialog.dart

* docs: reflect support for subdomains and hyphens in shared emails
* fix: Stopped the laggy UI animation everytime the app is rebuilt

* fix: Used confirmDismiss instead of ondismissed which prevents unnecessary rebuilds and error

* fix: prevents default animation for when multipleSelected mode is true
…CCExtractor#833)

* Stage 1: Added alarmDate parameter to timeUntilAlarm

* Updated  and  Controller

* Done
Co-authored-by: Kush Choudhary <kushchoudhary@Kushs-MacBook-Pro.local>
…actor#940)

* feat(world-clock): add visible remove action for added clocks

* Enhance Shared Alarm System to Support Full Alarm Feature Set

- Extend shared alarm payload to include full alarm configuration and payload versioning

- Reconstruct accepted alarms from full payload with backward-compatible fallback

- Improve notification UI with time, label, and repeat schedule details

- Add robust deserialization defaults for legacy/partial payloads

- Add tests for serialization compatibility and notification payload parsing

Refs CCExtractor#939

* Delete test/shared_alarm_payload_test.dart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants