814 Commits

Author SHA1 Message Date
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