Skip to content

Add auto-rotate wallpaper feature with BLoC architecture#296

Open
codenameakshay wants to merge 5 commits into
akshay/3.0.0from
claude/auto-rotate-wallpaper-integration-Laknx
Open

Add auto-rotate wallpaper feature with BLoC architecture#296
codenameakshay wants to merge 5 commits into
akshay/3.0.0from
claude/auto-rotate-wallpaper-integration-Laknx

Conversation

@codenameakshay

Copy link
Copy Markdown
Member

Summary

Implements a complete auto-rotate wallpaper feature that allows users to automatically change wallpapers at configurable intervals from various sources (favorites, categories, or collections). The feature includes a full BLoC-based architecture with local persistence and integration with the async_wallpaper plugin.

Key Changes

Feature Implementation

  • Auto Rotate Screen (auto_rotate_screen.dart): Complete UI with sections for:
    • Status banner showing rotation state with quick rotate action
    • Source selection (Favorites, Category, Collection) with dynamic dropdowns
    • Screen target selection (Home, Lock, Both)
    • Interval configuration with preset options
    • Trigger settings (charging-based rotation)
    • Rotation order selection (Sequential/Shuffle)
    • Start/Stop controls with loading states

Architecture & Business Logic

  • BLoC (auto_rotate_bloc.j.dart): Manages 10 events covering configuration changes, start/stop operations, and status management
  • State Management (auto_rotate_state.j.dart): Tracks configuration, running status, available sources, and action states
  • Freezed Code Generation: Full immutable data classes with pattern matching support for events and state

Domain Layer

  • Entity (auto_rotate_config_entity.dart): Immutable configuration with enums for source type and rotation order
  • Repository Interface (auto_rotate_repository.dart): Defines contract for config persistence and rotation control
  • Use Cases (auto_rotate_usecases.dart): Five use cases for load, save, start, stop, and status operations

Data Layer

  • Local Data Source (auto_rotate_local_data_source.dart): Persists configuration to local storage with proper enum/enum serialization
  • Repository Implementation (auto_rotate_repository_impl.dart): Orchestrates wallpaper rotation via async_wallpaper plugin, fetches wallpaper URLs from favorites/categories/collections, and manages rotation lifecycle

Integration

  • Dependency Injection: Registered all BLoC, use cases, repository, and data source in the DI container
  • Router: Added AutoRotateRoute to app navigation
  • Settings Integration: Added navigation link to Auto Rotate screen in Settings
  • Persistence Keys: Added 8 new keys for storing auto-rotate configuration

Notable Implementation Details

  • Supports three wallpaper sources with dynamic dropdown population from available collections and categories
  • Charging trigger allows rotation to be triggered when device is plugged in
  • Rotation order can be sequential or shuffled
  • Configuration persists across app sessions
  • Real-time status checking and manual rotation capability
  • Proper error handling with failure states displayed to user
  • Disabled configuration changes while rotation is active to prevent conflicts

https://claude.ai/code/session_01Td3B5x53BgciabNMC9kb43

…urites support

- Upgrade async_wallpaper from 3.0.0 to 3.1.0 to get rotation APIs
- Add AutoRotateConfigEntity (Freezed) with source type, target, interval, triggers, order
- Add AutoRotateLocalDataSource for persisting config via LocalStore
- Add AutoRotateRepositoryImpl that fetches wallpaper URLs from the selected
  source (favourites, category, or collection) and calls the plugin rotation APIs
- Add AutoRotateBloc with events for all config changes, start/stop/status/rotate-now
- Add AutoRotateScreen UI: status banner, source selector with dropdowns, screen
  target selector, interval chips, charging trigger switch, order picker, start/stop button
- Register AutoRotateRoute in app_router and injection config
- Add 'Auto Rotate' entry in Settings → Android Widgets section (Android-only)
- Add 8 new persistence keys under auto_rotate.* namespace

https://claude.ai/code/session_01Td3B5x53BgciabNMC9kb43
@coderabbitai

coderabbitai Bot commented Mar 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b6f77443-af10-428e-9afc-49adcacc3ee0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/auto-rotate-wallpaper-integration-Laknx
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Mar 16, 2026

Copy link
Copy Markdown

Android App Size Report

Status: FAIL

Metric Base Head Delta
app-profile.apk 85,112,321 B (81.17 MiB) 103,077,030 B (98.30 MiB) 17,964,709 B (17.13 MiB) (21.11%)

Thresholds: max delta 1,572,864 B (1.50 MiB) OR 5.00%.

Top artifact bucket deltas (uncompressed bytes):

  • dex: +640,832 B (0.61 MiB)
  • native_libs: +131,072 B (0.12 MiB)
  • other: +1,304 B (0.00 MiB)
  • assets: +1,092 B (0.00 MiB)
  • meta_inf: +20 B (0.00 MiB)

@codenameakshay codenameakshay self-assigned this Mar 16, 2026
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.

2 participants