1049 Commits

Author SHA1 Message Date
Hixie
8218a13aa4 Remove StateRoutes 2015-11-24 10:31:01 -08:00
Adam Barth
8a373f5000 Merge pull request #571 from sethladd/ignore
ignore .atom directories
2015-11-24 09:17:03 -08:00
Seth Ladd
67544df139 ignore .atom directories 2015-11-24 09:07:31 -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
1f1e050163 Add drop down buttons to Material Gallery 2015-11-23 16:17:29 -08:00
Adam Barth
b17fe3afb2 Integrate Date Picker into material_gallery 2015-11-23 15:55:03 -08:00
Adam Barth
b823e47f0e Add avatars to material chips
Fixes #464
2015-11-23 13:44:36 -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
6e371875e9 Route refactor
- Removed the concept of ephemeral routes.
- Renamed the two _MenuRoutes to _PopupMenuRoute and _DropDownRoute.
- Added type arguments in various places:
  - DropDownMenu
  - _DropDownRoute
  - _ModalBottomSheetRoute
  - PopupMenuItem
  - _PopupMenu
  - _PopupMenuRoute
- Made _ModalBottomSheetRoute, the two ex _MenuRoutes, and _DialogRoute
  all inherit from ModalRoute, via PopupRoute.
- Change "Dropdown" and "DropDown" to "DropDown" consistently.
- Made MaterialPageRoute inherit from PageRoute.
- Made ModalBarrier not create a box if it's always transparent.
- Exposed the Futures on TransitionRoutes.
- Fixed that menus were no longer dismissable by tapping the modal
  barrier.
2015-11-20 14:56:07 -08:00
Adam Barth
6db39fe95b Rename LabeledGlobalKey's argument to debugLabel
The old name was confusing.

Fixes #462
2015-11-20 13:15:32 -08:00
Hixie
03e094aa1b Convert Persistent Bottom Sheets to a Scaffold API
- `Scaffold.of(context).showBottomSheet(widget);`
- Returns an object with .closed Future and .close() method.
- Uses a StateRoute to handle back button.
- Take the Navigator logic out of the BottomSheet widget.
- Support showing a sheet while an old one is going away.
- Add Navigator.remove().
2015-11-20 10:49:10 -08:00
Adam Barth
49fb492332 Fix crash in stocks app painting 2015-11-20 09:36:12 -08:00
Adam Barth
72329cf422 Callback identity is too fragile for CustomPaint
Many of the widgets that use CustomPaint were spamming repaints because
CustomPaint repaints when the identity of the onPaint callback changes, which
it does every build for StatelessComponents.

This patch changes CustomPaint to use a CustomPainter, similar to the new
custom layout widgets. The CustomPainter has a `shouldRepaint` function along
with its `paint` function. This function gives clients explicit control over
when the custom paint object repaints.
2015-11-20 08:20:59 -08:00
Adam Barth
6bfcf9bf17 Merge pull request #503 from abarth/dump_layer_tree
Add debugDumpLayerTree to dump the layer tree
2015-11-19 15:10:02 -08:00
Adam Barth
dfbd8c6a8a Add debugDumpLayerTree to dump the layer tree
To help debugging issues with the layer tree.
2015-11-19 14:45:40 -08:00
Viktor Lidholt
ab3ae1e1ab Removes demo game from repository (it's now in its own) 2015-11-19 13:43:45 -08:00
Adam Barth
fc576814d5 Refactor PaintingContext
This patch simplifies PaintingContext with several goals:

1) We now call a callback instead of assuming the caller has a single child to
   paint. This change will let us handle render objects that wish to paint more
   than one child.
2) We now avoid creating lots of empty picture layers because we don't eagerly
   start recording pictures. Instead, we wait for the first caller to touch the
   canvas before creating the picture recorder.
3) We now are more consistent about which values have incorporated the painting
   offset.
2015-11-19 11:18:04 -08:00
Hixie
954713ab23 Snackbar Refactor
"showSnackBar()" is now a feature of a Scaffold. To get to a Scaffold
you either use a global key (`scaffoldKey.currentState.showSnackBar(...)`),
or you use `Scaffold.of(context)`.

