Search packages, repositories and app categories

Package detailsv1.0.1

wallpaper_manager_flutter

A Flutter plugin to set wallpapers for home, lock screen, or both on Android. Fast and efficient even for large images.

Android
30-day downloads
636
Likes
54
Pub points
160

Install package

flutter pub add wallpaper_manager_flutter

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

WallpaperManagerFlutter is a Flutter plugin that enables setting wallpapers for the home screen, lock screen, or both on Android devices. It efficiently handles large images with fast performance, making it ideal for apps requiring dynamic wallpaper changes. The plugin integrates seamlessly into Flutter projects and provides a straightforward API to manage wallpaper settings programmatically. It's particularly useful for photo-sharing, customization, or lifestyle apps aiming to enhance user experience through personalized backgrounds.

Use cases

  • Setting custom wallpapers from app content
  • Creating photo gallery apps with wallpaper features
  • Enabling user-driven home screen personalization
  • Developing lifestyle or productivity apps with visual themes
  • Integrating wallpaper functionality in image editing tools

Key features

  • Supports home screen and lock screen wallpaper settings
  • Optimized for large image handling
  • Fast and efficient performance
  • Simple integration with Flutter projects
  • Cross-platform compatibility on Android

Suitable for

  • Android-focused Flutter developers
  • Apps requiring dynamic wallpaper updates
  • Photo and design-oriented applications
  • User interface customization tools
  • Creative and lifestyle mobile apps

Considerations

  • Limited to Android platform
  • Requires appropriate permissions
  • May have device-specific behavior variations
  • Not compatible with iOS
  • Dependent on Android system-level wallpaper APIs

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Wallpaper Manager Flutter 🖼️

A powerful Flutter plugin that enables you to programmatically set wallpapers. This plugin maintains smooth performance even with high-resolution wallpapers. Easily customize home screen, lock screen, or both screens with just a few lines of code!

Pub Version License: MIT

Features ✨

  • Set wallpapers on home screen, lock screen, or both 🏠
  • Efficient image processing using isolates to prevent UI blocking 🚀
  • Handles large image files without lag or freezing 💪
  • Comprehensive error handling and validation ✅
  • Simple and intuitive API 🎯

Demo 📱

Wallpaper Manager Demo

A simple demonstration of setting wallpapers without any lag or freezing

Installation 📦

Add this to your package's pubspec.yaml file:

dependencies:
  wallpaper_manager_flutter: ^latest_version

Usage 💻

First, import the package:

import 'package:wallpaper_manager_flutter/wallpaper_manager_flutter.dart';
Setting Wallpaper

You can set wallpapers for different screens using the following constants:

// Create instance
final wallpaperManager = WallpaperManagerFlutter();

// Available options for wallpaper location: homeScreen, lockScreen & bothScreens

// Example: Set wallpaper on home screen
try {
  File imageFile = File('path_to_your_image.jpg');
  bool result = await wallpaperManager.setWallpaper(
    imageFile,
    WallpaperManagerFlutter.homeScreen,
  );

  if (result) {
    print('Wallpaper set successfully! 🎉');
  }
} catch (e) {
  print('Error setting wallpaper: $e ❌');
}

Error Handling 🛡️

The plugin includes comprehensive error handling. Here are some common errors you might encounter:

  • File does not exist
  • Invalid location value
  • Platform-specific errors

Always wrap the setWallpaper call in a try-catch block to handle potential errors gracefully.

Platform Support 📱

Platform Support Notes
Android ✅ Full support for home screen, lock screen, and both screens
iOS ❌ Not supported due to iOS system security restrictions.

Note: Requires Android 7.0 (API level 24) or higher.

Contributing 🤝

Contributions are welcome! If you have a bug fix or new feature, please create a pull request. For major changes, please open an issue first to discuss what you would like to change.

License 📄

This project is licensed under the MIT License - see the LICENSE file for details.

Support ❤️

If you find this plugin helpful, please give it a star ⭐ on GitHub and consider following me for more useful Flutter plugins!

For any issues, feature requests, or questions, please create an issue on GitHub.

Categories

Dependencies

Dependency list 1 items

  • plugin_platform_interface^2.0.2

Source repository

Projects using this package

No data available yet.