Commit Graph

21 Commits

Author SHA1 Message Date
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
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
Adam Barth
65eba90843 Rename package:sky to package:flutter 2015-10-09 20:44:52 -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
Adam Barth
45c906d2ad Make fn3 the default widget framework 2015-10-01 09:48:35 -07:00
Adam Barth
cefbfa3bea Port Date Picker example to fn3 2015-09-24 14:46:29 -07:00
Hixie
ce28a7176e Replace Flex to Row and Column in tests and examples.
This still leaves Flex and FlexDirection available. At some point once
people have transitioned to Row/Column we should rename Flex to _Flex
and stop reexporting FlexDirection from basic.dart.
2015-08-26 09:05:14 -07:00
Adam Barth
dea3a0922c Add package:sky/rendering.dart
Similar to widgets.dart, rendering.dart exports the entire rendering layer.
Also, update the examples to use rendering.dart and widgets.dart. Also clean up
some exports so that the examples have more sensible imports.
2015-08-18 21:39:51 -07:00
Adam Barth
50bfdedbf4 Split box.dart into many files
Sadly, box.dart has grown much longer than 1000 lines. This patch splits it up
into several files based on the class hierarchy. Fortunately, many of these
classes are loosely coupled to each other.
2015-08-18 20:55:32 -07:00
Ian Fischer
d44ed7dfc3 Move example out of sky/packages to //examples 2015-08-07 17:04:50 -07:00
Ian Fischer
82404e030a Move sky/examples to sky/sdk/lib/example, and code changes to support that change. Fixes T277.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1218593002.
2015-06-26 15:06:40 -07:00
Hixie
1133260198 Remove keys from the examples.
TBR=abarth

Review URL: https://codereview.chromium.org/1194473004.
2015-06-17 15:23:41 -07:00
Adam Barth
99e115d06c Settings menu item in stock2 doesn't work
The underlying problem is that we lacked a RenderObjectWrapper for the
RenderView, which meant we couldn't handle changing the RenderObject that was
the root of the RenderView. This CL introduces a RenderViewWrapper and uses it
in a new AppContainer widget root. This change allows us to make App a
non-magical Component that is inserted into the AppContainer in the newly
introduced runApp function.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1184823006.
2015-06-17 12:36:56 -07:00
Hixie
db90d5f046 Rename UINode to Widget.
Also, move a widget example from examples/raw/ to examples/widgets/

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1190793002.
2015-06-16 11:09:16 -07:00
Adam Barth
4ca9ab2214 Give ParentDataNodes snappier names
FlexExpandingChild -> Flexible
StackPositionedChild -> Positioned

Also, name the child argument |child| for consistency.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1179763009.
2015-06-15 21:03:28 -07:00
Hixie
bb683e03f6 Make RaisedButton support being disabled.
R=jackson@google.com

Review URL: https://codereview.chromium.org/1179943005.
2015-06-15 17:32:13 -07:00
Adam Barth
17d3b4957a Rename all the things
This CL moves the bulk of the SkyView code out of the |framework| directory
because the |framework| directory was redundant in Dart package import
declarations.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1177383006.
2015-06-13 09:46:52 -07:00
Adam Barth
fe6fa66aab Rename widgets/wrappers.dart to widgets/basic.dart
Although the basic widgets are wrappers, that's an implementation detail and
shouldn't be encoded in the name of the library.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1182983002.
2015-06-12 22:16:48 -07:00
Hixie
ef1b69d757 Material and RaisedButton.
Make Material actually create material, with opinions about what that
means.

Make FloatingActionButton use this.

Make Scrollable use this.

Make BoxDecoration support drawing a circle instead of a rectangle, so
that floating action button doesn't need a custom painter.

Implement RaisedButton (and remove button.dart, since there's no
"button" in Material Design).

Make InkWell have a "child" argument instead of "children", and not
have it introduce a Flex into the hierarchy.

Update container.dart example. Clean up some imports.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1179713004.
2015-06-12 11:46:08 -07:00
Hixie
34e7b69a79 Add an example of an app that manipulates both a RenderObject tree and has some fn logic in it.
Also:
 - Make RenderProxyBox non-abstract
 - Upgrade the old container.dart example
 - Minor fixes to ui_mode.dart to make this work

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1183503003.
2015-06-11 13:08:00 -07:00
Hixie
5d676f8549 Refactor fn2.dart, since it breached our 1000-line threshold.
This moves input.dart to editing2/, since that way we can define the layering as strictly unidirectional.
It also reorders a bunch of imports to fit the style guide.
I removed the old remnants of the widgets example, and put the fn2 examples into the examples/widgets/ directory, to parallel the framework directory names.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1177243002.
2015-06-11 10:26:11 -07:00