54 Commits

Author SHA1 Message Date
Wyatt Arent
cc11c39b59 #6344 update google.com/material links to material.google.com (#6484) 2016-10-22 21:51:53 -07:00
Adam Barth
8ec4f22941 Add landscape time picker (#6173)
Fixes #988
2016-10-03 12:00:49 -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
Dragoș Tiselice
3a6530d5a4 Added bottom navigation. (#5877) 2016-09-22 12:45:10 -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
4259266b14 Renamed expansion panel file. (#5884)
Renamed expansion_panels.dart to expansion_panel.dart.
2016-09-15 14:16:05 -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
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
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
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
6f0635d6e8 Merge pull request #4953 from flutter/drawer-header-update
Updated DrawerHeader to new spec.
2016-07-21 11:17:18 -07:00
Hans Muller
36eb4a066f Support for Material arc point and rect transitions (#4938) 2016-07-21 10:48:41 -07:00
Dragos Tiselice
65e77142e9 Updated DrawerHeader and added UserAccountDrawer.
Removed old Stack layout and added a simple-to-extend interface for the
new drawer header. Also added a specialized UserAccountsDrawerHeader
consistent with Material Design guidelines.
2016-07-20 16:16:08 -07:00
Ian Hickson
cd89e867ef About box API (#4677)
This API is the front-end part of the work on showing licenses.

Future patches will:

* Provide an API for registering what licenses should be shown here,
  which will be used by this feature to shown licenses but could also be
  used by custom code for showing licenses (e.g. for people not using
  the Material widgets).

* Actually populate this license API from all the licenses we currently
  use in the engine, in the framework, and from any pub packages that
  are used (directly or indirectly) by the application.
2016-06-22 10:42:02 -07:00
Ian Hickson
e502e9c8f8 ImageIcon (#4649)
Anywhere that accepted IconData now accepts either an Icon or an
ImageIcon.

Places that used to take an IconData in an `icon` argument, notably
IconButton and DrawerItem, now take a Widget in that slot. You can wrap
the value that used to be passed in in an Icon constructor to get the
same result.

Icon itself now takes the icon as a positional argument, for brevity.

ThemeData now has an iconTheme as well as a primaryIconTheme, the same
way it has had a textTheme and primaryTextTheme for a while.

IconTheme.of() always returns a value now (though that value itself may
have nulls in it). It defaults to the ThemeData.iconTheme.

IconThemeData.fallback() is a new method that returns an icon theme data
structure with all fields filled in.

IconTheme.merge() is a new constructor that takes a context and creates
a widget that mixes in the new values with the inherited values.

Most places that introduced an IconTheme widget now use IconTheme.merge.

IconThemeData.merge and IconThemeData.copyWith act in a way analogous to
the similarly-named members of TextStyle.

ImageIcon is introduced. It acts like Icon but takes an ImageProvider
instead of an IconData.

Also: Fix the analyzer to actually check the stocks app.
2016-06-20 21:04:45 -07:00
Ian Hickson
0618da7ca2 PaginatedDataTable (part 1) (#4306)
This introduces the key parts of a paginated data table, not including
the built-in pagination features.

* Provide more data for the data table demo, so there's data to page.

* Introduce a ChangeNotifier class which abstracts out
  addListener/removeListener/notifyListeners. We might be able to use
  this to simplify existing classes as well, though this patch doesn't
  do that.

* Introduce DataTableSource, a delegate for getting data for data
  tables. This will also be used by ScrollingDataTable in due course.

* Introduce PaginatedDataTable, a widget that wraps DataTable and only
  shows N rows at a time, fed by a DataTableSource.
2016-06-01 16:13:40 -07:00
Adam Barth
b2fa6c250a Fix the padding and space for FlatButton and RaisedButton (#3650)
Instead of incorporating the margin into the button, introduce a ButtonBar
widget that supplies the proper spacing between the buttons. Also, make these
buttons more configurable via ButtonTheme so that dialogs can change the
minWidth and padding of the buttons as required by the spec.

Fixes #1843
Fixes #3184
2016-04-29 16:13:25 -07:00
Seth Ladd
f373617a76 add import guidance to library-level docs (#3530)
* add import guidance to library-level docs

* add import docs to other packages

* fix review comment

* clarify which libraries aren't meant to be directly imported
2016-04-27 11:33:00 -07:00
Hans Muller
c4ae13ed22 Refresh indicator (#3354) 2016-04-15 18:39:18 -07:00
Ian Hickson
a91bc0ba9c Material Data Tables (#3337)
+ Add new demo to gallery to show data tables. (This currently doesn't
use a Card; I'll create a Card version in a subsequent patch.)

+ Fix checkbox alignment. It now centers in its box regardless.

+ Add Colors.black54.

+ Some minor fixes to dartdocs.

+ DataTable, DataColumn, DataRow, DataCell

+ RowInkWell

+ Augment dartdocs of materia/debug.dart.

+ DropDownButtonHideUnderline to hide the underline in a drop-down when
  used in a DataTable.

+ Add new capabilities to InkResponse to support RowInkWell.

+ Augment dartdocs of materia/material.dart.

+ Add an assert to catch nested Blocks.

+ Fix a crash in RenderBox when you remove an object and an ancestor
  used its baseline. (https://github.com/flutter/flutter/issues/2874)

+ Fix (and redocument) RenderBaseline/Baseline.

+ Add flex support to IntrinsicColumnWidth.

+ Document more stuff on the RenderTable side.

+ Fix a bug with parentData handling on RenderTable children.

+ Completely rewrite the column width computations. The old logic made
  no sense at all.

+ Add dartdocs to widgets/debug.dart.

+ Add a toString for TableRow.
2016-04-15 16:51:03 -07:00
Devon Carew
8d02f304cf update styles for the generated dartdocs (#3276)
* styles updates for the api docs

* update library docs

* use the new --favion and --use-categories options for dartdoc
2016-04-12 13:08:57 -07:00
Hans Muller
34f23cc456 Added OverscrollIndicator, removed OverscrollIndicatorPainter (#3220)
* Added OverscrollIndicator, removed OverscrollIndicatorPainter
2016-04-08 14:21:00 -07:00
Hans Muller
6335872802 Added Scrollbar, removed ScrollbarPainter (#3203)
* Added Scrollbar, removed ScrollbarPainter

* removed a dead import

* updated per review feedback

* Only call dispatch if the widgets State is still mounted
2016-04-07 16:59:51 -07:00
Hans Muller
c058cf2e81 Overscroll indicator for MaterialList
Overscroll indicator for MaterialList
2016-04-06 16:46:37 -07:00
Adam Barth
d99432ca1a Drop is a separate word than down
Therefore, we use _ between them in the file name.
2016-03-31 12:52:09 -07:00
Adam Barth
ede5dfce30 [rename fixit] ToolBar -> AppBar
* left -> leading (Removes an LTR bias)
* center -> title (Widget was actually centered)
* right -> actions (Removes an LTR bias, asymmetric with leading)

Fixes #2348
2016-03-12 18:33:47 -08:00
Adam Barth
870894fc68 Switch Material Design icons to using the iconfont
Rather than managing all the Material Design icons manually, we now
manage them using an icon font. The icon font contains glyphs for each
icon in an efficient vector format.

This patch updates the FLX tooling to include the MaterialIcons font and
updates the Icon widget to use the font instead of asset images.

Fixes #2313
Fixes #2218
Fixes #2009
Fixes #994
2016-03-02 09:32:02 -08:00
Hans Muller
d8eaac42fb Added menu dividers 2016-03-02 08:45:26 -08:00
Adam Barth
240df79361 Remove redundant material_ prefix
These files are already in the "material" folder. They don't need to be
prefixed with material again.

Fixes #702
2016-02-20 22:12:15 -08:00
Hans Muller
5070d94243 Added GridTile 2016-02-18 16:08:54 -08:00
Hans Muller
8cfe31f5e8 Added GridTileBar, grid gallery demo 2016-02-18 10:13:36 -08:00
Hans Muller
6bc65e0373 Add support for the appbar behavior described in the "Flexible space with image" section of https://www.google.com/design/spec/patterns/scrolling-techniques.html#scrolling-techniques-scrolling. 2016-02-02 16:32:39 -08:00
Hans Muller
5ae1b41ca4 Added TwoLevelList 2016-01-21 16:27:18 -08:00
Hixie
24cab8999c Tooltips
Introduces a new Tooltip class.
Adds support for tooltips to IconButton and Scaffold.
Adds some tooltips to various demos.

Also some tweaks to stack.dart that I made before I decided not to go
down a "CustomPositioned" route.
2016-01-14 12:21:56 -08:00
Adam Barth
e7c05e5781 Popup menu splash doesn't go to edge
Now the splash goes to the edge. Also, fold popup_menu_item.dart into
popup_menu.dart for simplicity.

Fixes #266
2015-12-05 01:21:07 -08:00
Adam Barth
40bc9e65da Remove outdated radial_reaction.dart
We now draw radial reactions using Material.
2015-12-04 20:20:29 -08:00
Hixie
5dd8bd6e34 Allow non-Material apps to use the Title widget. 2015-12-03 15:42:59 -08:00
Adam Barth
09cf84d9b6 Move RenderTogglable to material.dart
Fixes #219
2015-11-25 23:15:17 -08:00
Adam Barth
e9d911f5ea Add a basic material slider
The slider in this patch works, but it's missing animations and many subtle
touches.
2015-11-25 12:27:57 -08:00
Adam Barth
edb9d78d5b Start working on a TimePicker
You can't actually pick a time with the time picker yet, but this patch adds
most of the plumbing.
2015-11-23 17:11:08 -08:00
Adam Barth
b17fe3afb2 Integrate Date Picker into material_gallery 2015-11-23 15:55:03 -08:00
Adam Barth
cc4234821b Add basic support for material chips:
http://www.google.com/design/spec/components/chips.html#chips-behavior

This patch adds support for deletable and non-deleteable chips, but doesn't yet
add support for contact chips. Also, demo the chips in a new Material Gallery
app that will let us demo our gallery of widgets in a single app.
2015-11-23 10:57:48 -08:00
Hixie
309d25d4bb Move Material page animations to Material layer.
PageRoute is now MaterialPageRoute.

This also changes the following:

- Now the HeroController is a Navigator observer, rather than a feature
  of HeroPageRoutes, which are gone. This means heroes can work between
  any kind of ModalRoute now.

- ModalPageRoute is moved from modal_barrier.dart to routes.dart.

- It allows routes to opt-out of their modal barrier being a shortcut to
  popping the route.

- Features of PageRoute that aren't Material-specific get promoted to
  ModalRoute features: storage, the subtree key, offstageness...

The AnimatedModalBarrier is still a ModalRoute feature.
2015-11-16 12:53:12 -08:00
Adam Barth
62336ce4a8 Remove unused material edge definition
The one we actually use is in material.dart.
2015-10-28 07:34:11 -07:00
Hans Muller
e90dcf8e34 Adds modal bottom sheets: showModalBottomSheet() 2015-10-27 14:57:18 -07:00
Hans Muller
33c7820d7e Adds initial versions of DropdownButton DropdownMenuItem
Adds a dropdown menu button as shown in the Material design spec here: https://www.google.com/design/spec/components/buttons.html#buttons-dropdown-buttons. It's the video at the bottom of this section of the Material design spec.

This version of the component doesn't deal with scrollable menus or
constrain the height of the menu.
2015-10-22 13:38:50 -07:00
Adam Barth
284eaa9cd7 Add a MaterialList
A MaterialList understands the sizing, padding, and scrollbar features of
Material Design lists.

Also, add CircleAvatar for showing the circular avatars that are commonly used
in material lists.
2015-10-19 09:15:17 -07:00
Adam Barth
c17782569d Add a ListItem widget 2015-10-14 16:33:31 -07:00
Hans Muller
921d432092 Added Painter, ScrollingListPainter, MaterialScrollbarPainter
Enabled displaying a scrollbar in ScrollingLists. The scrollbar is painted as an "overlay", i.e. it's painted on top of the scrolling list's visible children.

Added an abstract Painter base class that encapsulates a paint method and the renderer that it's attached to. RenderBlockViewport and HomogenousViewport now support an overlayPainter property. If specified, RenderBlockViewport attaches itself to the overlayPainter when it's attached to the rendering tree. RenderBlockViewport now calls overlayPainter.paint() after it has painted its children.

Added an abstract ScrollingListPainter class that exposes ScrollingList's state which might be needed for painting. Like its scroll direction and scrollOffset. The ScrollingListPainter is notified when a scroll starts and ends.

Defined a Material-specific ScrollingListPainter that renders a scrollbar. The scrollbar thumb is faded in/out when the scroll starts/ends.

Added onScrollStart and onScrollEnd listeners to Scrollable.
2015-10-14 07:59:41 -07:00
Adam Barth
db3b9e8052 Rename App to MaterialApp
MaterialApp assumes that you're using material design.

Also move radial reaction and fix imports for stats box.
2015-10-09 10:27:22 -07:00