Commit Graph

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
Kris Giesing
8a2505b1c8 Add flutter.yaml for address_book example 2015-11-05 15:20:05 -08:00
Hixie
255ed0b951 Make Draggable use gestures
Draggable is now itself a gesture arena member. This means it won't
conflict with other gesture recognisers in the same path.

This also allows variants of Draggable that are triggered by other
gestures.

Also, some cleanup of DoubleTapGestureRecognizer, GestureDetector, and
PrimaryPointerGestureRecognizer.

Also, make MultiTapGestureRecognizer support a timeout for longpress.

Also, make Draggable data be typed.

Also, hide warnings about constructor warnings for now. Analyzer doesn't
support them yet. (Have to do this on a per-line basis)

Directions for future research:
 - animating the avatar (enter/exit transitions)
 - interaction with the navigator (canceling a drag on page navigation, etc)
 - double-tap draggable
2015-11-05 15:16:59 -08:00
Matt Perry
72c17afa06 Fix updater. It was looking for the wrong files. 2015-11-05 17:56:50 -05:00
Viktor Lidholt
e9d5f411ed Merge pull request #1889 from vlidholt/master
Fixes navigation back to main menu in demo game
2015-11-04 13:12:23 -08:00
Hans Muller
fe3aee88c7 added ToolBar.withSizeOffsets() 2015-11-03 14:16:45 -08:00
Hans Muller
1b578e9eeb message string 2015-11-03 14:16:45 -08:00
Hans Muller
6f22661543 Extended height toolbar 2015-11-03 14:16:45 -08:00
Hixie
0f0108d7b6 Convert the scale demo to a general gestures demo. 2015-11-03 12:26:02 -08:00
Adam Barth
e971f32648 Rev pubspecs 2015-11-02 13:19:55 -08:00
Adam Barth
5079b1db01 Merge pull request #1899 from abarth/flutter_yaml
Rename sky.yaml to flutter.yaml
2015-11-02 13:13:48 -08:00
Adam Barth
8a24312509 Rename sky.yaml to flutter.yaml
More flutter more better.
2015-11-02 12:57:27 -08:00
Adam Barth
828775e97e Routes shouldn't be interactive when animating out
This patch introduces the notion of a ModalRoute that puts up a modal barrier
and makes the route invisible to hit testing when its animating out. This patch
also uses this mechanism in a number of places (including PageRoute). There are
still a few more cases to convert, but that's work for a future patch.

Fixes #1684
2015-11-02 12:48:11 -08:00
Adam Barth
74d6f33f5a Rename Icon's type paramter to icon
The name of the parameter wasn't consistent with IconButton or DrawerItem, etc.

Fixes #1871
2015-11-01 11:25:17 -08:00
Viktor Lidholt
52c291a7a5 Fixes navigation back to main menu in demo game 2015-10-30 16:13:26 -07:00
Adam Barth
50a177b7aa Switch to Navigator2 2015-10-29 23:18:56 -07:00
Hixie
fca9b8f3d6 Rev package versions for release.
sky_engine is now at 0.0.45
sky_services is now at 0.0.45
flx is now at 0.0.4
flutter is now at 0.0.15
flutter_sprites is now at 0.0.12
2015-10-29 14:41:56 -07:00
Adam Barth
fab160cfce Rationalize embedder.dart and shell.dart
This patch combines embedder.dart and shell.dart into one thing. We should now
handle a bunch of error cases better.

  * embedder.connectToApplication has moved to shell.connectToApplication,
    matching the rest of the mojo universe.
  * embedder.connecttoService has moved to shell.connnectToService (and merged
    with shell.requestService).
  * shell.requestService is now shell.connectToService, matching the rest of
    the mojo universe.
  * serviceRegistry has moved from embedder.serviceRegistry to a top-level
    getter.

