94 Commits

Author SHA1 Message Date
Hans Muller
e3d0544954 Report why a snackbar was closed (#6996) 2016-11-23 10:34:53 -08:00
Hans Muller
516ac574c0 Allow null DropdownButton values (#6971) 2016-11-21 16:36:19 -08:00
Ian Hickson
b7c9e47111 This test previously was depending on what font was selected. (#6936) 2016-11-18 16:25:29 -08:00
Hans Muller
5ceaaeefce Add dense layout support to dropdown (#6906) 2016-11-18 10:30:58 -08:00
Jason Simmons
e7c2571b57 Handle empty sizes in AppBar's toolbar layout (#6894) 2016-11-16 12:31:56 -08:00
Chris Bracken
d0ff41ec35 Add accentTextTheme and accentIconTheme to ThemeData (#6808)
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
2016-11-10 15:33:02 -08:00
Ian Hickson
57be959887 Rename test/widget to test/widgets to match the library (#6716) 2016-11-07 10:03:11 -08:00
Ian Hickson
e7d5c7d6b7 Change 'body' to be loosely constrained. (#6692)
People get confused by the tight constraints.
2016-11-03 14:44:11 -07:00
Chris Bracken
abcfc42dfc Support per-platform default typography (#6634)
On Android and Fuchsia, default to Roboto. On iOS, use San Francisco.
2016-11-02 15:58:35 -07:00
Adam Barth
018ab3f65b Default child lists to empty lists (#6592)
Fixes #6591
2016-10-30 20:10:33 -07:00
Adam Barth
30d7326b03 Tap on dropdown button in tests does not work (#6566)
The theme fallback mechanism was busted by the shadowThemeOnly change.

Fixes #6562
2016-10-28 12:26:33 -07:00
Adam Barth
48690d7c2e Add support for persistent footer buttons (#6345)
Fixes #616
2016-10-17 12:50:47 -07:00
Adam Barth
6399a3af41 Fix DropdownButton regression (#6353)
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
2016-10-17 10:00:48 -07:00
Adam Barth
f5b9d388cd Switch to the new semantics backend (#6259)
This match switches the framework to use the semantics backend in `dart:ui`
rather than the Mojo backend.
2016-10-11 10:51:41 -07:00
Jason Simmons
90504b122c Adjust the IconButton constraint to match its size (#6226)
Fixes https://github.com/flutter/flutter/issues/5763
2016-10-06 10:13:53 -07:00
Chris Bracken
57d6cc4299 Use platform-specific back icon in Scaffold (#6182) 2016-10-03 15:34:15 -07:00
Adam Barth
8ec4f22941 Add landscape time picker (#6173)
Fixes #988
2016-10-03 12:00:49 -07:00
Hans Muller
6a1ac731d8 PopupMenuButton menus inherit the button theme (#6132) 2016-09-29 15:34:12 -07:00
Adam Barth
a3b06f31da Switch date picker to using a custom Dialog
Rather than removing all the padding from an AlertDialog, we now just use
Dialog directly for the date picker.
2016-09-29 08:59:22 -07:00
Adam Barth
dc4a1638ee Specialize AlertDialog and SimpleDialog (#6098)
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.
2016-09-27 15:44:11 -07:00
Adam Barth
0734edbeb0 Dialogs shouldn't scroll their headers or buttons (#6082)
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
2016-09-27 09:20:33 -07:00
Adam Barth
55f48f72c9 Persistent bottom sheet should not overlap app bar (#6076)
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
2016-09-26 14:02:01 -07:00
Adam Barth
8c048ec944 Polish SnackBar padding (#6071)
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
2016-09-26 12:01:23 -07:00
Dragoș Tiselice
3a6530d5a4 Added bottom navigation. (#5877) 2016-09-22 12:45:10 -07:00
Hans Muller
d3f540d4bd Fixed tabs fling velocity threshold (#5990) 2016-09-22 11:06:14 -07:00
Hans Muller
fc83640c88 ClampOverscrolls clamps Scrollable, not its Viewport (#5909) 2016-09-21 11:32:19 -07:00
Adam Barth
51960b4482 Complete dartdocs for material/material.dart (#5941) 2016-09-20 14:44:11 -07:00
Dragoș Tiselice
14054646ca Added Material steppers. (#5765)
Added a widget that gives fine control over the use of steppers.
At any single moment, one step is shown with it own controls and
content.
2016-09-16 13:22:15 -07:00
Dragoș Tiselice
87fb075fa1 Renamed DropDown to Dropdown. (#5897)
Fixes #3208.
2016-09-15 17:38:41 -07:00
Dragoș Tiselice
4259266b14 Renamed expansion panel file. (#5884)
Renamed expansion_panels.dart to expansion_panel.dart.
2016-09-15 14:16:05 -07:00
Dragoș Tiselice
826d87a9b2 Made MergeableMaterial dividers animated seamlessly. (#5857)
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.
2016-09-14 10:46:49 -07:00
Ian Hickson
36b093d628 This doesn't need a hack. (#5855) 2016-09-14 10:26:47 -07:00
Hans Muller
4d80f3cb30 Fix app bar title overflow with centerTitle:true (#5773) 2016-09-09 09:59:38 -07:00
Ian Hickson
5bc8888e7d Make tests more realistic (#5762)
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
2016-09-08 13:54:21 -07:00
Ian Hickson
ea6bf4706a Fix the losing of state when pushing opaque routes (#5624)
Fixes https://github.com/flutter/flutter/issues/5283

Other changes in this patch:

Rename OffStage to Offstage.
Fixes https://github.com/flutter/flutter/issues/5378

Add a lot of docs.

Some minor punctuation and whitespace fixes.
2016-08-29 11:28:37 -07:00
Dragoș Tiselice
b8980aeb35 Added expansion panels. (#5523)
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.
2016-08-26 14:27:18 -07:00
Dragoș Tiselice
e382701a9f Changed ExpandIcon to accept default state. (#5521)
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.
2016-08-22 12:54:16 -07:00
Dragoș Tiselice
7bd4b5a9ab Added ExpandIcon widget. (#5463)
Added a widget that automaitcally rotates the expansion icon and
offers a callback interface that captures presses.
2016-08-18 09:27:29 -07:00
Dragoș Tiselice
77a1719cfb Changed IconButton not to exceed its splash size. (#5366)
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.
2016-08-18 09:26:03 -07:00
Dragoș Tiselice
508b8c460c Added a flag to divide Material slices. (#5402)
This commit changes MergeableMaterial to include a flag that
specifies whether connected Material slices should have dividers
between them.
2016-08-17 16:28:28 -07:00
Hans Muller
082730e94b Tapping status bar scrolls to top on IOS (#5425) 2016-08-16 12:30:39 -07:00
Ian Hickson
955b3e21f7 A Flutter logo widget. (#5382)
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
2016-08-15 12:50:24 -07:00
Jason Simmons
529c25caa8 Update the AppBar scroll offset only if the body region is scrolled (#5343)
Fixes https://github.com/flutter/flutter/issues/5131
2016-08-11 16:51:46 -07:00
Dragoș Tiselice
9284dd40b7 Added MergeableMaterial Widget. (#5165)
MergeableMaterial is an animated container that knows how to merge
separate slices of Material together.
2016-08-11 15:22:25 -07:00
Dragoș Tiselice
e1ebc41a14 Material fixes (#5293)
* 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.
2016-08-08 16:56:09 -07:00
Ian Hickson
51f8fb9979 Add a scrollbar to the license screen. (#5114)
And make Scrollbar work with LazyBlock.

And an about box to the Stocks sample app.
2016-07-29 15:44:12 -07:00
Hans Muller
566cacbd83 Don't leave tabs hanging in the middle (#5153) 2016-07-29 14:15:59 -07:00
Adam Barth
8219ab61ab Don't rebuild routes on the second animation frame (#5097)
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.
2016-07-27 13:49:30 -07:00
Ian Hickson
1097d92a8b Fix DatePicker (#5061)
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.
2016-07-27 08:57:56 -07:00
Adam Barth
b30959d748 Center AppBar title on iOS (#5039)
This patch adapts the AppBar to feel more like iOS by centering the title.

Fixes #4962
2016-07-25 18:40:59 -07:00