Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dots_indicator to 3.0.0 #216

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.1.15] - TODO

### Update
- Update dependencies to latest version (dots_indicator to 3.0.0)

## [3.1.14] - 2024-03-23

### Fixed
Expand Down
8 changes: 4 additions & 4 deletions lib/src/introduction_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ class IntroductionScreen extends StatefulWidget {

class IntroductionScreenState extends State<IntroductionScreen> {
late PageController _pageController;
double _currentPage = 0.0;
int _currentPage = 0;
bool _isSkipPressed = false;
bool _isScrolling = false;
late bool _showBottom;
Expand All @@ -413,7 +413,7 @@ class IntroductionScreenState extends State<IntroductionScreen> {
final int initialPage = min(widget.initialPage, getPagesLength() - 1);
_pageController = PageController(initialPage: initialPage);
_showBottom = widget.showBottomPart;
_currentPage = initialPage.toDouble();
_currentPage = initialPage;
_autoScroll(widget.autoScrollDuration);
if (widget.hideBottomOnKeyboard) {
final keyboardVisibilityController = KeyboardVisibilityController();
Expand Down Expand Up @@ -539,7 +539,7 @@ class IntroductionScreenState extends State<IntroductionScreen> {
final metrics = notification.metrics;
if (metrics is PageMetrics && metrics.page != null) {
if (mounted) {
setState(() => _currentPage = metrics.page!);
setState(() => _currentPage = metrics.page!.toInt());
}
}
return false;
Expand Down Expand Up @@ -687,7 +687,7 @@ class IntroductionScreenState extends State<IntroductionScreen> {
child: DotsIndicator(
reversed: widget.rtl,
dotsCount: getPagesLength(),
position: _currentPage.toDouble(),
position: _currentPage,
decorator: widget.dotsDecorator,
onTap: widget.isProgressTap &&
!widget.freeze
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
sdk: flutter

collection: ^1.18.0
dots_indicator: ^2.1.2
dots_indicator: ^3.0.0
flutter_keyboard_visibility: ^6.0.0

dev_dependencies:
Expand Down