Fixes #1803
2015-10-29 10:47:34 -07:00
Adam Barth
5b3b3dfb3a Merge pull request #1862 from abarth/navigator2
Add an initial implementation of Navigator2
2015-10-28 17:00:12 -07:00
Hans Muller
90a3a20d83 Merge pull request #1860 from HansMuller/tabs
Correct TabNavigatorWidth, tabs.dart example
2015-10-28 16:40:50 -07:00
Adam Barth
b991b7d664 Add an initial implementation of Navigator2
This navigator can handle simple page navigation. I'll add more features in
subsequent CLs.
2015-10-28 16:40:22 -07:00
Hans Muller
7de7105fc5 Correct TabNavigatorWidth, tabs.dart example 2015-10-28 16:26:22 -07:00
Hixie
cbf9eab8fe Rev package versions for release.
sky_engine is now at 0.0.44
sky_services is now at 0.0.44
flx is now at 0.0.3
flutter is now at 0.0.14
flutter_sprites is now at 0.0.11
2015-10-28 14:54:33 -07:00
Ian Hickson
6d4221cb95 Merge pull request #1851 from Hixie/MixedViewport-bug
Fix crash when removing a card in card_collection
2015-10-28 14:47:40 -07:00
Collin Jackson
6c2bbff4ad Media query class for querying viewport information 2015-10-28 12:34:57 -07:00
Hixie
a8a32a972a Fix crash when removing a card in card_collection
MixedViewport didn't use the building:true flag when locking itself, so
when it caused a rebuild of its children, we assumed that nobody was
allowed to mark things dirty below the list, and things crashed when
Inherited people did in fact rebuild.

Also:
 - default offset for MixedViewport
 - don't bother rebuilding if the underlying RenderObject is going to
   rebuild anyway for some reason
 - better docs for the "items must have keys" assert
 - keep the FlipComponent stuff together in test_widgets.dart
2015-10-28 10:31:12 -07:00
Adam Barth
af790303c2 Merge pull request #1848 from abarth/icon_size
Icon should use an enum rather than an int for size
2015-10-28 09:13:23 -07:00
Adam Barth
eeea4ab7c7 Icon should use an enum rather than an int for size
Material design icons are defined to work at specific sizes: 18, 24, 36, 48.
The current API doesn't reflect that and just takes a size int. If an invalid
size is chosen an error is printed to the console and no icon shows up.

Fixes #1816
2015-10-28 08:55:49 -07:00
Adam Barth
3373d0ba01 Switch clients from ui.view to ui.window 2015-10-28 07:16:56 -07:00
Adam Barth
dc6366793f Merge pull request #1832 from abarth/tap_position
Add a position to the onTap callback
2015-10-27 14:20:35 -07:00
Adam Barth
2225405fad Add a position to the onTap callback
Fixes #1807
2015-10-27 14:12:54 -07:00
Viktor Lidholt
be2b4db314 Merge pull request #1833 from vlidholt/master
Improves physics debug drawing
2015-10-27 14:08:05 -07:00
Ian Hickson
8a900f9042 Track scroll position
- Change RouteArguments to pass the route's BuildContext rather than
  the Navigator. This caused the bulk of the examples/ and .../test/
  changes (those are mostly mechanical changes). It also meant I could
  simplify Navigator.of().

- Make initState() actually get called when the State's Element is in
  the tree, so you can use Foo.of() functions there. Added a test for
  this also.

- Provide a RouteWidget so that routes have a position in the Widget
  tree. The bulk of the route logic is still in a longer-lived Route
  object for now.

- Make Route.setState() only rebuild the actual route, not the whole
  navigator.

- Provided a Route.of().

- Provided a Route.writeState / Route.readState API that tries to
  identify the clients by their runtimeType, their key, and their
  ancestors keys, up to the nearest ancestor with a GlobalKey.

- Made scrollables hook into this API to track state. Added a test to
  make sure this works.

- Fix the debug output of GestureDetector and the hashCode of
  MixedViewport.

