415 Commits

Author SHA1 Message Date
Hixie
386ba7e8d9 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
f64f9fd0ef Fix updater. It was looking for the wrong files. 2015-11-05 17:56:50 -05:00
Viktor Lidholt
c225a6af24 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
f072fca3bc added ToolBar.withSizeOffsets() 2015-11-03 14:16:45 -08:00
Hans Muller
a1274736fe message string 2015-11-03 14:16:45 -08:00
Hans Muller
faa349af26 Extended height toolbar 2015-11-03 14:16:45 -08:00
Hixie
38c69e7408 Convert the scale demo to a general gestures demo. 2015-11-03 12:26:02 -08:00
Adam Barth
58f41e2e84 Rev pubspecs 2015-11-02 13:19:55 -08:00
Adam Barth
ecf6a19ed0 Merge pull request #1899 from abarth/flutter_yaml
Rename sky.yaml to flutter.yaml
2015-11-02 13:13:48 -08:00
Adam Barth
05d03e5861 Rename sky.yaml to flutter.yaml
More flutter more better.
2015-11-02 12:57:27 -08:00
Adam Barth
31e0378014 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
57fc7430f9 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
d61e39c739 Fixes navigation back to main menu in demo game 2015-10-30 16:13:26 -07:00
Adam Barth
1d3a7dae53 Switch to Navigator2 2015-10-29 23:18:56 -07:00
Hixie
51c851e3d5 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
92b9815ff0 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
69f0e989a5 Merge pull request #1862 from abarth/navigator2
Add an initial implementation of Navigator2
2015-10-28 17:00:12 -07:00
Hans Muller
8a32341cbe Merge pull request #1860 from HansMuller/tabs
Correct TabNavigatorWidth, tabs.dart example
2015-10-28 16:40:50 -07:00
Adam Barth
a694f51e99 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
22313d59df Correct TabNavigatorWidth, tabs.dart example 2015-10-28 16:26:22 -07:00
Hixie
46f19afade 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
7aebaa00f4 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
dbc0cfd116 Media query class for querying viewport information 2015-10-28 12:34:57 -07:00
Hixie
c1de88233e 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
939835ea49 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
1e5b25be8c 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
4bbd3d543c Switch clients from ui.view to ui.window 2015-10-28 07:16:56 -07:00
Adam Barth
d25ff94259 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
0d1e58072b Add a position to the onTap callback
Fixes #1807
2015-10-27 14:12:54 -07:00
Viktor Lidholt
400ba1799e Merge pull request #1833 from vlidholt/master
Improves physics debug drawing
2015-10-27 14:08:05 -07:00
Ian Hickson
4b56dd50a0 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
6358ddfd62 Updates physics test to draw debug 2015-10-27 13:39:19 -07:00
Adam Barth
e448acb008 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
6e31784bf4 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
800ff311e7 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
de8f599a42 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
9b2da74531 Removing debug printout 2015-10-26 13:23:33 -07:00
Hixie
02f45a5d06 Port ensure_visible.dart to fn3.
This concludes the fn3 port!
2015-10-26 12:44:54 -07:00
Jason Simmons
05f2a0c406 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
3d99525620 Merge pull request #1776 from Hixie/stocks-back
Fix Stocks search mode back button.
2015-10-26 12:02:33 -07:00
Jason Simmons
c83bb78a94 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
f3f1fd8d7c 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
f2e7475e1a Fix Stocks search mode back button.
Back button wasn't reliably working in checked mode.
2015-10-25 18:31:03 -07:00
Hixie
a8bd598fc4 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
665ee8012a Merge pull request #1746 from vlidholt/master
Working node to physics world conversions
2015-10-23 13:48:45 -07:00
Viktor Lidholt
5d089f91b4 Removes debug printouts in sprite physics 2015-10-23 13:46:19 -07:00
Viktor Lidholt
5395b45172 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
1a5465c570 Delete OldTextPainter
Also, delete all references to DOM APIs.
2015-10-23 12:07:55 -07:00
Chinmay Garde
877add6835 Avoid building the fitness app on iOS due to build errors 2015-10-22 17:50:58 -07:00
Jim Beveridge
98954be8ab Merge pull request #1717 from jimbeveridge/piano
Fix slow sound init in piano sample app
2015-10-22 15:23:32 -07:00