Skip to content

Commit 24055a2

Browse files
committed
🔧 Update Pack 2 #19
1 parent 38f273e commit 24055a2

File tree

2 files changed

+50
-13
lines changed

2 files changed

+50
-13
lines changed

CHANGELOG.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,42 @@
1+
## 0.3.0
2+
3+
- Added Padding effect & a global roll effect.
4+
- BREAKING: Effect apply function's child parameter is now nullable.
5+
- BREAKING: Text rolling API has been changed to be more in-line with other effects.
6+
- BREAKING: `startImmediately` has been replaced with `startState`.
7+
- Fixed default state of blur effect was in a blur state instead of an unblurred state.
8+
- Added more variables to the scroll transition's events.
9+
- Added `usePointerRouter` to pointer transition to determine whether to use the Flutter global pointer router or a
10+
GestureDetector.
11+
- Add `resetValues`, `interruptable`, `skipIf`, and `startState` properties to AnimatedEffect.
12+
- Add `transformHits` property to translate effect.
13+
- Add `rotateIn` and `rotateOut` to the rotate effect.
14+
- Add width & height factor to align effect.
15+
- Add characterTapeBuilders to `SymbolTapeStrategy` class for custom tape builders.
16+
117
## 0.2.3
18+
219
- Fix dart analysis issues.
320

421
## 0.2.2
22+
523
- Clamp `OpacityEffect`, `ClipEffect`, and `ColorFilterEffect` values to 0.0 - 1.0 to prevent exceptions with
6-
curves that go outside of this range.
7-
- Add new `startImmediately` boolean to .animate() to allow for animations to start immediately without waiting for an
8-
initial change in the `trigger` object.
24+
curves that go outside of this range.
25+
- Add new `startImmediately` boolean to .animate() to allow for animations to start immediately without waiting for an
26+
initial change in the `trigger` object.
927
- Improve documentation of `AnimatedEffect`.
1028

1129
## 0.2.1
30+
1231
- Fix exceptions being thrown when animation controller state is changed before completion.
1332

1433
## 0.2.0
34+
1535
- [BREAKING] Renamed `toggle` to `trigger` in .animate() to better reflect its purpose.
1636
- [BREAKING] Renamed `AnimatedEffect` to `EffectWidget` to better reflect its purpose.
1737
- [BREAKING] Renamed `EffectAnimationValue` to `EffectQuery` to better reflect its purpose.
18-
- [BREAKING] Replace `value` in `EffectQuery` with `linearValue` and `curvedValue` to allow more refined control over animations.
38+
- [BREAKING] Replace `value` in `EffectQuery` with `linearValue` and `curvedValue` to allow more refined control over
39+
animations.
1940
- [BREAKING] Renamed `PostFrameWidget` to `PostFrame`.
2041
- Add new Rolling Text effect.
2142
- Add new shake effect.

README.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -602,14 +602,26 @@ In a scroll transition, the `phase` is a `ScrollPhase` enum that determines the
602602
- `ScrollPhase.bottomTrailing` is when the widget is partially viewable from the bottom/right, IE: It's leaving the
603603
bottom or right of the scroll view.
604604

605-
In addition to the ScrollPhase, the `event` also provides `screenOffsetFraction` which is a double value between -1, 0
606-
and 1 that represents the progress the scroll view is moving away from the center of the scroll view.
607-
608-
- If the widget is near the center of the scroll view, the value tends towards 0.
609-
- As the widget moves towards the ceiling of the scroll view, the value tends towards 1. It clamps to 1 when the item is
610-
fully out of the scroll view.
611-
- As the item moves towards the floor of the scroll view, the value tends towards -1. It clamps to -1 when the item is
612-
fully out of the scroll view.
605+
Other properties of the scroll transition:
606+
607+
- phaseOffsetFraction: The current progress an element's phase is going through. If `phase` is identity this value is 1.
608+
If `phase` is topLeading, it goes from 0 towards 1 as it leaves the screen. If `phase` is bottomTrailing, it goes from
609+
0 towards 1 as it enters the screen.
610+
- phaseOffsetFraction: The current progress an element is going through the scrolling viewport. If the item is near
611+
the center of the scroll view, the value tends towards 0. As the item moves towards the ceiling of the scroll view,
612+
the value tends towards 1. It clamps to 1 when the item is fully out of the scroll view. As the item moves towards the
613+
floor of the scroll view, the value tends towards -1. It clamps to -1 when the item is fully out of the scroll view.
614+
final double screenOffsetFraction;
615+
- scrollPixels: The number of pixels scrolled inside of the parent scroll view.
616+
- viewportSize: The height or width of the parent scroll view.
617+
- scrollDelta: The change in scroll position since the last update.
618+
- scrollDirection: The direction the scroll view is being scrolled to.
619+
- pointerPosition: The position of the pointer device in the global coordinate space.
620+
- distanceFromPointer: The distance from the pointer device to the center of this widget.
621+
- visualIndex: The visual index is the index in which the item is displayed in the scroll view. For example, instead of
622+
the regular index of a list, if you scroll down, the first item that is visible inside the scroll view will have some
623+
arbitrary index, but the visual index would be 0 as it is the index that is perceived by the user.
624+
- reverseVisualIndex: The `visualIndex` calculated in the opposite direction.
613625

614626
#### Caution
615627

@@ -707,18 +719,22 @@ When using the pointer transition, you can provide multiple parameters to contro
707719
in the `event` provided to the builder.
708720

709721
```dart
710-
Widget pointerTransition(PointerTransitionBuilder builder, {
722+
Widget pointerTransition(PointerTransitionBuilder builder, {
711723
Alignment origin = Alignment.center,
712724
bool useGlobalPointer = false,
725+
bool usePointerRouter = true,
713726
bool transitionBetweenBounds = true,
714727
bool resetOnExitBounds = true,
715728
Curve curve = appleEaseInOut,
716729
Duration duration = const Duration(milliseconds: 125),
730+
Key? key,
717731
}) {
718732
return PointerTransition(
733+
key: key,
719734
builder: builder,
720735
origin: origin,
721736
useGlobalPointer: useGlobalPointer,
737+
usePointerRouter: usePointerRouter,
722738
transitionBetweenBounds: transitionBetweenBounds,
723739
resetOnExitBounds: resetOnExitBounds,
724740
curve: curve,

0 commit comments

Comments
 (0)