- Fixed ScrollableWidgetListState<T> to handle infinite lists.
2015-10-27 13:46:07 -07:00
Viktor Lidholt
848b79efc8 Updates physics test to draw debug 2015-10-27 13:39:19 -07:00
Adam Barth
d6dc9d47b8 Use VoidCallback for onPressed and friends
Previous these callbacks were leaking the implementation detail that they were
triggered by taps. In a later patch, we're going to add a parameter to
GestureTapCallback that these callbacks won't have.

Related to #1807
2015-10-27 10:21:10 -07:00
Hixie
d11acc41eb Use the presence of handler to determine 'enabled'
Instread of an explicit 'enabled' bool, this uses the presence of the
event handler to determine if a widget is enabled or not. This means
that if you've not passed a handler, your widget will be disabled, which
makes sense, since it wouldn't work anyway.

Adds this feature to checkbox, and ports raised button, flat button, and
radio buttons to this new model.

Adds a checkbox to card_collection that can be disabled.

Hide a (basically bogus) hint from the (soon to be disabled) strong hint
mode in the analyzer that this reveals.
2015-10-26 17:35:41 -07:00
Hixie
c87e967052 Radio button 'disabled' state.
Also:
 - give card_collection an option to turn on or off the edit widgets
 - give card_collection an option to control text alignment (when not editing)
 - give card_collection a "dump" option to aid debugging
 - make the gesture detector report which gestures it is listening to
2015-10-26 14:49:58 -07:00
Viktor Lidholt
4da5aea555 Merge pull request #1797 from vlidholt/master
Adds motors to revolute joints and prismatic joints
2015-10-26 13:28:32 -07:00
Viktor Lidholt
515d7109ef Removing debug printout 2015-10-26 13:23:33 -07:00
Hixie
fd842810c9 Port ensure_visible.dart to fn3.
This concludes the fn3 port!
2015-10-26 12:44:54 -07:00
Jason Simmons
310ce31891 Merge pull request #1791 from jason-simmons/stocks_example_fetch
In the stock list, filter out any symbols that have not yet been fetched
2015-10-26 12:37:03 -07:00
Ian Hickson
7822bd03ae Merge pull request #1776 from Hixie/stocks-back
Fix Stocks search mode back button.
2015-10-26 12:02:33 -07:00
Jason Simmons
194f0f22e3 In the stock list, filter out any symbols that have not yet been fetched
If you load the example and immediately switch to the Portfolio tab, you may
see exceptions due to symbols that are in the portfolio list but whose
data is not yet present in the stocks map
2015-10-26 11:12:08 -07:00
Hixie
b1dbf4528c Radio<T> and ValueChanged<T>
Make Radio widgets take a type that describes the type of their value,
so that you can catch when you use the wrong value.

