From ff884c8d8530e144cb198f13c5559771460b3643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20G=C3=BCnther?= <29251617+guenth39@users.noreply.github.com> Date: Thu, 30 Sep 2021 12:09:23 +0200 Subject: [PATCH] Fix late _timer was not initialized but called If _timer was not initialized in initState an error was thrown in dispose method cause late _timer was not initialized --- CHANGELOG.md | 4 ++++ lib/src/scroll_gallery.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38f7696..3e18bf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [1.0.1] + +* Fix late _timer was not initialized but called + ## [1.0.0] * Migraate to Nullsafety diff --git a/lib/src/scroll_gallery.dart b/lib/src/scroll_gallery.dart index a89b1d3..33e9217 100644 --- a/lib/src/scroll_gallery.dart +++ b/lib/src/scroll_gallery.dart @@ -37,7 +37,7 @@ class _ScrollGalleryState extends State with SingleTickerProviderStateMixin { late final ScrollController _scrollController; late final PageController _pageController; - late final Timer? _timer; + Timer? _timer; int _currentIndex = 0; bool _reverse = false; bool _lock = false; diff --git a/pubspec.yaml b/pubspec.yaml index 064342e..7f32561 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ authors: - Anh Nguyen homepage: http://github.com/foodtiny/flutter_scroll_gallery description: A Flutter package that help you to create Image carousels with scroll thumbnail in bottom -version: 1.0.0 +version: 1.0.1 environment: sdk: '>=2.12.0 <3.0.0'