Skip to content

Commit

Permalink
fix: update to v2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
codenameakshay committed Aug 23, 2024
1 parent 7c8db23 commit 3159833
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 2.1.0

* Fix Android 14 crash in apply methods
* Add method to open native wallpaper chooser
* Update to Flutter v3.22.1
* Update dependencies

## 2.0.3

* Fix native external apply methods not working
Expand Down
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ The package allows you to set wallpaper on your Android device asynchronously, i
- Set wallpaper from a URL
- Set wallpaper from a video file (file path)
- Can select locations (HOME, LOCK, BOTH)
- Open native wallpaper chooser
- Minimise your app and go to Android home screen

## Installing
Expand All @@ -56,7 +57,7 @@ Add this to your package's `pubspec.yaml` file:

```yaml
dependencies:
async_wallpaper: ^2.0.0
async_wallpaper: ^2.1.0
```
### 2. Install it
Expand Down Expand Up @@ -282,6 +283,28 @@ try {
```

## openWallpaperChooser

Opens Android native wallpaper chooser.

```dart
String result;
// Platform messages may fail, so we use a try/catch PlatformException.
try {
result = await AsyncWallpaper.openWallpaperChooser(
filePath: file.path,
goToHome: goToHome,
toastDetails: ToastDetails.success(),
errorToastDetails: ToastDetails.error(),
)
? 'Opened wallpaper chooser'
: 'Failed to open wallpaper chooser.';
} on PlatformException {
result = 'Failed to open wallpaper chooser.';
}
```

> Note - You can find more detailed examples in the `example` directory.

# Bugs or Requests
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.0.3"
version: "2.1.0"
boolean_selector:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: async_wallpaper
description: Set wallpapers on Android asynchronously. Also supports video live wallpapers. Use this, when you want to set a wallpaper on Android without a delay or blocking your whole app.
version: 2.0.3
version: 2.1.0
homepage: https://hashstudios.dev
repository: https://github.com/codenameakshay/async_wallpaper

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.12.0 <4.0.0"
flutter: ">=1.20.0"

dependencies:
Expand Down

0 comments on commit 3159833

Please sign in to comment.