Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
33997bb7
Commit
33997bb7
authored
Apr 08, 2017
by
xster
Committed by
GitHub
Apr 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some more details to implicit animation's dartdoc (#9292)
parent
2a5810e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
implicit_animations.dart
packages/flutter/lib/src/widgets/implicit_animations.dart
+16
-5
No files found.
packages/flutter/lib/src/widgets/implicit_animations.dart
View file @
33997bb7
...
...
@@ -79,6 +79,11 @@ class TextStyleTween extends Tween<TextStyle> {
/// An abstract widget for building widgets that gradually change their
/// values over a period of time.
///
/// Subclasses' States must provide a way to visit the subclass's relevant
/// fields to animate. [ImplicitlyAnimatedWidget] will then automatically
/// interpolate and animate those fields using the provided duration and
/// curve when those fields change.
abstract
class
ImplicitlyAnimatedWidget
extends
StatefulWidget
{
/// Initializes fields for subclasses.
///
...
...
@@ -118,6 +123,10 @@ typedef Tween<T> TweenConstructor<T>(T targetValue);
typedef
Tween
<
T
>
TweenVisitor
<
T
>(
Tween
<
T
>
tween
,
T
targetValue
,
TweenConstructor
<
T
>
constructor
);
/// A base class for widgets with implicit animations.
///
/// Subclasses must implement the [forEachTween] method to help
/// [AnimatedWidgetBaseState] iterate through the subclasses' widget's fields
/// and animate them.
abstract
class
AnimatedWidgetBaseState
<
T
extends
ImplicitlyAnimatedWidget
>
extends
State
<
T
>
with
SingleTickerProviderStateMixin
{
AnimationController
_controller
;
...
...
@@ -217,12 +226,14 @@ abstract class AnimatedWidgetBaseState<T extends ImplicitlyAnimatedWidget> exten
/// A container that gradually changes its values over a period of time.
///
/// The [AnimatedContainer] will automatically animate between the old and
/// new values of properties when they change using the provided curve and
/// duration. Properties that are null are not animated.
///
/// This class is useful for generating simple implicit transitions between
/// different parameters to [Container]. For more complex animations, you'll
/// likely want to use a subclass of [Transition] or use an
/// [AnimationController] yourself.
///
/// Properties that are null are not animated.
/// different parameters to [Container] with its internal
/// [AnimationController]. For more complex animations, you'll likely want to
/// use a subclass of [Transition] or use your own [AnimationController].
class
AnimatedContainer
extends
ImplicitlyAnimatedWidget
{
/// Creates a container that animates its parameters implicitly.
///
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment