Commit Graph

23 Commits

Author SHA1 Message Date
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
de395582d5 Add Navigator.of
Now you don't need to pass the navigator around everywhere.
2015-10-22 12:32:42 -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
27b5fc14a3 Scaffold should wrap its body in a Material
Fixes #1669
2015-10-19 12:11:10 -07:00
Adam Barth
65eba90843 Rename package:sky to package:flutter 2015-10-09 20:44:52 -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
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
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
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
45c906d2ad Make fn3 the default widget framework 2015-10-01 09:48:35 -07:00
Adam Barth
347bd25cb4 Remove BuildContext argument to initState
This argument isn't needed anymore now that State has a getter for context.
2015-09-30 13:15:46 -07:00
Adam Barth
83b7459201 Port even more examples to fn3 2015-09-24 16:09:37 -07:00
Hixie
c3b3b71bed Rename ComponentState and use initState().
ComponentState becomes State, for brevity.
Instead of overriding its constructor, override initState().
This makes writing States much simpler.
2015-09-24 16:00:51 -07:00
Adam Barth
7dd26a7a5a Port some more examples to fn3 2015-09-24 15:43:40 -07:00
Adam Barth
4467a268ce Move theme into material.dart
Also, introduce Colors and Typography to hold the material colors and the
typography declarations. Previously we expected clients of these libraries to
import them into a namespace, but that doesn't play nice with re-exporting them
from material.dart.
2015-09-18 09:57:21 -07:00
Adam Barth
b356d14635 Introduce package:sky/animation.dart
Move the animation libraries into src/animation and change importers to use
package:sky/animation.dart. Also, move scheduler.dart into the animation
library so that the animation library can be self-contained.
2015-09-08 09:44:01 -07:00
Adam Barth
d0ad775ef2 Remove lerp.dart
These functions are now in sky:dart.
2015-09-03 12:36:24 -07:00
Hans Muller
ed8c1cb69e Enable dynamic changes to itemsWrap in PageableList 2015-09-02 16:00:53 -07:00
Hixie
9047830c2e Rationalise the Key API.
Add a way of having keys based on numeric types or DateTimes by having a ValueKey<T> class.
Remove the redundant ways of declaring things, except for leaving one shorthand -- you can say `new Key(s)` instead of `new ValueKey<String>(s)`.
2015-08-28 13:17:34 -07:00
Hans Muller
c21fcf6210 Support ScrollableLists that wrap
Adds itemsWrap:bool (default false) to ScrollableList and PageableList. If itemsWrap is true then scrolling past the last item wraps around to the first. Similarly, scrolling before the first item wraps around to the last.

Added abstract ExtentScrollBehavior of ScrollBehavior. Renamed fields called contentsExtents to contentExtent, containerExtents to containerExtent, contentSize to contentExtent, etc.

BoundedBehavior is now a subclass of ExtentScrollBehavior.

Added UnboundedBehavior subclass of ExtentScrollBehvaior; contentExtent and maxScrollOffset are double.INFINITY, minScrollExtent is double.NEGATIVE_INFINITY.
2015-08-24 13:22:08 -07:00
Adam Barth
51c7194075 Add SetRequestedOrientation to Activity service
Fixes #743
2015-08-21 12:49:49 -07:00
Hans Muller
d662f7e6d2 Handle changes to scrollDirection in ScrollableList et al
Changed the pageable_list.dart example: tapping on the toolbar changes
the scroll direction. This exposed some problems:

- Scrollable.syncFields() didn't update scrollDirection
- Viewport updated its RenderObject fields in the wrong order
- FixedHeightScrollable scrollDirection changes didn't update the scrollBehavior

There may be similar problems with VariableHeightList and ScrollableViewport.
I will fix those in a separate CL.
2015-08-20 08:24:16 -07:00