Skip to content

Commit

Permalink
Update: FilterQuality parameter of Tilt and TiltParallax widgets is n…
Browse files Browse the repository at this point in the history
…ull by default
  • Loading branch information
AmosHuKe committed Aug 17, 2023
1 parent ab9865d commit 0f44277
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

See the [Migration Guide](guides/migration_guide.md) for the details of breaking changes between versions.

## Unreleased

### Improvements

- Update `FilterQuality` parameter of `Tilt` and `TiltParallax` widgets is `null` by default.
- Upgrade Example of Flutter to 3.13.0

## 1.0.2

- Doc
Expand Down
4 changes: 2 additions & 2 deletions README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ Tilt(
| --- | --- | --- | --- |
| child <sup>`required`</sup> | `Widget` | - | 创建视差 widget。 |
| size | `Offset` | `Offset(10.0, 10.0)` | 视差大小(像素单位)。 |
| filterQuality | `FilterQuality` | `FilterQuality.high` | Flutter FilterQuality。 |
| filterQuality | `FilterQuality` | `null` | Flutter FilterQuality。 |


### ChildLayout 📄
Expand Down Expand Up @@ -239,7 +239,7 @@ Tilt(
| leaveDuration | `Duration` | `Duration(milliseconds: 300)` | 手势离开后的动画持续时间。 |
| moveCurve | `Curve` | `Curves.linear` | 手势移动时的动画曲线。 |
| leaveCurve | `Curve` | `Curves.linear` | 手势离开后的动画曲线。 |
| filterQuality | `FilterQuality` | `FilterQuality.high` | Flutter FilterQuality。 |
| filterQuality | `FilterQuality` | `null` | Flutter FilterQuality。 |


### LightConfig 📄
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ Tilt(
| --- | --- | --- | --- |
| child <sup>`required`</sup> | `Widget` | - | Create a widget with parallax. |
| size | `Offset` | `Offset(10.0, 10.0)` | Parallax size (pixel). |
| filterQuality | `FilterQuality` | `FilterQuality.high` | Flutter FilterQuality. |
| filterQuality | `FilterQuality` | `null` | Flutter FilterQuality. |


### ChildLayout 📄
Expand Down Expand Up @@ -239,7 +239,7 @@ Tilt(
| leaveDuration | `Duration` | `Duration(milliseconds: 300)` | Animation duration after gesture leave. |
| moveCurve | `Curve` | `Curves.linear` | Animation curve during gesture move. |
| leaveCurve | `Curve` | `Curves.linear` | Animation curve after gesture leave. |
| filterQuality | `FilterQuality` | `FilterQuality.high` | Flutter FilterQuality. |
| filterQuality | `FilterQuality` | `null` | Flutter FilterQuality. |


### LightConfig 📄
Expand Down
2 changes: 1 addition & 1 deletion lib/src/tilt.dart
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,6 @@ class TiltParallax extends TiltParallaxContainer {
super.key,
required super.child,
super.size = const Offset(10.0, 10.0),
super.filterQuality = FilterQuality.high,
super.filterQuality,
});
}
4 changes: 2 additions & 2 deletions lib/src/tilt_parallax_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ class TiltParallaxContainer extends StatelessWidget {
super.key,
required this.child,
required this.size,
required this.filterQuality,
this.filterQuality,
});

final Widget child;

/// 视差大小 (x, y)
final Offset size;

final FilterQuality filterQuality;
final FilterQuality? filterQuality;

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/type/tilt_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TiltConfig {
this.leaveDuration = const Duration(milliseconds: 300),
this.moveCurve = Curves.linear,
this.leaveCurve = Curves.linear,
this.filterQuality = FilterQuality.high,
this.filterQuality,
});

/// 禁用
Expand Down Expand Up @@ -117,7 +117,7 @@ class TiltConfig {
final Curve leaveCurve;

/// FilterQuality
final FilterQuality filterQuality;
final FilterQuality? filterQuality;
}

/// child 其他布局
Expand Down

0 comments on commit 0f44277

Please sign in to comment.