Skip to content

Commit

Permalink
🔧 Update Pack V1 #20
Browse files Browse the repository at this point in the history
  • Loading branch information
SaadArdati committed Dec 24, 2023
1 parent 055fbfa commit 612ddb1
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 24 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 0.2.0
- [BREAKING] Renamed `toggle` to `trigger` in .animate() to better reflect its purpose.
- [BREAKING] Renamed `AnimatedEffect` to `EffectWidget` to better reflect its purpose.
- [BREAKING] Renamed `EffectAnimationValue` to `EffectQuery` to better reflect its purpose.
- [BREAKING] Replace `value` in `EffectQuery` with `linearValue` and `curvedValue` to allow more refined control over animations.
- [BREAKING] Renamed `PostFrameWidget` to `PostFrame`.
- Add new Rolling Text effect.
- Add new shake effect.
- Add new align effect.
- Update all effect extension functions to add more functionality of the `from` state.
- Add new extension functions that have default from states like slideIn/Out() and fadeIn/Out().
- Add new `oneShot`, `animateAfter`, `resetAll` functions to allow for more control over animations.
- Add new `repeat` parameter to animation functions to allow for repeating animations.
- Add new `delay` parameter to animation functions to allow for delaying animations.
- Add new `playIf` parameter to animation functions to allow for conditional animations.

## 0.1.1

- Minor doc updates.
Expand Down
1 change: 1 addition & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ linter:
use_super_parameters: true
prefer_const_constructors: true
public_member_api_docs: true
prefer_relative_imports: true
30 changes: 15 additions & 15 deletions lib/src/animated_effect.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/widgets.dart';
import 'package:hyper_effects/hyper_effects.dart';
import '../hyper_effects.dart';

/// A callback that returns whether an animation should be allowed
/// to follow through with its animation or be skipped completely,
Expand Down Expand Up @@ -64,13 +64,13 @@ extension AnimatedEffectExt on Widget {

/// Animate the effects applied to this widget after the last animation
/// in the chain ends.
Widget animateAfter({
Duration duration = const Duration(milliseconds: 350),
Curve curve = appleEaseInOut,
int repeat = 0,
bool reverse = false,
Duration delay = Duration.zero,
VoidCallback? onEnd,
Widget animateAfter(
{Duration duration = const Duration(milliseconds: 350),
Curve curve = appleEaseInOut,
int repeat = 0,
bool reverse = false,
Duration delay = Duration.zero,
VoidCallback? onEnd,
BooleanCallback? playIf}) {
return AnimatedEffect(
triggerType: AnimationTriggerType.afterLast,
Expand Down Expand Up @@ -100,13 +100,13 @@ extension AnimatedEffectExt on Widget {
///
/// The [repeat] parameter is used to determine how the animation should be
/// repeated.
AnimatedEffect oneShot({
Duration duration = const Duration(milliseconds: 350),
Curve curve = appleEaseInOut,
int repeat = 0,
bool reverse = false,
Duration delay = Duration.zero,
VoidCallback? onEnd,
AnimatedEffect oneShot(
{Duration duration = const Duration(milliseconds: 350),
Curve curve = appleEaseInOut,
int repeat = 0,
bool reverse = false,
Duration delay = Duration.zero,
VoidCallback? onEnd,
BooleanCallback? playIf}) {
return AnimatedEffect(
triggerType: AnimationTriggerType.oneShot,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/effect_animation_value.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/widgets.dart';
import 'package:hyper_effects/src/pointer_transition.dart';
import 'pointer_transition.dart';

/// An inherited widget that provides the animation value to it's descendants.
///
Expand Down
2 changes: 1 addition & 1 deletion lib/src/effects/clip_effect.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/widgets.dart';
import 'package:hyper_effects/hyper_effects.dart';
import '../../hyper_effects.dart';

/// Provides a extension method to apply an [ClipEffect] to a [Widget].
extension ClipEffectExtension on Widget {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/effects/color_filter_effect.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:ui';

import 'package:flutter/material.dart';
import 'package:hyper_effects/hyper_effects.dart';
import '../../hyper_effects.dart';

/// Provides a extension method to apply an [ColorFilterEffect] to a [Widget].
extension ColorFilterEffectExtension on Widget {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/effects/opacity_effect.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:ui';

import 'package:flutter/widgets.dart';
import 'package:hyper_effects/hyper_effects.dart';
import '../../hyper_effects.dart';

/// Provides a extension method to apply an [OpacityEffect] to a [Widget].
extension OpacityEffectExtension on Widget {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/effects/shake_effect.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'dart:math';
import 'dart:ui';

import 'package:flutter/material.dart';
import 'package:hyper_effects/hyper_effects.dart';
import '../../hyper_effects.dart';

/// Provides a extension method to apply a [ShakeEffect] to a [Widget].
extension ShakeEffectExt on Widget {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/effects/text/rolling_text_effect.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'dart:math';
import 'dart:ui' as ui;

import 'package:flutter/material.dart';
import 'package:hyper_effects/hyper_effects.dart';
import '../../../hyper_effects.dart';

import 'rolling_text_controller.dart';

Expand Down
2 changes: 1 addition & 1 deletion lib/src/effects/text/tape_slide_direction.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:hyper_effects/hyper_effects.dart';
import '../../../hyper_effects.dart';

/// Determines the direction in which each tape of characters will
/// slide in the [RollingTextEffect].
Expand Down
2 changes: 1 addition & 1 deletion lib/src/pointer_transition.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/widgets.dart';
import 'package:hyper_effects/src/post_frame_widget.dart';
import 'post_frame_widget.dart';

import 'apple_curves.dart';
import 'effect_animation_value.dart';
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: hyper_effects
description: Create beautiful effects and animations with just a few lines of code.

version: 0.1.1
version: 0.2.0

homepage: https://hyperdesigned.dev/
repository: https://github.com/hyper-designed/hyper_effects
Expand Down

0 comments on commit 612ddb1

Please sign in to comment.