desktop_wallpaper_set 0.0.3 copy "desktop_wallpaper_set: ^0.0.3" to clipboard
desktop_wallpaper_set: ^0.0.3 copied to clipboard

PlatformmacOS

Flutter plugin for setting desktop wallpaper. Supports macos.

desktop_wallpaper_set #

A new Flutter plugin for wallpaper set.

Usage #

To use this plugin, add desktop_wallpaper_set as a dependency in your pubspec.yaml file.

Example #

import 'package:desktop_wallpaper_set/desktop_wallpaper_set.dart';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
import 'package:desktop_wallpaper_set/type.dart';
final _desktopWallpaperSetPlugin = DesktopWallpaperSet();

void main() {
  runApp(Scaffold(
    body: Center(
      child: ElevatedButton(
        onPressed: onSetWallpaper,
        child: Text('set wallpaper')
      ),
    ),
  ));
}


onSetWallpaper() async {
  final file = await DefaultCacheManager().getSingleFile(
        "http://i0.hdslb.com/bfs/baselabs/d8e091a5be327e2a24fa62f794281448a2010f7f.png");
  await _desktopWallpaperSetPlugin.setWallpaper(file.path, WallpaperType.img);
}

onSetVideoWallpaper() async {
  final file = await DefaultCacheManager().getSingleFile(
        "https://activity.hdslb.com/blackboard/static/20220829/a370089fc7c797ab7a9d638df8c9cbf7/PaGtZVhRco.mp4");
  await _desktopWallpaperSetPlugin.setWallpaper(file.path, WallpaperType.video);
}

8
likes
150
pub points
28%
popularity

Publisher

unverified uploader

Flutter plugin for setting desktop wallpaper. Supports macos.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on desktop_wallpaper_set