Skip to content

Commit 22c66fd

Browse files
committed
Release 2.5.0
1 parent 1fdc946 commit 22c66fd

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 2.5.0
2+
* Fix the scratcher image cover in Flutter 3.16 (by @h1amza)
3+
14
## 2.4.0
25
* Make scratcher work on iOS with Flutter 3.13+ (by @xrusu)
36

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Scratch card widget which temporarily hides content from the user.
44

5-
[![Version](https://img.shields.io/badge/pub-v2.3.0-blue.svg)](https://pub.dartlang.org/packages/scratcher)
5+
[![Version](https://img.shields.io/badge/pub-v2.5.0-blue.svg)](https://pub.dartlang.org/packages/scratcher)
66

77
![Demo](https://media.giphy.com/media/fXztsRTXoKsVuChtTl/giphy.gif)
88

@@ -21,7 +21,7 @@ Scratch card widget which temporarily hides content from the user.
2121
1. First thing you need to do is adding the scratcher as a project dependency in `pubspec.yaml`:
2222
```yaml
2323
dependencies:
24-
scratcher: "^2.3.0"
24+
scratcher: "^2.5.0"
2525
```
2626
2727
2. Now you can install it by running `flutter pub get` or through code editor.

analysis_options.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ linter:
2222
type_annotate_public_apis: false
2323
# activate this one later on
2424
constant_identifier_names: false
25+
sort_pub_dependencies: false

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ packages:
9797
path: ".."
9898
relative: true
9999
source: path
100-
version: "2.4.0"
100+
version: "2.5.0"
101101
sky_engine:
102102
dependency: transitive
103103
description: flutter

lib/widgets.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import 'dart:async';
22
import 'dart:math';
3-
import 'dart:typed_data';
43
import 'dart:ui' as ui;
54

65
import 'package:flutter/material.dart';
@@ -208,12 +207,14 @@ class ScratcherState extends State<Scratcher> {
208207
// Load the image using the obtained key.
209208
imageProvider.loadImage(
210209
imageKey,
211-
(ui.ImmutableBuffer buffer, {ui.TargetImageSizeCallback? getTargetSize}) {
210+
(ui.ImmutableBuffer buffer, {ui.TargetImageSizeCallback? getTargetSize}) {
212211
return ui.instantiateImageCodecFromBuffer(buffer);
213212
},
214-
).addListener(ImageStreamListener((ImageInfo image, _) {
215-
imageCompleter.complete(image.image);
216-
}));
213+
).addListener(
214+
ImageStreamListener((ImageInfo image, _) {
215+
imageCompleter.complete(image.image);
216+
}),
217+
);
217218

218219
// Return the future from the completer.
219220
return imageCompleter.future;

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: scratcher
22
description: Scratch card widget which temporarily hides content from the user.
33
homepage: https://github.com/vintage/scratcher
44

5-
version: 2.4.0
5+
version: 2.5.0
66

77
environment:
88
sdk: ">=3.2.0 <4.0.0"

0 commit comments

Comments
 (0)