From 99576bd3b93448ab2f70355266ed1db693c92156 Mon Sep 17 00:00:00 2001 From: Daniel Carneiro Date: Wed, 29 Jun 2022 11:28:10 +0100 Subject: [PATCH] fix: WidgetBinding.instance issue --- CHANGELOG.md | 2 ++ lib/another_xlider.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87b5bce..4c5f6e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.1.1 - 29/06/2022 +Bugfix to WidgetsBinding -> https://github.com/loonix/another_xlider/issues/12 flagged by @greyovo ## 1.1.0 - 21/05/2022 (Flutter 3 upgrade) ### What's Changed diff --git a/lib/another_xlider.dart b/lib/another_xlider.dart index 5cf325e..7403219 100644 --- a/lib/another_xlider.dart +++ b/lib/another_xlider.dart @@ -438,7 +438,7 @@ class FlutterSliderState extends State parent: _rightTooltipAnimationController, curve: Curves.fastOutSlowIn)); - WidgetsBinding.instance.addPostFrameCallback((_) { + WidgetsBinding.instance?.addPostFrameCallback((_) { if (!mounted) { return; } diff --git a/pubspec.yaml b/pubspec.yaml index 1646e5c..e906f78 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: another_xlider description: (Another Xlider) A material design slider and range slider, horizontal and vertical, with RTL support and lots of options and customizations for flutter -version: 1.1.0 +version: 1.1.1 homepage: https://github.com/loonix/another_xlider environment: