Repository: flutter
Issue: FloatingActionButtonAnimator getRotationAnimation issue
Labels: framework,a: animation,f: material design,has reproducible steps,P2,found in release: 3.3,found in release: 3.6,team-design,triaged-design

**Issue #25123 already open but @NBTX is unable to reopen it, please make sure to check it out.**

> ## Steps to Reproduce
> 1. Create a MaterialApp and Scaffold
> 2. Try to apply a `floatingActionButtonAnimation`
> 3. The results are ignored.
> 
> ## Logs
> ```shell
> [        ] Connected to _flutterView/0x7336838c18.
> [   +3 ms] 🔥  To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
> [        ] An Observatory debugger and profiler on Pixel 2 is available at: http://127.0.0.1:49684/
> [        ] For a more detailed help message, press "h". To detach, press "d"; to quit, press "q".
> ```
> 
> No analysis errors.
> 
> ```
> [✓] Flutter (Channel beta, v1.0.0, on Mac OS X 10.14 18A391, locale en-GB)
>     • Flutter version 1.0.0 at /Users/NBTX/development/flutter
>     • Framework revision 5391447fae (9 days ago), 2018-11-29 19:41:26 -0800
>     • Engine revision 7375a0f414
>     • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
> 
> [✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
>     • Android SDK at /Users/NBTX/Library/Android/sdk
>     • Android NDK location not configured (optional; useful for native profiling support)
>     • Platform android-28, build-tools 28.0.3
>     • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
>     • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
>     • All Android licenses accepted.
> 
> [✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
>     • Xcode at /Applications/Xcode.app/Contents/Developer
>     • Xcode 10.1, Build version 10B61
>     • ios-deploy 2.0.0
>     • CocoaPods version 1.5.3
> 
> [✓] Android Studio (version 3.2)
>     • Android Studio at /Applications/Android Studio.app/Contents
>     • Flutter plugin version 29.0.2
>     • Dart plugin version 181.5540.11
>     • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
> 
> [✓] IntelliJ IDEA Ultimate Edition (version 2018.2.4)
>     • IntelliJ at /Applications/IntelliJ IDEA.app
>     • Flutter plugin version 29.1.3
>     • Dart plugin version 182.4999
> 
> [✓] Connected device (1 available)
>     • ...
> 
> • No issues found!
> ```

## And here is @cohortor's suggested solution.

> I would kindly like to revisit and reopen this issue. IMHO the problem is in `scaffold.dart` -> `_FloatingActionButtonTransitionState` -> `_updateAnimations()`.
> 
> In particular, `_entranceTurnTween` is always applied, rotating the FAB by `kFloatingActionButtonTurnInterval` (currently 0.125, i.e. 45 degrees). Changing this value to 0.0 stops FAB rotation.
> 
> DISCUSSION:
> 
> The previously suggested "solution":
> 
> ```
>   @override
>   Animation<double> getRotationAnimation({Animation<double> parent}) {
>     return Tween<double>(begin: 0.0, end: 1.0).animate(parent);
>   }
> ```
> 
> 1. should actually result in a rotation animation that rotates the FAB through a full circle,
> 2. in my case (FAB placed horizontally centered) results in a 45deg FAB rotation the first time the FAB is shown, followed by no rotation during subsequent hides/shows.
> 
> The final value of the rotation is determined by the FAB's current and previous locations, the animation controller's state, and also the final `TrainHopping` animation, which right now is responsible for chaining the previously mentioned `_entranceTurnTween`'s hardcoded values.
> 
> PROPOSED SOLUTION:
> 
> Fix/remove the application of `_entranceTurnTween` on the FAB.