1190 Commits

Author SHA1 Message Date
Adam Barth
4e6b5267d3 Makes it easier to hit IconButton
The right fix here is to use a radial reaction, but for now we can just make
the gesture detector including the padding acround the icon in its hit test
region.

Fixes #575
2015-11-30 17:38:26 -08:00
Adam Barth
6067b306dd Fix Input padding to match the material spec
Also, handle the case of "dense" input widgets that have less margin.

Fixes #626
2015-11-30 17:05:50 -08:00
Adam Barth
6fbe39e256 Merge pull request #645 from abarth/hide_text
Add input#hideText
2015-11-30 17:05:02 -08:00
Adam Barth
179d191e3a Add input#hideText
This feature can be used to implement password fields, where the user doesn't
want the text displayed on screen. Currently all the characters are hidden.
Eventualy we'll want to show the most recent character for some timeout.

Fixes #636
2015-11-30 16:56:38 -08:00
Hixie
f9ea1ce815 NavigatorTransaction
To make it easier to avoid pushing twice in one frame, provide a
transaction mechanism for the navigator.
2015-11-30 15:24:36 -08:00
Adam Barth
97cca4d47b Merge pull request #639 from abarth/default_enter_exit
Add a default onEnter/onExit for EnterExitTransition
2015-11-30 15:13:18 -08:00
Adam Barth
6f17228e43 Merge pull request #634 from abarth/popup_menu_align
PopupMenu shouldn't use CustomPaint
2015-11-30 15:13:02 -08:00
Adam Barth
e0f35a5f0d Add a default onEnter/onExit for EnterExitTransition
We now default to the identity transition.
2015-11-30 14:58:56 -08:00
Adam Barth
114135aadb Merge pull request #633 from abarth/fling_sheet_up
Bottom sheets shouldn't dismiss when flung up
2015-11-30 14:24:30 -08:00
Adam Barth
c810b0501f PopupMenu shouldn't use CustomPaint
Align is now powerful enough to do all the work we need to do here.
2015-11-30 14:23:14 -08:00
Adam Barth
7192dbb1c6 Bottom sheets shouldn't dismiss when flung up 2015-11-30 13:36:10 -08:00
Hixie
ce6a10412c New methods for manipulating Navigators.
* NavigatorState.replaceRouteBefore()
* NavigatorState.removeRouteBefore()
* NavigatorState.popUntil()
2015-11-30 13:33:15 -08:00
Hixie
d12539793a Add a "replace()" API for the navigator.
This lets you dynamically replace one route with another.
2015-11-30 12:42:55 -08:00
Hans Muller
9de4df1e8b TabNavigator animates selected TabView
The TabBar's selection is now represented by a TabBarSelection object which encapsulates both the previous and currently selected indices and the Performance used to animate the selection indicator.

Added a TabBarView class which displays a tab's contents. It uses a shared TabBarSelection to stay in sync with a TabBar. The TabBarView scrolls in sync with the TabBar when the selection changes. Eventually it will allow one to fling the selection forward or backwards.

Added a tabBar property to ToolBar. Typically the corresponding TabBarView will be the body of the toolbar's Scaffold.

Removed TabNavigatorView and TabNavigator.

Added a widget gallery tabs demo page. Removed the old tabs demo.
2015-11-30 12:13:17 -08:00
Adam Barth
33ca330797 Remove two unused imports 2015-11-26 19:20:30 -08:00
Adam Barth
3fbfe732f4 Properly paint disabled switches
Also, refactor more common code into RenderToggleable and handle dark themes
more correctly.

Fixes #601
2015-11-26 11:50:15 -08:00
Adam Barth
3f06da0eaa Improve Material selection controls
- These controls now have proper radial reactions.
 - You can drag the switch.
 - The radio button animates properly.
 - There's a demo in the Material Gallery
2015-11-26 01:54:34 -08:00
Adam Barth
09cf84d9b6 Move RenderTogglable to material.dart
Fixes #219
2015-11-25 23:15:17 -08:00
Ian Hickson
77cf420aab Merge pull request #597 from Hixie/fractional-offset-operators
Operators needed to lerp a FractionalOffset.
2015-11-25 18:07:49 -08:00
Ian Hickson
6e73bbcc99 Merge pull request #595 from Hixie/trivial-cleanup
Fix minor typos and style nits.
2015-11-25 18:07:33 -08:00
Hixie
a03757e443 Operators needed to lerp a FractionalOffset.
Without this, you can't use AnimatedValue<FractionalOffset>, because its
lerp() function uses the operators.
2015-11-25 17:15:00 -08:00
Hixie
993a41a452 Fix minor typos and style nits. 2015-11-25 17:03:37 -08:00
Hixie
4e513822ef Turn the LocalHistoryRoute into a mixin. 2015-11-25 17:00:05 -08:00
Hixie
88e74693ae Clean up the Navigator API again.
* Split didPush() into didPush() and install(), so that we can install
  the overlays without triggering the push logic. This will be used in a
  subsequent patch to implement route replacement.