Snack bars no longer have a route. They are entirely managed by the
Scaffold. Fixes #432.

Snack bars now queue up when you have several of them. Fixes #374.

Snack bars now auto-size themselves around their contents. This is step
one towards implementing multiline snack bars.

Snack bars now self-dismiss after some per-snackbar configurable period.

The self-dismissing pauses while a dialog is up above the snackbar (or
anything that uses ModalRoute). To enable this, there's now a
`ModalRoute.of(context)` API that returns the current ModalRoute, and
you will be rebuilt if you asked for this and the route's "current"
status changes. To implement this, the Navigator now rebuilds
unconditionally any time it pushes or pops a route.

Snack bars now use the curves that Android uses for snack bars.

Snack bar contents now fade in.
2015-11-18 17:01:21 -08:00
Hans Muller
0dc652bd66 Corrected Card resting elevation, tabs example toolbar 2015-11-18 14:33:08 -08:00
Adam Barth
c964a1f1f8 Switch from ui.tracing to dart:Developer Timeline
This change will let us remove the tracing interface from dart:ui and also
makes these timeline events show up in Observatory.
2015-11-18 12:57:58 -08:00
Hans Muller
d9153a13c6 Update shadow rendering
Shadows now render as three seprate MaskFilter.blur components per the most recent Material spec.

The shadows Map was replaced by a similar Map called elevationToShadow with entries that match the 10 elevations specifed by http://www.google.com/design/spec/what-is-material/elevation-shadows.html.

The "level" property (many classes) is now called "elevation", to match the Material spec.

BoxShadow now includes a spreadRadius parameter - as in CSS box-shadow. Renamed the BoxShadow blur property to blurRadius to further align BoxShadow with CSS box-shadow.
2015-11-18 07:58:28 -08:00
Ian Hickson
1d3f734a92 Merge pull request #414 from Hixie/fix-demos
Fix some examples.
2015-11-17 09:53:54 -08:00
Adam Barth
c769d120c4 Add a Positioned constructor from a Rect
A common pattern is to use a Positioned with a Sized box to give both an offset
from the edge as well as a fixed size to the child. This patch rolls into into
the Stack layout algorithm for simplicity.

Fixes #250
2015-11-16 23:23:54 -08:00
Collin Jackson
b07d55d1b3 Remove redundant fetch functions and avoid crashing when no headers are set 2015-11-16 18:31:57 -08:00
Hixie
5e221334fa Fix some examples.
- drag and drop was using the wrong draggables (long press vs short
  press).

- navigation.dart wasn't using material correctly and so was ending up
  with some red text.

- piano wasn't followig our style guide even a little.

- date picker was not scrollable.
2015-11-16 15:54:40 -08:00
Collin Jackson
e3b9094f2a Fix #104 Support for setting HTTP headers 2015-11-16 14:10:58 -08:00
Hans Muller
f7b36f07f8 Give the StockSymbolView's Hero a Key 2015-11-16 11:35:42 -08:00
John McCutchan
d1e62a39e2 Update four callers of Message constructor to pass in required arguments 2015-11-13 14:39:06 -08:00
Adam Barth
4cb0ae4901 Add an example for launching a URL 2015-11-13 14:16:25 -08:00
Ian Hickson
1aa2751ba8 Trivial whitespace fixes. 2015-11-12 22:10:16 -08:00
Devon Carew
49b7fee4c7 add a flutter.yaml file for the widgets project 2015-11-12 13:42:54 -08:00
Ian Hickson
4a71f38224 Merge pull request #332 from Hixie/flutter-analyze
flutter analyze command
2015-11-12 12:28:48 -08:00
Hixie
a0227cab15 flutter analyze command
Other changes in this patch:
- Make the 'flutter' tool say "Updating flutter tool..." when it calls
  pub get, to avoid confusion about what the pub get output is about.
- Make the bash flutter tool call pub get when the revision has
  changed. (This was already happening on Windows.)
- Fix a raft of bugs found by the analyzer.
- Fix some style nits in various bits of code that happened to be near
  things the analyzer noticed.
- Remove the logic in "flutter test" that would run "pub get", since
  upon further reflexion it was determined it didn't work anyway.
  We'll probably have to add better diagnostics here and say to run the
  updater script.