Standardise on ValueChanged<Foo> instead of having a FooValueChanged
for every value of Foo.
2015-10-26 11:03:24 -07:00
Ian Hickson
a66e55a89c Fix Stocks search mode back button.
Back button wasn't reliably working in checked mode.
2015-10-25 18:31:03 -07:00
Hixie
a6c473ea95 Strong modeify the examples
This makes skyanalyzer also check the examples, and fixes everything it
found there.
2015-10-23 18:13:25 -07:00
Viktor Lidholt
5a481ed554 Merge pull request #1746 from vlidholt/master
Working node to physics world conversions
2015-10-23 13:48:45 -07:00
Viktor Lidholt
68be30e0ec Removes debug printouts in sprite physics 2015-10-23 13:46:19 -07:00
Viktor Lidholt
3708667308 Fixes sprite physics to work correctly with the node graph
Teleportation for physics bodies works again
2015-10-23 13:31:13 -07:00
Adam Barth
aa418844ea Delete OldTextPainter
Also, delete all references to DOM APIs.
2015-10-23 12:07:55 -07:00
Chinmay Garde
eda3a18c31 Avoid building the fitness app on iOS due to build errors 2015-10-22 17:50:58 -07:00
Jim Beveridge
9ea722d9b6 Merge pull request #1717 from jimbeveridge/piano
Fix slow sound init in piano sample app
2015-10-22 15:23:32 -07:00
Hans Muller
d25039df30 Use a type parameter for Dropdown value 2015-10-22 15:14:32 -07:00
Jim Beveridge
4b60def23c Fix slow sound init in piano sample app
Fixes #1696. Also fixes handles leaking on error.
2015-10-22 14:58:31 -07:00
Hixie
bd9036cdb8 Port spinning_mixed demo to fn3 2015-10-22 14:20:13 -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
de395582d5 Add Navigator.of
Now you don't need to pass the navigator around everywhere.
2015-10-22 12:32:42 -07:00
Hixie
fa8c45151f Heroes 2015-10-21 16:58:36 -07:00
Hixie
bc6d17db3b Use a card for the stock symbol viewer page. 2015-10-21 12:02:28 -07:00
Viktor Lidholt
0382158550 Merge pull request #1697 from vlidholt/master
First pass on sprite physics node hierarchy integration
2015-10-20 16:35:08 -07:00
Adam Barth
d54d35d3d1 Adds EnterExitTransition widget
This widget smoothly resizes as its child changes and lets you provide entrance
and exit transitions for its children.
2015-10-20 15:37:55 -07:00
Viktor Lidholt
ca724ae151 Adds support for scaling sprite physics groups 2015-10-20 10:47:58 -07:00
Hixie
1e9e4e159d RenderOverflowBox baseline logic
I accidentally lost this when extracting RenderOverflowBox from
RenderProxyBox.
2015-10-20 09:52:48 -07:00
Adam Barth
f79fdff2d0 Move animation curves into a Curves namespace 2015-10-19 18:08:52 -07:00
Adam Barth
529fa95f87 Give the CustomPaint and SizeObserver callbacks better names
The style we use for callbacks in widgets is "onFoo". These classes were using
an order naming convention and just called their callbacks "callback".
2015-10-19 17:27:40 -07:00
Adam Barth
6fe9446f01 Merge pull request #1679 from abarth/fix_analyzer
Fix analyzer warnings in examples
2015-10-19 15:31:59 -07:00
Matt Perry
f9e43f12fe Merge pull request #1612 from mpcomplete/signer.cipher
Add support for verifying .flx signatures when updating
2015-10-19 17:18:17 -04:00
Adam Barth
8382ca2c0a Fix analyzer warnings in examples 2015-10-19 13:46:52 -07:00
Matt Perry
dff3fa7e46 Support verifying .flx signatures when updating.
Adds a step to the updater to verify that the new .flx package is signed and
untampered.

Each .flx contains a signed manifest file. The manifest contains a SHA-256 hash
of the .flx contents. See bundle.dart for a description of the new .flx format.
2015-10-19 16:39:02 -04:00
Adam Barth
734240db6d Merge pull request #1678 from abarth/show_color_filter
Show ColorFilter
2015-10-19 13:37:55 -07:00
Adam Barth
4094223378 Show ColorFilter
Instead of requiring clients to use ui.ColorFilter, we show show the
ColorFilter class, similar to what we do for Color.
2015-10-19 13:33:39 -07:00
Viktor Lidholt
623b3ba06d Merge pull request #1677 from vlidholt/master
Renames PhysicsNode to PhysicsWorld
2015-10-19 13:33:19 -07:00
Viktor Lidholt
6bd4fb8515 Renames PhysicsNode to PhysicsWorld 2015-10-19 13:27:32 -07:00
Adam Barth
715b304ea2 Convert Align to use FractionalOffset instead of two doubles
It was confusing as to whether these were fractions or pixels.

