Skip to content

Commit

Permalink
Doc improvements
Browse files Browse the repository at this point in the history
Animate / AnimateList extensions
  • Loading branch information
gskinner committed Jan 26, 2024
1 parent a118326 commit bbdf89a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/src/animate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,11 @@ class _AnimateState extends State<Animate> with SingleTickerProviderStateMixin {
}
}

/// Adds [Animate] related extensions to [Widget].
extension AnimateWidgetExtensions on Widget {
/// Wraps the target Widget in an Animate instance. Ex. `myWidget.animate()` is equivalent
/// to `Animate(child: myWidget)`.
/// Wraps the target [Widget] in an [Animate] instance, and returns
/// the instance for chaining calls.
/// Ex. `myWidget.animate()` is equivalent to `Animate(child: myWidget)`.
Animate animate({
Key? key,
List<Effect>? effects,
Expand Down
6 changes: 4 additions & 2 deletions lib/src/animate_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ class AnimateList<T extends Widget> extends ListBase<Widget>
}
}

/// Wraps the target `List<Widget>` in a [AnimateList] instance.
/// Ex. `[foo, bar].animate()` is equivalent to `AnimateList(children: [foo, bar])`.
/// Adds [AnimateList] related extensions to `List<Widget>`.
extension AnimateListExtensions on List<Widget> {
/// Wraps the target `List<Widget>` in an [AnimateList] instance, and returns
/// the instance for chaining calls.
/// Ex. `[foo, bar].animate()` is equivalent to `AnimateList(children: [foo, bar])`.
AnimateList animate({
List<Effect>? effects,
AnimateCallback? onInit,
Expand Down

0 comments on commit bbdf89a

Please sign in to comment.