- Remove the native velocity tracker script, since it was testing code
  that has since been removed.

Notes on ignored warnings:
- We ignore warnings in any packages that are not in the Flutter repo or
  in the author's current directory.
- We ignore various irrelevant Strong Mode warnings. We still enable
  strong mode because even though it's not really relevant to our needs,
  it does (more or less accidentally) catch a few things that are
  helpful to us.
- We allow CONSTANTS_LIKE_THIS, since we get some of those from other
  platforms that we are copying for sanity and consistency.
- We allow one-member abstract classes since we have a number of them
  where it's perfectly reasonable.
- We unfortunately still ignore warnings in mojom.dart autogenerated
  files. We should really fix those but that's a separate patch.
- We verify the actual source file when we see the 'Name non-constant
  identifiers using lowerCamelCase.' lint, to allow one-letter variables
  that use capital letters (e.g. for physics expressions) and to allow
  multiple-underscore variable names.
- We ignore all errors on lines that contain the following magic
  incantation and a "#" character:
    // analyzer doesn't like constructor tear-offs
- For all remaining errors, if the line contains a comment of the form
    // analyzer says "..."
  ...then we ignore any errors that have that "..." string in them.
2015-11-12 12:23:29 -08:00
Adam Barth
0259ad81db ItemBuilder should also get the index of the item
This seems useful for numbering the entries in the list, for example.

Fixes #328
2015-11-12 12:05:42 -08:00
Jason Simmons
22f26be88f Update the interactive_flex example for the new event handlers 2015-11-11 17:24:33 -08:00
Hans Muller
4b03a9eec8 Merge pull request #318 from HansMuller/stocks_demo
Add a persistent bottom sheet to the stocks demo
2015-11-11 15:54:33 -08:00
Hans Muller
5755b15bf5 Add a persistent bottom sheet to the stocks demo 2015-11-11 15:38:13 -08:00
Eric Seidel
d8d5156a45 Move data out of Github and into Firebase
@abarth @collinjackson
2015-11-11 15:30:10 -08:00
Collin Jackson
cbc743f179 Remove unneeded null check in raw keyboard example 2015-11-11 11:05:11 -08:00
Collin Jackson
b79c78c05e Raw keyboard example 2015-11-11 10:55:06 -08:00
Jason Simmons
c94e4c4154 Update the raw examples to handle PointerPacket events 2015-11-11 10:44:47 -08:00
Adam Barth
b1a17cb0f8 Fix remaining analyzer warnings
Constructor tear-offs aren't supported by the analyzer yet.
2015-11-10 14:12:15 -08:00
Hans Muller
5e08b98e0d Refactor bottom sheet support, add a bottom sheet to the stocks demo
Factored OverlayRoute out of the modal and persistent bottom sheet clases, since the bottom sheet classes need to drive the performance.

Added a bottom sheet to the stocks demo: long-press on a stock shows a modal bottom sheet.

Made AnimatedModalBarrier public.
2015-11-10 11:27:17 -08:00
Adam Barth
778289f7d0 Use path dependencies for Playfair 2015-11-10 07:56:43 -08:00
Collin Jackson
c3f55dcec2 Fix #104 by adding support for HTTP post using DataPipeFiller 2015-11-09 16:40:24 -08:00
Adam Barth
08539b4e4d Rewire the pubspecs to use local paths
Using local paths ensures that each package sees each other package at HEAD.
2015-11-06 22:46:52 -08:00
Adam Barth
e7c837b412 Merge pull request #1972 from krisgiesing/examples
Add flutter.yaml for address_book example
2015-11-06 20:33:34 -08:00
Hixie
1f5844ea70 Teach Block about padding.
It's common to want a scrolling viewport but with padding around the
contents. Teaching Block about this makes the places that do this
substantially simpler and further buries ScrollableViewport and
BlockBody (they're now only used in scrollable.dart).
2015-11-05 17:14:27 -08:00
Hans Muller
ef866e00a3 Replace Align shrinkWrap parameter with widthFactor and heightFactor 2015-11-05 16:45:05 -08:00
Kris Giesing
6d293b84d4 Remove unneeded flutter.yaml property 2015-11-05 15:25:17 -08:00