Buscar pacotes, repositórios e categorias de apps

Repositório GitHubPraveenGongada/wallpaper_manager_flutter

wallpaper_manager_flutter

Um plugin Flutter de alto desempenho que permite definir paredes programaticamente em dispositivos Android. Defina imagens na tela inicial, tela de bloqueio ou ambas sem travar a interface - mesmo com imagens de alta resolução. API simples, processamento eficiente de imagens e tratamento abrangente de erros.

Capa do projeto wallpaper_manager_flutter
Estrelas
7
Forks
8
Último push (UTC)
12 de abr. de 2025
Status do projeto
Ativo

README original

Texto original em inglês. Visite o GitHub para a versão atual.

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.

Praveen Kumar GitHub avatar
Autor no GitHub

Praveen Kumar ↗

@nammayatriBengaluru
LinguagensDartKotlin

Categorias

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 4 itens

  • flutter{"sdk":"flutter"}
  • plugin_platform_interface^2.0.2
  • flutter_testDesenvolvimento{"sdk":"flutter"}
  • flutter_lintsDesenvolvimento^5.0.0

Como escolher um repositório para seu projeto?

Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.

  1. Busque por nome, autor ou descrição e filtre por tema.
  2. Compare estrelas, forks e envios recentes. Estrelas indicam interesse, mas não garantem qualidade.
  3. Confira o README, a licença e as issues no GitHub antes de usar o projeto.

Fontes e manutenção

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