Skip to content

Conversation

@Hari-07
Copy link
Contributor

@Hari-07 Hari-07 commented Jun 29, 2022

This PR adds a new Implicitly Animated Widget: AnimatedFractionallySizedBox

List 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

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added a: animation Animation APIs framework flutter/packages/flutter repository. See also f: labels. labels Jun 29, 2022
@Hari-07
Copy link
Contributor Author

Hari-07 commented Jun 29, 2022

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

Comment on lines 2124 to 2125
///
///
Copy link
Contributor

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].
Copy link
Contributor

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).

Copy link
Contributor Author

@Hari-07 Hari-07 Jun 30, 2022

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

Copy link
Contributor

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.
///
///
///
Copy link
Contributor

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}

Copy link
Contributor Author

@Hari-07 Hari-07 Jun 30, 2022

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?

Copy link
Contributor

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.

@Hari-07 Hari-07 requested a review from gspencergoog June 30, 2022 08:51
Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@gspencergoog gspencergoog requested a review from Piinks June 30, 2022 23:47
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 30, 2022
@auto-submit
Copy link
Contributor

auto-submit bot commented Jun 30, 2022

  • The status or check suite tree status luci-flutter has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 30, 2022
@Piinks Piinks added the c: new feature Nothing broken; request for a new capability label Jun 30, 2022
@Piinks
Copy link
Contributor

Piinks commented Jun 30, 2022

@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.

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 1, 2022
camsim99 pushed a commit to camsim99/flutter that referenced this pull request Aug 10, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: animation Animation APIs autosubmit Merge PR when tree becomes green via auto submit App c: new feature Nothing broken; request for a new capability framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants