Skip to content

Flutter 2.0 and Null Safety compatibility #14

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [0.1.0]
* Flutter 2.0 and Null Safety compatibility

## [0.0.3]
* Fix bugs
* Support loop mode for layout: PageIndicatorLayout.COLOR & PageIndicatorLayout.COLOR.
347 changes: 58 additions & 289 deletions example/pubspec.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ dependencies:
path: ../

transformer_page_view:
path: /Users/jzoom/SourceCode/transformer_page_view
path: /Users/pedro/dev/PESSOAL/tmp/transformer_page_view

dev_dependencies:
flutter_test:
1 change: 0 additions & 1 deletion flutter_page_indicator.iml
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart Packages" level="project" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Flutter Plugins" level="project" />
</component>
14 changes: 7 additions & 7 deletions lib/flutter_page_indicator.dart
Original file line number Diff line number Diff line change
@@ -123,12 +123,12 @@ class ScalePainter extends BasePainter {
: radius + ((index + 1) * (size + space));

double progress = page - index;
_paint.color = Color.lerp(widget.activeColor, widget.color, progress);
_paint.color = Color.lerp(widget.activeColor, widget.color, progress)!;
//last
canvas.drawCircle(new Offset(radius + (index * (size + space)), radius),
lerp(radius, radius * widget.scale, progress), _paint);
//first
_paint.color = Color.lerp(widget.color, widget.activeColor, progress);
_paint.color = Color.lerp(widget.color, widget.activeColor, progress)!;
canvas.drawCircle(new Offset(secondOffset, radius),
lerp(radius * widget.scale, radius, progress), _paint);
}
@@ -154,12 +154,12 @@ class ColorPainter extends BasePainter {
? radius
: radius + ((index + 1) * (size + space));

_paint.color = Color.lerp(widget.activeColor, widget.color, progress);
_paint.color = Color.lerp(widget.activeColor, widget.color, progress)!;
//left
canvas.drawCircle(
new Offset(radius + (index * (size + space)), radius), radius, _paint);
//right
_paint.color = Color.lerp(widget.color, widget.activeColor, progress);
_paint.color = Color.lerp(widget.color, widget.activeColor, progress)!;
canvas.drawCircle(new Offset(secondOffset, radius), radius, _paint);
}
}
@@ -330,12 +330,12 @@ class PageIndicator extends StatefulWidget {
final double activeSize;

PageIndicator(
{Key key,
{Key? key,
this.size: 20.0,
this.space: 5.0,
this.count,
required this.count,
this.activeSize: 20.0,
this.controller,
required this.controller,
this.color: Colors.white30,
this.layout: PageIndicatorLayout.SLIDE,
this.activeColor: Colors.white,
333 changes: 51 additions & 282 deletions pubspec.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_page_indicator
description: Page indicator for flutter, with multiple build-in layouts.
version: 0.0.3
version: 0.1.0
author: JZoom <jzoom8112@gmail.com>
homepage: https://github.com/jzoom/flutter_page_indicator

@@ -9,7 +9,7 @@ dependencies:
sdk: flutter

environment:
sdk: ">=2.0.0-dev.48.0 <3.0.0"
sdk: '>=2.12.0 <3.0.0'
flutter: ">=0.1.4 <3.0.0"


7 changes: 0 additions & 7 deletions test/flutter_page_indicator_test.dart

This file was deleted.