Fixes #1622
2015-10-19 12:56:38 -07:00
Viktor Lidholt
0ef9da85e1 Merge pull request #1672 from vlidholt/master
Makes sprite physics bodies scalable
2015-10-19 12:30:02 -07:00
Adam Barth
47c854b8fc Merge pull request #1673 from abarth/rm_old_paint_setters
Remove old setFoo functions on Paint
2015-10-19 12:28:09 -07:00
Adam Barth
2aa79d5694 Remove old setFoo functions on Paint
We now just use Dart properties, which is more idiomatic.
2015-10-19 12:21:34 -07:00
Viktor Lidholt
6f9fe7b1fe Updates physics test 2015-10-19 12:13:20 -07:00
Adam Barth
27b5fc14a3 Scaffold should wrap its body in a Material
Fixes #1669
2015-10-19 12:11:10 -07:00
Collin Jackson
a37fc68234 Merge pull request #1640 from collinjackson/stocks_app
test harness for stocks app on iOS
2015-10-16 15:34:45 -07:00
Hans Muller
cd27fd2370 Merge pull request #1647 from HansMuller/restore_overlay_geometry
Restored overlay_geometry example
2015-10-16 11:13:16 -07:00
Hans Muller
ccfecf434d Restored overlay_geometry example 2015-10-16 11:00:12 -07:00
Hans Muller
2609f7bf8e OMG I've been running with checking turned off. Fixed scrollbar assertion failures. 2015-10-16 10:14:26 -07:00
Viktor Lidholt
f77319fce6 Merge pull request #1642 from vlidholt/master
Animated sprite physics bodies now correctly transfers energy to dynamic bodies
2015-10-16 08:57:12 -07:00
Viktor Lidholt
f48b88cd3f Updates physics test 2015-10-15 17:08:51 -07:00
Collin Jackson
ee631c0aa8 Build stocks app on iOS 2015-10-15 16:17:25 -07:00
Jason Simmons
21d74257cd Merge pull request #1610 from jason-simmons/slice_border_warning
Fix warnings seen when running skyanalyzer in strong mode
2015-10-15 12:59:28 -07:00
Hixie
1f40d96fbf Improve debugging output
Teach dumpRenderTree() to draw actual trees.
Make the TextStyle output terser so it doesn't overflow the output.
Make debugDumpApp() say what mode we're in (checked vs release).
Hide lifecycle state from release mode dumps (since it's checked-only state).
2015-10-15 11:23:23 -07:00
Jason Simmons
5b72a2fdaf Fix warnings seen when running skyanalyzer in strong mode 2015-10-15 10:56:03 -07:00
krisgiesing
2032d3e41f Merge pull request #1605 from krisgiesing/events-merge
Add dart-layer input event abstraction
2015-10-14 13:36:07 -07:00
Hixie
7946dc3a34 Write down some unwritten rules of Flutter development. 2015-10-14 09:58:29 -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
faa7f8180a Merge pull request #1602 from jimbeveridge/readme
Show new flutter tool and its use in the widgets dir.
2015-10-13 16:59:22 -07:00
Adam Barth
a88a85e695 Rename skysprites to flutter_sprites 2015-10-13 16:34:01 -07:00
Jason Simmons
090c37077b Update imports of skysprites to flutter_sprites 2015-10-13 16:07:38 -07:00
Kris Giesing
0c22900861 Merge remote-tracking branch 'upstream/master' into events-merge 2015-10-13 15:35:45 -07:00
Kris Giesing
ec205ac5c5 Add dart-layer input event abstraction 2015-10-13 15:16:04 -07:00
Adam Barth
42469d2cb9 Fix game's pubspec.yaml 2015-10-13 14:26:58 -07:00
Adam Barth
89faf21a10 Merge pull request #1596 from abarth/moar_nine
Add a centerSlice parameter to images
2015-10-13 14:24:06 -07:00
Hixie
1cf1cf9c64 Port first sector demo to fn3
Also, fix warnings in rendering/sector_layout.dart
Also, fix hit testing in rendering/sector_layout.dart
Also, add WidgetToRenderBoxAdapter
Also, make the rendering library debugging tools more resilient to
dumping stuff before layout is complete.
2015-10-13 14:21:52 -07:00
Jim Beveridge
93fa4464ba Show new flutter tool and its use in the widgets dir. 2015-10-13 13:53:05 -07:00
Adam Barth
998a066a82 Add a centerSlice parameter to images
This lets you draw nine-patch images.
2015-10-13 13:21:36 -07:00
Hixie
f2cc43a483 Lots of trivial warning fixes
Add type annotations in many places.
Fix some identifiers to have more lint-satisfying names.
Make all operator==s consistent in style.
Reorder some functions for consistency.
Make ParentData no longer dynamic, and fix all the code around that.
2015-10-12 16:31:20 -07:00
Adam Barth
5a7d21675a Remove demo_launcher
This example is outdated.
2015-10-12 14:20:28 -07:00
Viktor Lidholt
26234b1041 Merge pull request #1580 from vlidholt/master
Working joints in sprite physics
2015-10-12 14:10:19 -07:00
Adam Barth
bb9cf6d78b Add .old extension to silence analyzer
These examples haven't been ported to fn3 yet. Before this patch, they caused a
lot of noise in the analyzer output.
2015-10-12 13:45:33 -07:00
Viktor Lidholt
4e78799391 Updates sprite physics test 2015-10-12 13:39:47 -07:00
Adam Barth
44f0feeb57 Merge pull request #1574 from abarth/material_canvas
Change the default MaterialType to canvas
2015-10-12 11:09:48 -07:00
Adam Barth
a1d554a575 Update arrow in stocks search to use ColorFilter
We changed IconButton to require a ColorFilter to filter the color of the icon.
2015-10-12 10:09:57 -07:00
Adam Barth
09665c0d7f Change the default MaterialType to canvas
Canvas is by far the most popular type of material by call site (and makes for
a faster default because it doesn't have a RRect clip).
2015-10-12 09:36:47 -07:00
Adam Barth
f9a7ed047d Reattach fitness to the build
We can build Fitness again now that playfair has been updated to account for
the package:flutter rename.
2015-10-12 00:24:24 -07:00
Adam Barth
ecce1eb389 Import dart:ui as ui (instead of as sky) 2015-10-09 20:55:54 -07:00
Adam Barth
65eba90843 Rename package:sky to package:flutter 2015-10-09 20:44:52 -07:00
Adam Barth
5b37f8750d Rename dart:sky to dart:ui 2015-10-09 19:27:13 -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
Adam Barth
cc809491ba Split material design widgets out of widgets.dart
These are now part of material.dart.
2015-10-09 10:07:06 -07:00
Hixie
892d60d538 Have Flat buttons set their default text styles.
Also, have dialog buttons use the accent colour.
Also, generally rationalise some of this stuff to match Material better.
2015-10-08 16:49:57 -07:00
Viktor Lidholt
ecd20b6fa3 Merge pull request #1541 from vlidholt/master
Adds support for keeping track of contact points in physics
2015-10-08 16:20:40 -07:00
Viktor Lidholt
333c8f5f10 Updates sprite physics test 2015-10-08 16:13:56 -07:00
Adam Barth
3308ff0026 Remove ButtonState
Clients should just use a GestureDetector (or an InkWell) instead.
2015-10-08 10:26:34 -07:00
Hans Muller
09d26302cb IndexedStack
Added horizontal and vertical alignment properties to Stack so that the origin of non-positioned children can be specified. Currently all of the non-positioned children just end up with their top-left at 0,0. Now, for example, you can center the children by specifying verticalAlignment: 0.5, horizontalAlignment: 0.5.

Added IndexedStack which only paints the stack child specified by the index property. Since it's a Stack, it's as big as the biggest non-positioned child. This component will be essential for building mobile drop down menus.

Added a (likely temporary) example that demonstrates IndexedStack.
2015-10-08 10:21:24 -07:00
Hixie
d45bf1457c HomogeneousViewport support for Theme.of()
Previously, RenderObjectElements didn't support being marked dirty. This
is fine, except for MixedViewport and HomogeneousViewport, which have
builder functions to which they hand themselves as a BuildContext. If
those builder functions call, e.g., Theme.of(), then when the theme
changes, the Inherited logic tries to tell the RenderObjectElement
object that its dependencies changed and that doesn't go down well.

This patch fixes this by making RenderObjectElement a BuildableElement,
and making MixedViewport and HomogeneousViewport hook into that to
rebuild themselves appropriately.

Also, this was only found at all because ThemeData didn't implement
operator==, so we were aggressively marking the entire tree dirty all
the time. That's fixed here too.

Also, I changed card_collection.dart to have more features to make this
easier to test. This found bugs #1524, #1522, #1528, #1529, #1530, #1531.
2015-10-07 15:53:50 -07:00
Hans Muller
56d9d85f2a Remove PopupMenu margin
The margins make using showMenu's menuPosition argument difficult and they're not really needed.

I also made a few small gratuitous changes in navigator.dart.
2015-10-06 10:55:31 -07:00
Adam Barth
2d0d1645be Merge pull request #1503 from abarth/simplify_scaffold
Simplify Scaffold
2015-10-06 10:09:35 -07:00
Adam Barth
932626aad1 Merge pull request #1504 from abarth/tab_shadow
ToolBar with a TabBar shouldn't have a shadow
2015-10-06 10:08:11 -07:00
Adam Barth
89a09822bf Simplify Scaffold
Rather than using a custom render object, we can just use a Stack.
2015-10-06 10:06:17 -07:00
Viktor Lidholt
a07cb95ec2 Merge pull request #1506 from vlidholt/master
Fixes to demo game
2015-10-06 09:57:21 -07:00
Viktor Lidholt
018cef6160 Adds default text style 2015-10-06 09:28:05 -07:00
Adam Barth
6cf105fe3e ToolBar with a TabBar shouldn't have a shadow
This patch makes the level of the ToolBar configurable. I've also cleaned up
the Tab code slightly.

For some reason, there's still a hairline between the ToolBar and the TabBar.
We might need to rethink how we draw the background a bit here.

Fixes #1454
2015-10-05 23:41:14 -07:00
Ian Hickson
012c5d94a1 Merge pull request #1496 from Hixie/focus
Fix Focus
2015-10-05 17:32:52 -07:00
Adam Barth
2eec30111a Use Navigator to drive SnackBar
Now SnackBar is an ephemeral route that uses a Placeholder to put itself into
the Scaffold.

Fixes #673
2015-10-05 17:12:50 -07:00
Hixie
fbf8174c87 Fix Focus
Focus.at() and company should be on Focus, not FocusState.

_notifyDescendants() was using the wrong runtimeType.

Let InheritedWidget update the descendants during build.

When you setState() during build, assert that you're not
markNeedsBuild()ing someone who isn't a descendant.

Typo in Widget.toString().
2015-10-05 16:41:50 -07:00
Hixie
90a0f6300f Simplify the usage of Navigator's routes argument
(These are changes cherry-picked from in-flight branches since they are
more independent and could be helpful even without those changes.)

- Change RouteBuilder's signature to take a single argument in which the
  other fields are placed, so that we can keep iterating on those
  arguments without having to break compatibility each time. Also, this
  makes defining route builders much simpler (only one argument to
  ignore rather than a variable number).

- Expose the next performance to RouteBuilders, since sometimes the
  route itself might not be where it's used.

- Allow BuildContext to be used to walk children, just like it can for
  ancestors

- Allow BuildContext to be used to get the Widget of the current
  BuildContext

- Allow StatefulComponentElement to be referenced with a type
  specialisation so that you don't have to cast when you know what the
  type you're dealing with actually is.
2015-10-05 13:59:30 -07:00
Viktor Lidholt
3fb3ec5a43 Merge pull request #1492 from vlidholt/master
Handle removal of sprite physics bodies during the physics simulation
2015-10-05 13:51:55 -07:00
Viktor Lidholt
ab104c809d Handle removal of sprite physics bodies during the physics simulation 2015-10-05 13:47:51 -07:00
Adam Barth
3a31f5f772 Give Interval a Curve to apply between start and end
This patch simplifies AnimationTiming and all the AnimatedValue base classes.
Also, make PopupMenu a stateless component because it has no state.

Fixes #1168
2015-10-05 12:10:48 -07:00
Adam Barth
3f82552d22 Improves names of animation classes
Fixes #1170
2015-10-05 10:51:43 -07:00
Adam Barth
bc9d004cf0 Merge pull request #1483 from abarth/drawer_fail
Convert Drawer to using navigator
2015-10-05 10:27:53 -07:00
Adam Barth
49c4787698 Convert Drawer to using navigator
This patch converts drawer to using the "openDialog" pattern for managing its
state. Currently, the drawer entrance and exit animation aren't integrated with
the navigator's animation system because the drawer's animations can be stopped
and reversed, which the navigator can't yet understand. That means dismissing
the drawer via the system back button causes the drawer to be removed
instanteously.

Fixes #715
Fixes #1187
2015-10-05 10:24:19 -07:00
Adam Barth
6d65bfc9ac Merge pull request #1479 from mdakin/simplfy_digger
Simplfy resetting board and mine generation.
2015-10-04 15:21:53 -07:00
Mehmet Akin
8fdd8cb580 Fix indent. 2015-10-03 22:56:30 +02:00
Adam Barth
db191e96bd Switch scheduler over to Duration
This patch prepares us to switch to using integers when handing off the
animation time from the engine to the framework.
2015-10-03 13:48:57 -07:00
Mehmet Akin
5287d13b35 Simplfy resetting board and mine generation. 2015-10-03 22:22:30 +02:00
Adam Barth
cf88993492 RenderInkWell should use gestures
After this patch, InkWell is driven by gesture recognizers, which lets us
cleanly cancel splashes when the user actually scrolls.

I've also refactored all the clients of InkWell to use InkWell to detect
gestures instead of wrapping InkWell in a GestureDetector.

Fixes #1271
2015-10-03 12:49:34 -07:00
Adam Barth
426ce9374e Clean up some style in GestureDetector
* Rename GestureTapListener (and friends) To GestureTapCallback to match the
   other gesture callbacks.
 * Replace "ensureFoo" pattern with ??= operator.
2015-10-02 23:50:23 -07:00
Adam Barth
e9aabcd5c6 Use }) : super consistently
Fixes #1372
2015-10-02 23:12:03 -07:00
Hans Muller
4de0a99b3f ShaderMask
The ShaderMask widget enables rendering its child with an alpha channel defined by a Shader. For example if the Shader was a linear gradient in alpha then the component behind the ShaderMask's child would appear wherever the gradient's alpha value was not fully opaque.

The card_collection.dart example demonstrates this. Select the "Let the sun shine" checkbox in the app's drawer.
2015-10-02 17:08:00 -07:00
Viktor Lidholt
75f10ba619 Updates work with latest Flutter changes 2015-10-02 15:10:02 -07:00
Viktor Lidholt
48a6cd839a Sprite physics, first iteration 2015-10-02 14:15:14 -07:00
Hixie
7734c0b0e0 Groundwork for heroes transition in Stocks app
Identify specific parts of a Stock row with a Global Key that can be
regenerated later, and pass that key back to event handlers so they can
use them to do the transition.
2015-10-02 10:20:08 -07:00
Hixie
894a1ca09f Draggable offsets and fix default drag feedback
You can now set an offset that will be used for the hit testing for
drops. (It doesn't move the feedback by default; use a Transform for
that.) I also made the default feedback not be Opacity 0.5 always.
2015-10-01 17:13:03 -07:00