1056 Commits

Author SHA1 Message Date
Michael Goderbauer
fe40eed362 Provide haptic/acoustic feedback for tap & long-press on Android (#10920)
* Provide haptic/acoustic feedback for tap & long-press on Android

* review comments

* fixed example code

* review comments

* comment fix
2017-06-23 15:02:55 -07:00
Ian Hickson
9adb4a78a6 Deep linking: automatically push the route hiearchy on load. (#10894)
The main purpose of this PR is to make it so that when you set the
initial route and it's a hierarchical route (e.g. `/a/b/c`), it
implies multiple pushes, one for each step of the route (so in that
case, `/`, `/a`, `/a/b`, and `/a/b/c`, in that order). If any of those
routes don't exist, it falls back to '/'.

As part of doing that, I:

 * Changed the default for MaterialApp.initialRoute to honor the
   actual initial route.

 * Added a MaterialApp.onUnknownRoute for handling bad routes.

 * Added a feature to flutter_driver that allows the host test script
   and the device test app to communicate.

 * Added a test to make sure `flutter drive --route` works.
   (Hopefully that will also prove `flutter run --route` works, though
   this isn't testing the `flutter` tool's side of that. My main
   concern is over whether the engine side works.)

 * Fixed `flutter drive` to output the right target file name.

 * Changed how the stocks app represents its data, so that we can
   show a page for a stock before we know if it exists.

 * Made it possible to show a stock page that doesn't exist. It shows
   a progress indicator if we're loading the data, or else shows a
   message saying it doesn't exist.

 * Changed the pathing structure of routes in stocks to work more
   sanely.

 * Made search in the stocks app actually work (before it only worked
   if we happened to accidentally trigger a rebuild). Added a test.

 * Replaced some custom code in the stocks app with a BackButton.

 * Added a "color" feature to BackButton to support the stocks use case.

 * Spaced out the ErrorWidget text a bit more.

 * Added `RouteSettings.copyWith`, which I ended up not using.

 * Improved the error messages around routing.

While I was in some files I made a few formatting fixes, fixed some
code health issues, and also removed `flaky: true` from some devicelab
tests that have been stable for a while. Also added some documentation
here and there.
2017-06-23 14:58:29 -07:00
Jacob Richman
595cd23c8c Change all occurrences of '$runtimeType#$hashCode' to use the describeIdentity (#10888)
* Revert "Revert "Change all ocurrences of '$runtimeType#$hashCode' to use the idAndType method. (#10871)" (#10880)"

This reverts commit ceb814aa647ecd310794a72a7a5c28820ec57a25.
2017-06-21 10:47:06 -07:00
Jacob Richman
ceb814aa64 Revert "Change all ocurrences of '$runtimeType#$hashCode' to use the idAndType method. (#10871)" (#10880)
This reverts commit d46e208b98d4af93d7029c3e806d443dd51fd116.
2017-06-20 22:14:59 -07:00
Jacob Richman
d46e208b98 Change all ocurrences of '$runtimeType#$hashCode' to use the idAndType method. (#10871)
* Change all instances of '$runtimeType#$hashCode' to use the describeIdentity method.

The describeIdentity method generates a shorter description with a consistent length
consisting of the runtime type and the a 5 hex character long truncated
version of the hash code.
2017-06-20 18:13:28 -07:00
Jason Simmons
2052741ab3 Use a lookup table to calculate the number of days in a month (#10860)
Fixes https://github.com/flutter/flutter/issues/10541
2017-06-20 11:32:40 -07:00
Ian Hickson
6d32b33997 Text selection handles track scrolled text fields (#10805)
Introduce CompositedTransformTarget and CompositedTransformFollower
widgets, corresponding render objects, and corresponding layers.

Adjust the way text fields work to use this.

Various changes I needed to debug the issues that came up.
2017-06-20 09:35:15 -07:00
Hans Muller
40db1e4bc6 Added InputDecoration helperText, helperStyle (#10852) 2017-06-20 09:33:26 -07:00
Ian Hickson
409414265e Sample code for dialogs. (#10812) 2017-06-19 21:10:58 -07:00
Ian Hickson
41e1eb5c64 Various docs easy fixes (#10797) 2017-06-16 16:07:59 -07:00
xster
36c3a962c5 Create a CupertinoPageRoute (#10686)
* started copying stuff into cupertino page route

* extracted from material page route. Ready for testing

* works with button and gesture

* tests and docs

* review notes

* review notes
2017-06-14 23:33:14 -07:00
Hans Muller
7ada46677b TabPageSelector colors and indicatorSize (#10665) 2017-06-14 11:25:03 -07:00
Michael Goderbauer
7158646ba7 [accessibility] Announce index of tab in tab bar (#10664)
* [accessibility] Announce index if tab in tab bar

* added TODO
2017-06-14 08:08:24 -07:00
gspencergoog
9f344b695d Adds prefix and suffix support to TextField, per Material Design spec. (#10675)
* Prefix and Suffix support for TextFields

* Adding Tests

* Removing spurious newline.

* Fixing a small problem with the test

* Review Changes
2017-06-13 19:17:04 -07:00
Michael Goderbauer
0774c5194b Add SemanticsNode.isSelected flag (#10610)
* Add SemanticsNode.isSelected flag

* Adds example usage to TabBar

See also https://github.com/flutter/engine/pull/3764

* Review comments

* whitespace fixes

* Fix doc ref and update engine roll
2017-06-13 10:51:17 -07:00
Ian Hickson
1f4f75bb50 More documentation. (#10653) 2017-06-13 09:52:13 -07:00
Anatoly Pulyaevskiy
bb119e95fa Make dividers one device pixel thick as defined in Material design spec (#10523)
* Make dividers one device pixel thick as defined in Material design spec

* Updated divider test to check stroke width

* Clarified dividers with 0 height in the docs

* Updated Divider.height docs according to PR feedback
2017-06-12 21:47:56 -07:00
Ian Hickson
d74a5883d9 Allow multi-line text fields with no line limit (#10576) 2017-06-12 21:47:31 -07:00
Ian Hickson
db75aa768c Fix analyzer errors in sample code (#10648) 2017-06-12 19:46:38 -07:00
Ian Hickson
9ac16680d2 Analyze sample code (#10619) 2017-06-12 16:52:35 -07:00
Hans Muller
123e9e013d Allow TabBars, TabBarViews, TabControllers, with zero or one tabs (#10608) 2017-06-12 15:44:33 -07:00
Hans Muller
09eba82a9e Add indicatorWeight, indicatorPadding to TabBar (#10600) 2017-06-09 15:06:03 -07:00
perlatus
0cef0aaf35 Check for initialRoute before Navigator.defaultRouteName (#10216)
* Check for initialRoute before Navigator.defaultRouteName

* Default initialRoute to Navigator.defaultRouteName

* Take suggestions from code review

* Add test for old and new routes behavior

* Revert "Add test for old and new routes behavior"

This reverts commit 282fb64b165ed532583e9a5d2e4debe29469fba4.

* Retry: without dartfmt, with dartanalyzer

* Rename tests, check the routes are taken

* Fix flutter analyze --flutter-repo warnings

* Add test for initial vs default route

* Update test and fix analyzer warnings

* Add test for initial route only being used initially
2017-06-07 18:32:29 -07:00
Ian Hickson
46b316c490 Change RawGestureDetector API to be better for strong mode Dart. (#10553) 2017-06-07 18:04:46 -07:00
Michael Goderbauer
3a23419d84 Hide the Scaffold's scroll-to-top button from accessibility (#10539)
It's redundant as iOS accessibility automatically includes this action on the clock in the status bar.
2017-06-06 14:07:53 -07:00
Ian Hickson
6f824bcec9 More documentation (#10519) 2017-06-05 22:44:49 -07:00
Ian Hickson
ca4f4fc8d1 Make the Brightness estimator public (#10508) 2017-06-05 13:15:43 -07:00
Ian Hickson
2ff2274cd3 Make ColorSwatch more general, and test it (#10505) 2017-06-05 13:14:11 -07:00
Alexandre Ardhuin
69e235389d apply prefer_asserts_in_initializer_list lint (#10482) 2017-06-05 09:28:51 +02:00
Alexandre Ardhuin
c55097da7d apply prefer_asserts_in_initializer_list lint (#10463) 2017-06-03 06:05:09 +02:00
Michael Goderbauer
104725f384 Adds a widgets that blocks all semantics of widgets below it in paint order within the same container (#10425) 2017-06-02 18:14:27 -07:00
xster
a8777ce6b0 CupertinoNavigationBar part 1 - extract common layout logic (#10337)
Extract layout logic in material app bar to a common file that can be reused for cupertino
2017-06-01 16:24:14 -07:00
Ian Hickson
1b9c6a6835 More documentation (#10426) 2017-06-01 12:58:34 -07:00
xster
c168afc070 Fix performance regression with _InheritedTheme (#10311)
Check ThemeData instead of Theme.
2017-05-31 11:19:37 -07:00
Ian Hickson
ccad2849e7 Docs for menus (#10396)
Also, clean up the menus code a bit.

Also, make it easier to write a PopupMenuEntry that has itself many
items (for example, the way Chrome's menu has icons in a row).
2017-05-31 10:48:49 -07:00
Ian Hickson
f437d025b8 Minor documentation fixes (Material, Column) (#10365) 2017-05-27 16:59:45 -07:00
Ian Hickson
e548d46562 Document GridPaper (#10357) 2017-05-27 16:59:01 -07:00
Ian Hickson
767ab66c25 Fix dartdocs (#10361)
You can't have a newline between the `]` and the `(` in an image in markdown it turns out.
2017-05-27 00:45:25 -07:00
Ian Hickson
f50caddfbd Much work on the documentation (#10331)
Minor fixes throughout, e.g. removing trailing commas from the end of sample code expressions, changing headings to "sample code" more consistently, removing stale todos, fix typos in a private method name, minor grammar fixes, added some clarifications to CircularProgressIndicator, LinearProgressIndicator, CrossAxisAlignment, added some cross-references to various members, made it slightly clearer that layout algorithms are implementation details.

Clarified "elevation" throughout.

Added docs to InkResponse and InkWell.

Added sample code for: SliverAppBar, Card, ListTile, EdgeInsets, Row, Column, CustomScrollView, ListView, SliverFixedExtentList, and SliverGrid.

Fixes #10317.
Fixes #10316.
Fixes #10267. (sort of, see comment therein)
Fixes #9331. (sort of, see comment therein)
Fixes #9407. (sort of, see comment therein)
2017-05-26 17:15:09 -07:00
Hans Muller
0cadbce490 Added Navigator.removeRoute() (#10298) 2017-05-24 15:16:03 -07:00
xster
69c2542458 CupertinoTabBar (#10264)
Move some Cupertino colors to a common file. 

Create a CupertinoTabBar widget to mimic iOS looks
2017-05-24 12:23:15 -07:00
Jason Simmons
61e938aa1e Avoid divide by zero in scroll thumb rectangle calculations (#10271) 2017-05-24 09:52:09 -07:00
Ian Hickson
f9d24f652b More docs. (#10214) 2017-05-23 19:19:00 -07:00
Ian Hickson
59025702db AppBar: fix bugs, add docs, add samples (#10223)
I added some tests for the bug that I fixed.
I added docs for IconButton and AppBar.
I added some new constructors for FractionalOffset.
2017-05-23 17:48:54 -07:00
Hans Muller
04d418beac Correct the initial rendering of non-scrollable dropdown menus (#10255) 2017-05-23 16:55:57 -07:00
xster
40b67bb187 Move icons stuff from material to widget (#10192)
Moved everything icons related except the material icon button and the materialicon font list to widget
2017-05-21 16:57:31 -07:00
Adam Barth
81b76c2bb8 Make CircularProgressIndicator's stroke width configurable (#9794)
Fixes #9062
2017-05-19 21:56:07 -07:00
xster
95e9e7e9e7 Theme inserts IconTheme into tree (#10179)
* Let Theme insert an IconTheme into the widget tree

* flip the order, no real reason

* Let icon theme use its own fallback

* review notes

* more review notes
2017-05-19 18:36:50 -07:00
Ian Hickson
cd6e3b1ac2 CheckboxListTile, RadioListTile, SwitchListTile (#10160) 2017-05-19 08:46:17 -07:00
Ian Hickson
61c56ba15f Make Slider take up whatever space it has. (#10132)
Previously it was (arbitrarily?) set to 144.0 pixels wide.
2017-05-17 14:31:55 -07:00