Skip to content

Commit

Permalink
v2.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAnkurPanchani committed Mar 13, 2022
1 parent 3937a34 commit 63ce18a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Security

## [2.0.3] - 2022-03-13

### Added

- [PR#29](https://github.com/TheAnkurPanchani/card_swiper/pull/29): Add allowImplicitScrolling property

### Fixed

- [PR#28](https://github.com/TheAnkurPanchani/card_swiper/pull/28): make page indicators respect the initial page index

## [2.0.2] - 2022-03-13

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.0.2"
version: "2.0.3"
characters:
dependency: transitive
description:
Expand Down
8 changes: 3 additions & 5 deletions lib/src/flutter_page_indicator/flutter_page_indicator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
library flutter_page_indicator;

import 'package:flutter/material.dart';

import '../transformer_page_view/transformer_page_view.dart';

class WarmPainter extends BasePainter {
Expand Down Expand Up @@ -266,20 +267,17 @@ class _PageIndicatorState extends State<PageIndicator> {
page = index.toDouble();
}

void _onController([bool doSetState = true]) {
void _onController() {
if (!widget.controller.hasClients) return;
page = widget.controller.page ?? 0.0;
index = page.floor();
if (doSetState) {
setState(() {});
}
setState(() {});
}

@override
void initState() {
super.initState();
widget.controller.addListener(_onController);

_setInitialPage();
}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: card_swiper
description: swiper/carousel for flutter, with multiple layouts, infinite loop. Compatible with Android & iOS.
version: 2.0.2
version: 2.0.3
homepage: https://github.com/TheAnkurPanchani/flutter_swiper

dependencies:
Expand Down

0 comments on commit 63ce18a

Please sign in to comment.