Skip to content

Commit 5b898d0

Browse files
committed
🔧 Update Pack 2 #25
1 parent f9a4281 commit 5b898d0

24 files changed

+251
-170
lines changed

CHANGELOG.md

+108-58
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,108 @@
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-
17-
## 0.2.3
18-
19-
- Fix dart analysis issues.
20-
21-
## 0.2.2
22-
23-
- Clamp `OpacityEffect`, `ClipEffect`, and `ColorFilterEffect` values to 0.0 - 1.0 to prevent exceptions with
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.
27-
- Improve documentation of `AnimatedEffect`.
28-
29-
## 0.2.1
30-
31-
- Fix exceptions being thrown when animation controller state is changed before completion.
32-
33-
## 0.2.0
34-
35-
- [BREAKING] Renamed `toggle` to `trigger` in .animate() to better reflect its purpose.
36-
- [BREAKING] Renamed `AnimatedEffect` to `EffectWidget` to better reflect its purpose.
37-
- [BREAKING] Renamed `EffectAnimationValue` to `EffectQuery` to better reflect its purpose.
38-
- [BREAKING] Replace `value` in `EffectQuery` with `linearValue` and `curvedValue` to allow more refined control over
39-
animations.
40-
- [BREAKING] Renamed `PostFrameWidget` to `PostFrame`.
41-
- Add new Rolling Text effect.
42-
- Add new shake effect.
43-
- Add new align effect.
44-
- Update all effect extension functions to add more functionality of the `from` state.
45-
- Add new extension functions that have default from states like slideIn/Out() and fadeIn/Out().
46-
- Add new `oneShot`, `animateAfter`, `resetAll` functions to allow for more control over animations.
47-
- Add new `repeat` parameter to animation functions to allow for repeating animations.
48-
- Add new `delay` parameter to animation functions to allow for delaying animations.
49-
- Add new `playIf` parameter to animation functions to allow for conditional animations.
50-
51-
## 0.1.1
52-
53-
- Minor doc updates.
54-
- Add example GIFs in readme.
55-
56-
## 0.1.0
57-
58-
- Initial Release.
1+
# Changelog
2+
3+
All notable changes to the Hyper Effects package are documented in this file.
4+
5+
## [0.3.0] - Dec 15, 2024
6+
7+
### Added
8+
- **New Effects**
9+
- Padding effect for dynamic padding adjustments.
10+
- Global roll effect for universal rolling animations.
11+
- Width & height factor support in align effect.
12+
- **Scroll Transition Enhancements**
13+
- Additional event variables for finer control.
14+
- Improved transition state management.
15+
- **Pointer Transition Features**
16+
- `usePointerRouter` option for flexible pointer event handling.
17+
- Enhanced pointer position tracking.
18+
- **New AnimatedEffect Properties**
19+
- `resetValues` - Controls value reset behavior.
20+
- `interruptable` - Manages animation interruption.
21+
- `skipIf` - Conditional animation execution.
22+
- `startState` - Initial animation state control.
23+
- `transformHits` property for translate effect.
24+
- `rotateIn` and `rotateOut` methods for rotate effect.
25+
- **Added New Examples**
26+
- group_animation.dart
27+
- rolling_app_bar_animation.dart
28+
- rolling_pictures_animation.dart
29+
- scroll_phase_slide.dart
30+
- scroll_phase_blur.dart
31+
- success_card_animation.dart
32+
33+
### Changed
34+
- **Breaking Changes**
35+
- Effect apply function's child parameter is now nullable.
36+
- Text rolling API redesigned for consistency with other effects.
37+
- New unified interface matching other animation effects.
38+
- Previous text rolling methods have been deprecated.
39+
- `startImmediately` replaced with more flexible `startState`.
40+
- Removed unnecessary PostFrame callbacks from pointer transition logic.
41+
- **Improvements**
42+
- Default blur effect state now starts un-blurred.
43+
- Added `characterTapeBuilders` to `SymbolTapeStrategy` for customization.
44+
- Fixed issues with scroll transitions to provide smoother and more consistent user experience.
45+
46+
## [0.2.3] - Feb 2, 2024
47+
48+
### Fixed
49+
- Resolved Dart analysis issues for better code quality
50+
51+
## [0.2.2] - Feb 2, 2024
52+
53+
### Added
54+
- New `startImmediately` boolean in .animate()
55+
- Improved documentation for `AnimatedEffect`
56+
57+
### Fixed
58+
- Value clamping for:
59+
- `OpacityEffect` (0.0 - 1.0)
60+
- `ClipEffect` (0.0 - 1.0)
61+
- `ColorFilterEffect` (0.0 - 1.0)
62+
- Prevents exceptions with out-of-range curves
63+
64+
## [0.2.1] - Dec 28, 2023
65+
66+
### Fixed
67+
- Animation controller state change exception handling
68+
69+
## [0.2.0] - Dec 24, 2023
70+
71+
### Added
72+
- **New Effects**
73+
- Rolling Text effect for text animations
74+
- Shake effect for vibration animations
75+
- Align effect for alignment control
76+
- **Animation Control**
77+
- `oneShot` function for immediate animations
78+
- `animateAfter` for sequential animations
79+
- `resetAll` for animation state reset
80+
- Repeat parameter for cyclic animations
81+
- Delay parameter for timed starts
82+
- `playIf` for conditional execution
83+
84+
### Changed
85+
- **Breaking Changes**
86+
- Renamed:
87+
- `toggle``trigger` in .animate()
88+
- `AnimatedEffect``EffectWidget`
89+
- `EffectAnimationValue``EffectQuery`
90+
- `PostFrameWidget``PostFrame`
91+
- Enhanced `EffectQuery` with `linearValue` and `curvedValue`
92+
- **Improvements**
93+
- Updated effect extensions with `from` state support
94+
- Added convenience methods (slideIn/Out, fadeIn/Out)
95+
96+
## [0.1.1] - Oct 26, 2023
97+
98+
### Changed
99+
- Documentation improvements
100+
- Added example GIFs in README
101+
102+
## [0.1.0] - Oct 25, 2023
103+
104+
### Added
105+
- Initial release of Hyper Effects
106+
- Core animation and effect system
107+
- Basic effect implementations
108+
- Documentation and examples

