Skip to content

Commit eaa4e05

Browse files
authored
Merge pull request #144 from akhil-ge0rge/update-readme
docs: replace deprecated WillPopScope with PopScope in README
2 parents dd3a6bc + 5e8abef commit eaa4e05

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@ SuperTooltip(
187187
),
188188
```
189189

190-
To hide the tooltip when the user tap the back button. Wrap your `GestureDetector` widget with `WillPopScope` widget passing a callback function to `onWillPop` like the example below
190+
To hide the tooltip when the user tap the back button. Wrap your `GestureDetector` widget with `PopScope` widget passing a callback function to `onPopInvokedWithResult` like the example below
191191

192192
```dart
193-
return WillPopScope(
194-
onWillPop: _willPopCallback,
193+
return PopScope(
194+
onPopInvokedWithResult: (didPop, result) => _willPopCallback,
195195
child: GestureDetector(
196196
onTap: () async {
197197
await _controller.showTooltip();

0 commit comments

Comments
 (0)