3784 Commits

Author SHA1 Message Date
Fahad
4a1e660a0d Documentation fix in StatefulWidget class (#10373)
Replace a misplaced StatelessWidget class with StatefulWidget class
2017-05-28 21:30:36 -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
Jacob Richman
56a556e69f Add more tests of toStringDeep. (#10346)
* Add more tests of toStringDeep.

These tests will help ensure toStringDeep behavior is not regressed
by refactoring toStringDeep to support structured data.
2017-05-26 12:42:29 -07:00
Mikkel Nygaard Ravn
c06dce4718 Add more docs for MethodChannel.invokeMethod (#10345) 2017-05-26 19:39:52 +02:00
Mikkel Nygaard Ravn
c11d1318f8 Fix error in sample code (#10339) 2017-05-26 19:32:29 +02:00
Robert Felker
e9d50f8aeb Typo to associated (#10340) 2017-05-26 10:32:06 -07:00
Mary
f375b5acee Remove duplicated word "space" from docstrings (#10328) 2017-05-26 09:44:46 -07:00
Michael Goderbauer
307f3569a2 Include Semantics Node in debugDumpRenderTree, if available (#10338)
Makes debugging semantics easier (e.g. which RenderObject has semantics, where is a SemanticNode seen in the semantic tree comming from, etc).

It's only printed if accessibility is turned on.
2017-05-26 09:31:39 -07:00
Chris Bracken
9452a3448c Support inactive, suspending AppLifecycleStates (#10306)
* Rolls the engine to 75c74dc463d56e17be10315cfde409010fd8f90b.
* Adds framework support for the `AppLifecycleState.inactive` and `AppLifecycleState.suspending` states.

What are the new states?
------------------------
* `AppLifecycleState.inactive` is emitted on iOS only and corresponds to iOS's foreground inactive state. Current iOS state transitions are:
`resumed` <--> `inactive` <--> `paused`

* `AppLifecycleState.suspending` is currently emitted on Android only and corresponds to the
transition to Android's stopped state. Current Android state transitions are:
`resumed` <--> `paused` --> `suspending` --> `resumed`

These transitions may change in future.

This is a breaking change on iOS
--------------------------------

This changes the semantics of the `AppLifecycleState.paused` state on
iOS. The behaviour associated with this state is unchanged on Android.

For background on iOS application states see the state transition
diagram in the [App Programming Guide for iOS](https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/TheAppLifeCycle/TheAppLifeCycle.html#//apple_ref/doc/uid/TP40007072-CH2-SW6).

On iOS, prior to this change, `AppLifecycleState.paused` corresponded to
a transition to the _foreground inactive_ state. It now corresponds to a
transition to the _background state_. The newly-added
`AppLifecycleState.inactive` state now corresponds to entering the
_foreground inactive_ state, which (currently) has no exact analogue on
Android.

Briefly, the _foreground inactive_ state is the state entered when
switching from an app to the app switcher, receiving a phone call, or
responding to a TouchID request. Apps are permitted to continue
animating/updating views in this state if desired. From the _foreground
inactive_ state, the app may transition back to _active_ (e.g., entering
the app switcher then resuming the app), or to the _background_ state
(e.g., switching to the home screen or another app).

What to change
--------------
If your app does not handle the `AppLifecycleState.paused` state in a
`WidgetsBindingObserver.didChangeAppLifecycleState` implementation, no
changes are required.

If you do handle `AppLifecycleState.paused`, you may additionally wish
to also handle `AppLifecycleState.inactive`. For example, games should
probably pause on entering the app switcher rather than wait to be
backgrounded.

More details
------------
For background on Android application states see the state transition
diagram in the [Android Activity Lifecycle docs](https://developer.android.com/guide/components/activities/activity-lifecycle.html#alc).
2017-05-25 10:52:21 -07:00
Chris Bracken
7566f73d0d Simplify MemoryPressureObserver test (#10308) 2017-05-24 18:18:53 -07:00
Hans Muller
07e8a62cc5 Updated removeRoute doc (#10300) 2017-05-24 16:14: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
Ian Hickson
f53d0fece2 Add some documentation for RenderSliver. (#10272) 2017-05-24 11:02:04 -07:00
Ian Hickson
51ba6b377b Fix DecorationImage.centerSlice (#10257)
...and rearrange a bunch of code so that all these arguments/members
are always in the same order.
2017-05-24 10:45:28 -07:00
Jason Simmons
61e938aa1e Avoid divide by zero in scroll thumb rectangle calculations (#10271) 2017-05-24 09:52:09 -07:00
Devon Carew
230f108156 expose debugPaintBaselinesEnabled (#10276)
* expose debugPaintBaselinesEnabled

* Update binding.dart

review comments
2017-05-23 21:39:37 -07:00
Ian Hickson
d4828986a6 More docs about keys. (#10282)
I added a bunch of sample code to the core Widget subclasses so that
people would see that you are supposed to always include the `key`
argument.
2017-05-23 20:09:13 -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
Chris Bracken
48237d54c1 Small doc clarification to HapticFeedback.vibrate (#10217)
Eliminate the implementation detail of which function is called to
trigger vibration on iOS, instead report the vibration constant.

Also note that not all iOS devices support haptic feedback (e.g., older
iPod touch devices).
2017-05-19 14:50:11 -07:00
Chris Bracken
c9d21ecd24 Add FlutterLogoDecoration tests (#10209)
Covers FlutterLogoDecoration.lerp()

Disabling const constructor lint for the test values pending resolution of
https://github.com/dart-lang/sdk/issues/26980
2017-05-19 13:40:59 -07:00
Ian Hickson
f50fe13ff1 Fix flip-flop behaviour with two competing taps (#10151) 2017-05-19 09:25:55 -07:00
Ian Hickson
cd6e3b1ac2 CheckboxListTile, RadioListTile, SwitchListTile (#10160) 2017-05-19 08:46:17 -07:00
Collin Jackson
04923d330a Merge branch 'alpha' 2017-05-18 18:11:49 -07:00
Collin Jackson
973304d5fb Fix sliver padding assertion failure that sometimes happens during startup because the app is temporarily built with zero size 2017-05-18 17:58:24 -07:00
Hans Muller
8364ac5b00 Fixed dartdoc related to SliverPrototypeExtentList and renamed the source file (#10174) 2017-05-18 14:41:55 -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
xster
f3a27e66fe add doc details (#10136) 2017-05-16 21:30:46 -07:00
Ian Hickson
940473e5d6 Don't crash if Slider is given an empty range. (#10133)
Instead just disable the slider.

Fixes https://github.com/flutter/flutter/issues/10055
2017-05-16 19:35:01 -07:00
Ian Hickson
8b5ece7ca9 Report semantics geometry in physical units. (#10094)
Previously we used logical pixels. This made the accessibility metrics
tiny on modern devices, since the OS works in physical units.

Also add a bit more debugging info and some docs.
2017-05-16 16:43:22 -07:00
Adam Barth
20cc29cd62 Propagate notifications when onNotification returns null (#10081)
Previously we threw an exception to require a non-null value. Now we
just treat null as the common case of not stopping propagation.
2017-05-16 15:11:11 -07:00
Ian Hickson
63cfe1e30d Add strokeWidth to the paints matcher (#10121) 2017-05-16 14:17:41 -07:00
Hans Muller
765e5d5b5b Added SliverPrototypeExtentList et al (#10097) 2017-05-16 11:56:55 -07:00
Ian Hickson
7eef73dd00 Answer the question of why icon buttons are 48x48. (#10117) 2017-05-16 11:36:12 -07:00
Ian Hickson
ce2c834f70 Adjust the tests to handle a higher-DPI test harness. (#10056)
Requires https://github.com/flutter/engine/pull/3688
2017-05-15 16:47:14 -07:00
Ian Hickson
abeb164fe2 Add intrinsic dimensions to RenderEditable (#10093)
Also:

* Make TextPainter.preferredLineHeight honour root fontSize

* Remove bogus docs.

* More aggressively track dirty state for RenderEditable.

* Some tests.
2017-05-15 14:06:58 -07:00
Mikkel Nygaard Ravn
5bdd80d085 Update docs/sample code for async widgets (#10029) 2017-05-15 15:19:45 +02:00
Adam Barth
49b183c502 Estimate the brightness of the primary color (#10071)
If the caller doesn't explicitly give the brightness of the primary
color, we now estimate it using an algorithm from the Web Content
Accessibility Guidelines.

Also, this patch contains a function that converts RGB colors to
HSVColors. I was originally going to use that, but the WCAG algorithm
ended up seeming like a better choice. The patch still includes this
function because it's generally useful.

Fixes #5718
2017-05-14 10:09:52 -07:00
Adam Barth
4b7a1912ee Add NavigatorState.pushAndRemoveUntil (#10026)
Fixes #9989
2017-05-12 17:45:17 -07:00
Ian Hickson
db84df230d Some tools to dump other trees. (#9999) 2017-05-12 15:51:58 -07:00
Jason Simmons
91b1a07656 Framework support for checkerboardOffscreenLayers (#10054)
See https://github.com/flutter/flutter/issues/9473
2017-05-12 14:41:07 -07:00
P.Y. Laligand
af4905ffbb Fixed analysis error. (#10035) 2017-05-12 10:03:18 -07:00