There were 2 possible scenarios in which _handleAppFrame is added more than once as a frame callback. When this happens it is possible that the second invocation will try to access _nextFrame.image when _nextFrame is null and crash. The 2 scenarios are:
Scenario 1
A GIF frame is decoded and a Flutter frame is executed before it's time to show the next GIF frame.
The timer that's waiting for enough time to elapse is invoked, and schedules a callback for the next Flutter frame(here).
Before the next Flutter frame is executed, MultiFrameImageStreamCompleter#removeListener is called followed by ``MultiFrameImageStreamCompleter#addListenerthat is invoking_decodeNextFrameAndSchedule` which is adding `_handleAppFrame` again as a next frame callback.
Scenario 2
removeListener and addListener are called multiple times in succession, every call to addListener can result in another registration of _handleAppFrame to the next Flutter frame callbacks list.
This patch fixes the issue by guarding against a second registration of _handleAppFrame.
Made the showMenu() position parameter required as it doesn't make sense to show a menu without indicating where it should be shown. Also added a test to verify this.
Remove the additional top padding from CupertinoPageScaffold's MediaQuery when the navigation bar is opaque (as the padding was already consumed by the navigation bar).
Related Issue: #29136
The UserAccountsDrawerHeader had a bug with the arrow rotating whenever setState was called on its parent. This change makes sure that we check that the state actually changed before allowing the animation to trigger.
Fixes#25801
Adds a FloatingActionButtonThemeData so that FABs can be themed at the Theme level and independently. The properties that are now on the theme must be defaulted at the build level, in order to respect any contributing theme properties. Because of this, some tests had to be modified to look at properties after they are built. Also, since default behaviors are now tested in the FAB Theme test, some default tests in the FAB test no longer applied and were removed.
The themable properties are:
-backgroundColor
-foregroundColor
-elevation
-disabledElevation
-highlightElevation
-shape
* some space formattings
* always use blocks in if-else if a block is used
* format spaces in for and while
* allow multiline if conditions
* fix missing space
* No shrinking for BackdropFilter's cull rect
This will be a breaking change. Our old behavior may generate confusions
for a sample app like our added golden test: Skia will shrink the cull
rect (and thus the filtered area) to the text. The new behavior will
fill the BackdropFilter to its parent/ancestor clip. This is more
in align with our clip behaviors (no clip by default).
If this breaks your app, wrap the BackdropFilter with a ClipRect.
[wip] The golden images are not uploaded yet. I'll wait for the initial
round of review to approve the golden test before uploading them.
* Statically define the callback
* Add TODO to remind the hacking code removal
* Nit fix
* Update goldens
Adds the `minLines` and `expands` parameters for controlling text height. The original PR was reverted, so this one contains a few extra fixes for the tests that were broken.