These define a TextTheme and IconTheme that contrast with the accent
colour brightness. Also adjust default accentColorBrightness to match
Material spec examples (dark text/icons on teal in Dark theme).
Update material components to use accentTextTheme, accentIconTheme:
* DatePicker selection
* Floating action button icon
* TimePicker selection
* Slider label text
When I changed how routes complete their futures, I broke the Dropdown
button because it was still waiting for its own Completer to complete
instead of using the Future returned by push. This patch fixes that
issue.
I've also removed the previous behavior of the DropdownButton forwarding
its text style to its route. The mechansim that we were using doesn't
work properly in all cases. For example, if the DropdownButton is a
child of a LayoutBuilder, then the route will have already built by the
time the DropdownButton gets a chance to forward its text style, causing
an assert in setState.
Finally, I've tweaked PopupMenuButton to work the same way as
DropdownButton in a couple corner cases (e.g., not calling the changed
callback if the button was removed from the tree before the menu
completed its Future).
Fixes#6352
We were trying to cram too much functionality in to the Dialog widget. Now we
have AlertDialog and SimpleDialog to cover to two different kinds of dialogs in
the spec.
Rather than scrolling the entire contents of the dialog, we should instead
scroll only the part between the title and the button bar.
Also, polish up the padding in the simple dialog demo.
Fixes#6057
The spec forbids persistent bottom sheets from overlapping the app bar. There
are also some fancy scroll-linked effects that we're supposed to do with
persistent bottom sheets, but those will need to wait for another patch.
Fixes#5143
Previously, we were getting double padding: both inside and outside the button.
This patch moves all the padding inside the button so that the whole region is
hittable and the text is positioned correctly.
Fixes#6059
Changed MergableMaterial to animated between states that have dividers
and those that don't in order not to have dividers that appear
unanimatedly. Fixes#5847.
Previously, pumpWidget() would do a partial pump (it didn't trigger
Ticker callbacks or post-frame callbacks), and pump() would do a full
pump. This patch brings them closer together. It also makes runApp run a
full actual frame, rather than skipping the transient callback part of
the frame logic. Having "half-frames" in the system was confusing and
could lead to bugs where code expecting to run before the next layout
pass didn't because a "half-frame" ran first.
Also, make Tickers start ticking in the frame that they were started in,
if they were started during a frame. This means we no longer spin a
frame for t=0, we jump straight to the first actual frame.
Other changes in this patch:
* rename WidgetsBinding._runApp to WidgetsBinding.attachRootWidget, so
that tests can use it to more accurately mock out runApp.
* allow loadStructuredData to return synchronously.
* make handleBeginFrame handle not being given a time stamp.
* make DataPipeImageProvider.loadAsync protected (rather than private),
and document it. There wasn't really a reason for it to be private.
* fix ImageConfiguration.toString.
* introduce debugPrintBuildScope and debugPrintScheduleBuildForStacks,
which can help debug problems with widgets getting marked as dirty but
not cleaned.
* make debugPrintRebuildDirtyWidgets say "Building" the first time and
"Rebuilding" the second, to make it clearer when a widget is first
created. This makes debugging widget lifecycle issues much easier.
* make debugDumpApp more resilient.
* debugPrintStack now takes a label that is printed before the stack.
* improve the banner shown for debugPrintBeginFrameBanner.
* various and sundry documentation fixes
Added ExpansionPanel and ExpansionPanelList. The implementation
is based on the Material design spec, without enforcing every
facet of it, leaving the developer using this the liberty to
enforced it lower down the widget tree. This decision was made
based on the argument that implementing more of the spec would
reduce flexibility to a point where some design would not be
implementable with this widget anymore.
Changed the ExpandIcon constructor to take a default expansion state.
If the widget gets rebuilt with a different expansion value, the
animation will trigger but the callback will not.
Using IconButton inside of a bigger Material before would result
in having a hit box as large as the whole Material. This commit
constrains the size of the hit box and splashes to the default
diameter of a splash.
Instead of a PNG, the Flutter gallery widget is now drawn in code.
There's now a FlutterLogoDecoration class that paints the flutter logo
anywhere you can use a Decoration (e.g. AnimatedContainer).
There's now a FlutterLogo class that honors the IconTheme.
The About dialog box API now takes a Widget for the applicationIcon,
instead of an ImageProvider. It uses IconTheme to make the icon the
right size instead of using an Image widget.
Add padding, duration, and curve properties to the DrawerHeader.
Make the child of a DrawerHeader optional.
Clean up UserAccuntsDrawerHeader a bit.
Add some useful properties and methods to EdgeInsets.
Add some debug logic to RenderDecoratedBox to catch unpaired
save/restore calls when possible.
Make GestureDetector fill its parent if it has no children. Fixes
https://github.com/flutter/flutter/issues/5380
* Added return value to a onNotification callback.
The LayoutChangedNotification callback was missing a return value.
This commit changes it to return true and stop notification from
bubbling up the tree.
* Changed _RenderInkFeatures to use fresh clip box.
Since it wasn't using the most current value of the RenderBox's
size, _RenderInkFeatures was rendering splashes incorrectly when
the underlying Material size was animating. This commit changes
the clip reference to use the size of the Renderbox instead of
the size method in order to get the newest value.
Previously we would rebuild every route on the second animation frame to
rejigger the offstage bit and the animations. Now we build the page once and
update the offstage bit in place and update the animations using
ProxyAnimations.
Fundamentally the core problem was that we were not saying how wide a
date picker should be. It should be 330 pixels, if I'm measuring the
spec's mocks correctly.