-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Animated fractionally sized box #106795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Animated fractionally sized box #106795
Conversation
|
Looking at the tests of the other Implicitly Animated Widgets only those that use FooTransition have tests to check the transition. Widgets that do it internally like AnimatedAlign does not have tests where the transition is tested and as such this also doesn't have a test where the transition is tested |
| /// | ||
| /// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these extra lines.
| /// | ||
| /// For the animation, you can choose a [curve] as well as a [duration] and the | ||
| /// widget will automatically animate to the new target [widthFactor] or | ||
| /// [heightFactor]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a "See also:" section here, linking to some other related animated widgets (e.g. AnimatedAlign, AnimatedContainer).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added it
There's also a video in some of the other related widgets, like
/// Here's an illustration of what this can look like, using a [curve] of
/// [Curves.fastOutSlowIn].
/// {@animation 250 266 https://flutter.github.io/assets-for-api-docs/assets/widgets/animated_align.mp4}I wasn't sure how to add those though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are added in the flutter/assets-for-api-docs repo, like the one I linked to for AnimatedContainer.
| /// than animates implicitly. | ||
| /// | ||
| /// | ||
| /// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not required, but it would be really nice if there were a matching example, like all of the other Animated... widgets have. See animated_container.0.dart for an example.
If you had one, it would be linked here in the docs like so:
/// {@tool dartpad}
/// The following example transitions an [AnimatedFractionallySizedBox]
/// between two states. It adjusts the [heightFactor], [widthFactor], and
/// [alignment] properties when tapped.
///
/// ** See code in examples/api/lib/widgets/implicit_animations/animated_fractionally_sized_box.0.dart **
/// {@end-tool}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upon adding this example, I got the following error from one of the tests.
The following file does not have the right license header for dart files:
/b/s/w/ir/x/w/flutter sdk/examples/api/lib/widgets/implicit_animations/animated_fractionally_sized_box.0.dart
The expected license header is:
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
...followed by a blank line.
I added it in so that it passes the test, but since im not a Flutter Author , I'm not sure how this makes sense. Or is that something that the CLA addresses?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are a Flutter Author if you contribute code to Flutter. If you're wondering about copyright in the CLA, please take a look at the CLA under "Grant of Copyright License".
In any case, all source code needs to have this copyright header.
gspencergoog
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Piinks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
|
|
@keyonghan this is another case of the bot erring, the other checks are not completed, but it assessed for merging. Further it considered the tree status incorrectly. |

This PR adds a new Implicitly Animated Widget:
AnimatedFractionallySizedBoxList which issues are fixed by this PR. You must list at least one issue.
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.