README.md

+28-1
Original file line numberDiff line numberDiff line change
@@ -299,14 +299,16 @@ This is what the Widget tree looks like internally when you use this library.
299299
* delay: A delay before the animation starts.
300300
* playIf: A callback that returns whether the animation should be played or skipped. If the callback returns false, the
301301
animation will be skipped, even when it is explicitly triggered.
302-
* resetValues: Normally, an effect represents the current state of the widget and this
302+
* resetValues: Normally, an effect represents the current state of the widget and this
303303
animate effect is only in charge of lerping between states of those effect values.
304304
If this is set to true, instead of treating effects as current states to animate between, it will always animate from
305305
an initial default state towards the current state.
306306
* interruptable: Whether the animation should be reset on subsequent triggers. If this animation is re-triggered, it
307307
will reset the current active animation and re-drive from the beginning.
308308
Setting this to true will force the animation to wait for the last animation in the chain to finish before starting.
309309
* startState: Determines the behavior of the animation as soon as it is added to the widget tree.
310+
* skipIf: A callback that determines whether the animation should be skipped. If the callback returns true, the animation
311+
will be skipped entirely.
310312

311313
### One Shot Animations
312314

@@ -466,6 +468,23 @@ Widget build(BuildContext context) {
466468
In this example, the text will roll from 'Hello' to 'World'. Each character in 'Hello' will roll until it changes to the
467469
corresponding character in 'World'.
468470

471+
For non-text widgets, you can use the roll effect similarly:
472+
473+
```dart
474+
@override
475+
Widget build(BuildContext context) {
476+
return Container(
477+
width: 100,
478+
height: 100,
479+
color: Colors.blue,
480+
).roll(
481+
from: const Offset(0, 0),
482+
to: const Offset(0, 100),
483+
axis: Axis.vertical,
484+
);
485+
}
486+
```
487+
469488
#### Customization
470489

471490
The Rolling Text feature provides several options for customization:
@@ -487,6 +506,14 @@ The Rolling Text feature provides several options for customization:
487506
provided to the `animate` function.
488507
- widthCurve: Determines the curve of the width animation of each tape. If null, the same curve is used as the one
489508
provided to the `animate` function.
509+
- characterTapeBuilders: Custom builders for individual character tapes, allowing for fine-grained control over how each
510+
character is displayed and animated.
511+
512+
For the general roll effect, additional options include:
513+
- axis: The axis along which the rolling animation occurs (horizontal or vertical).
514+
- from: The starting offset or state.
515+
- to: The ending offset or state.
516+
- transformHits: Whether hit testing should be transformed with the roll animation.
490517

491518
Here's an example of how to use these options:
492519

example/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
1113
migrate_working_dir/
1214

1315
# IntelliJ related

example/.metadata

+5-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: "ead455963c12b453cdb2358cad34969c76daf180"
7+
revision: "8495dee1fd4aacbe9de707e7581203232f591b2f"
88
channel: "stable"
99

1010
project_type: app
@@ -13,14 +13,11 @@ project_type: app
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: ead455963c12b453cdb2358cad34969c76daf180
17-
base_revision: ead455963c12b453cdb2358cad34969c76daf180
16+
create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
17+
base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
1818
- platform: macos
19-
create_revision: ead455963c12b453cdb2358cad34969c76daf180
20-
base_revision: ead455963c12b453cdb2358cad34969c76daf180
21-
- platform: web
22-
create_revision: ead455963c12b453cdb2358cad34969c76daf180
23-
base_revision: ead455963c12b453cdb2358cad34969c76daf180
19+
create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
20+
base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
2421

2522
# User provided section
2623

example/lib/main.dart

+2-5
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import 'package:hyper_effects_demo/stories/group_animation.dart';
1111
import 'package:hyper_effects_demo/stories/one_shot_reset_animation.dart';
1212
import 'package:hyper_effects_demo/stories/rolling_app_bar_animation.dart';
1313
import 'package:hyper_effects_demo/stories/rolling_pictures_animation.dart';
14-
import 'package:hyper_effects_demo/stories/scroll_phase_slide.dart';
1514
import 'package:hyper_effects_demo/stories/scroll_phase_blur.dart';
15+
import 'package:hyper_effects_demo/stories/scroll_phase_slide.dart';
1616
import 'package:hyper_effects_demo/stories/scroll_wheel_transition.dart';
1717
import 'package:hyper_effects_demo/stories/shake_and_spring_animation.dart';
1818
import 'package:hyper_effects_demo/stories/success_card_animation.dart';
@@ -84,10 +84,7 @@ class Storyboard extends StatefulWidget {
8484

8585
class _StoryboardState extends State<Storyboard> with WidgetsBindingObserver {
8686
final List<Story> animationStories = [
87-
const Story(
88-
title: 'Success Card Animation',
89-
child: SuccessCardAnimation()
90-
),
87+
const Story(title: 'Success Card Animation', child: SuccessCardAnimation()),
9188
const Story(
9289
title: 'Group Animation',
9390
child: GroupAnimation(),

0 commit comments

Comments
 (0)