* Split didPop() into didPop() and dispose(), so that we can remove
  overlays without triggering the pop logic. Also for a subsequent patch
  that implements replacement.

* Clean up _navigator on the routes when the Navigator itself is
  disposed.

* Drop the forwarding logic on willPushNext() -- now didPushNext() --
  and didPopNext(), since we no longer have StateRoutes to get in the
  way.

* Implement isCurrent more broadly and without having to keep track of
  state.

* Provide some toString()s on NamedRouteSettings and ModalRoutes.

* Make OverlayState.initState() use the insertAl functionality.

* Make OverlayRoute.builders abstract since that way you'll catch when
  you forget to do it. If you don't want overlays, don't inherit from
  this class.

* Made handleStatusChanged() on TransitionRoute public so that it can be
  overridden by subclasses.
2015-11-25 16:30:46 -08:00
Adam Barth
4fa24f5695 Animate slider radial reaction
Also, have the slider draw different in its disabled state.
2015-11-25 15:01:36 -08:00
Adam Barth
abce0533b4 Merge pull request #587 from abarth/sliders
Add a basic material slider
2015-11-25 12:34:09 -08:00
Adam Barth
0c0ae4a1a2 Merge pull request #584 from abarth/time_picker
Finish TimePicker
2015-11-25 12:31:10 -08:00
Adam Barth
e9d911f5ea Add a basic material slider
The slider in this patch works, but it's missing animations and many subtle
touches.
2015-11-25 12:27:57 -08:00
Adam Barth
72d2706ee1 Finish TimePicker
After this patch, TimePicker should work correctly.

Fixes #559
2015-11-25 11:17:54 -08:00
Hixie
9c5c511517 Opacity was dropping stuff on the floor.
Turns out we passed the wrong bounds to the PaintingContext constructor.

Fix, and assert that we don't do that again.
2015-11-25 11:00:02 -08:00
Adam Barth
860547c1d4 Add support for system-level routing
Now you can supply a route argument to flutter start:

  $ flutter start --route /foo

which will start the app at /foo instead of /.
2015-11-24 16:13:20 -08:00
Adam Barth
717b921194 Teach the TimerPicker how to pick a time
The TimePicker can now actually pick a time. However, it doesn't understand AM
or PM and there's lots of visual polish missing.
2015-11-24 12:48:33 -08:00
Hixie
8218a13aa4 Remove StateRoutes 2015-11-24 10:31:01 -08:00
Adam Barth
f91c3dfb7e Merge pull request #562 from abarth/time_picker
Start working on a TimePicker
2015-11-23 21:01:18 -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
Hixie
40f5c5e2b9 Expose the navigator in routes. 2015-11-23 17:08:42 -08:00
Adam Barth
048400b396 Merge pull request #557 from abarth/picker_demo
Integrate Date Picker into material_gallery
2015-11-23 16:00:02 -08:00
Adam Barth
b17fe3afb2 Integrate Date Picker into material_gallery 2015-11-23 15:55:03 -08:00
Adam Barth
a35344f439 Fix upload of composited scene with non-zero offsets
We weren't correctly offsetting the clips when uploading composited scenes. Now
we apply the proper offsets.
2015-11-23 15:44:41 -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
Ian Hickson
ebf032b82a Avoid using transforms when simple offsets will do. 2015-11-21 20:59:26 -08:00
Ian Hickson
1211dd2302 Merge pull request #539 from Hixie/clean-up-modal
Clean up the term "modal" in the navigator
2015-11-21 16:45:17 -08:00
Ian Hickson
377c74f715 Merge pull request #538 from Hixie/overlay-route-insert-all
Provide a way to insert multiple overlays at once.
2015-11-21 16:45:15 -08:00
Hixie
aef60030be Provide a way to insert multiple overlays at once. 2015-11-21 16:04:40 -08:00
Hixie
752e8677bd Assert: don't push a PageRoute over a PopupRoute.
"Fixes" #389.
2015-11-21 16:04:33 -08:00
Hixie
c51260ac96 Clean up the term "modal" in the navigator
Now we only use it for things related to ModalRoute and ModalBarrier.

(This is easy now that ephemeral routes are gone, so there's no other
kind of route to distinguish against.)
2015-11-21 16:04:22 -08:00
krisgiesing
e0f484a8b9 Merge pull request #480 from krisgiesing/linux-ime
Use embedder to fetch keyboard service
2015-11-20 16:21:29 -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
Ian Hickson
de77264749 Merge pull request #525 from Hixie/yak3-routes-typed
Give type arguments to routes.
2015-11-20 14:23:10 -08:00