- 20 Dec, 2023 1 commit
-
-
Michael Goderbauer authored
These were not ignoring anything (anymore).
-
- 07 Oct, 2023 1 commit
-
-
Mateus Felipe C. C. Pinto authored
Simplify assertion in `AsyncSnapshot`. Fixes #135731.
-
- 27 Sep, 2023 1 commit
-
-
Casey Rogers authored
This is a tiny tweak to replace some top level if clauses with guard clauses in `FutureBuilder`. I find the resultant code much more readable, but this is a matter of taste and I didn't see any info one way or another on it in the style guide so let me know if this is not to your all's preference.
-
- 20 Sep, 2023 1 commit
-
-
Greg Spencer authored
## Description This removes all of the comments that are of the form "so-and-so (must not be null|can ?not be null|must be non-null)" from the cases where those values are defines as non-nullable values. This PR removes them from the widgets library. This was done by hand, since it really didn't lend itself to scripting, so it needs to be more than just spot-checked, I think. I was careful to leave any comment that referred to parameters that were nullable, but I may have missed some. In addition to being no longer relevant after null safety has been made the default, these comments were largely fragile, in that it was easy for them to get out of date, and not be accurate anymore anyhow. This did create a number of constructor comments which basically say "Creates a [Foo].", but I don't really know how to avoid that in a large scale change, since there's not much you can really say in a lot of cases. I think we might consider some leniency for constructors to the "Comment must be meaningful" style guidance (which we de facto have already, since there are a bunch of these). ## Related PRs - https://github.com/flutter/flutter/pull/134984 - https://github.com/flutter/flutter/pull/134991 - https://github.com/flutter/flutter/pull/134993 - https://github.com/flutter/flutter/pull/134994 ## Tests - Documentation only change.
-
- 02 May, 2023 1 commit
-
-
Casey Rogers authored
cc'ing existing conversation participants: @domesticmouse @srawlins cc'ing to request review: @goderbauer This PR makes the following constructor arguments required: 1. `FutureBuilder.future` 2. `StreamBuilderBase.stream` 3. `StreamBuilder.stream` This fixes: https://github.com/flutter/flutter/issues/83081 https://github.com/flutter/flutter/issues/125188 (dupe of 83081) This obviates: https://github.com/dart-lang/linter/issues/4309 (I suggest we skip straight to merging this PR as this should be a low impact breaking change-assuming few to no devs are intentionally using the builders without their relevant arguments, however we could always merge 4309 first and then this) https://github.com/flutter/flutter/pull/83101 (The above PR required that at least one of future and initial data be non-null, this is undesirable as there are plenty of valid reasons to have both arguments be null) See above issues for a deeper dive, but here is a summary: It is very easy for a developer to forget to specify `future` or `stream` when using the respective `*Builder` widgets. This produces a non-obvious failure where the UI sits in a "no data yet received" state. It is easy for a dev to misinterpret this as the async work backing the future/stream hanging and they thus waste a lot of time trying to debug the async work. As such, we should require these two constructor arguments to make it impossible/much harder for devs to make this time-wasting mistake. This is a breaking change. However, it should break only a small number of active projects given that using a builder without specifying `future` or `stream` seems highly niche. The only place I've found non-accidental examples of this is in widget tests where you're calling `pumpWidget` with and without these arguments to test `*Builder.didUpdateWidget`'s behavior. In this and similar cases, it is a trivial fix to add `future: null`/`stream: null`. *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
-
- 22 Mar, 2023 1 commit
-
-
Ian Hickson authored
Documentation improvements
-
- 17 Mar, 2023 1 commit
-
-
Cc authored
Co-authored-by:
Casey Hillers <chillers@google.com>
-
- 25 Jan, 2023 1 commit
-
-
Todd Volkert authored
* Add Decoding Flutter videos to API docs * Review comments * Update widget of the week videos too
-
- 24 Jan, 2023 1 commit
-
-
Michael Goderbauer authored
* dart fix --apply * manual fixes
-
- 21 Dec, 2022 1 commit
-
-
Michael Goderbauer authored
-
- 03 Dec, 2022 1 commit
-
-
Todd Volkert authored
(and remove one video that was listed twice with the same widget)
-
- 12 Nov, 2022 1 commit
-
-
Dan Field authored
Make FutureBuilder handle SynchronousFuture correctly, reland SynchronousFuture usage in test assets (#115173) * Make FutureBuilder handle SynchronousFuture correctly * Reland "Load assets in flutter_test without turning event loop. (#115123)" (#115156)" This reverts commit 3895786f.
-
- 26 May, 2022 1 commit
-
-
Pierre-Louis authored
* Use `curly_braces_in_flow_control_structures` for `widgets` * fix comments * fix comments
-
- 14 Apr, 2022 1 commit
-
-
Michael Goderbauer authored
-
- 01 Mar, 2022 1 commit
-
-
Viren Khatri authored
* migrates lib/foundation and lib/widgets * migrates lib/painting and lib/material * migrates lib/cupertino, lib/gestures, lib/services, lib/semantics and lib/rendering * fixes failing tests * migrates test/ * improves hashing of lists
-
- 07 Dec, 2021 1 commit
-
-
Remi Rousselet authored
-
- 11 Oct, 2021 1 commit
-
-
Ian Hickson authored
-
- 04 Oct, 2021 1 commit
-
-
Greg Spencer authored
This does a cleanup of the examples, removing all of the "section" markers and extra comments that we don't need anymore now that the samples are no longer in the source code. It also removes the --template arguments from the {@tool dartpad} and {@tool sample} directives, since those are no longer used. It converts two examples that I discovered were still embedded into linked examples in the examples folder. I didn't delete the templates from the snippets config folder yet, because there are still embedded samples in the dart:ui package from the engine that use them. Once dart:ui no longer uses the templates, they can be removed. I bumped the version of the snippets package to pick up a change that allows removal of the --template argument.
-
- 25 Aug, 2021 1 commit
-
-
Greg Spencer authored
This extracts the sample code out from the API doc comments, and places them in separate files on disk, allowing running of the examples locally, testing them, and building of slightly larger examples.
-
- 13 Jul, 2021 1 commit
-
-
Viren Khatri authored
-
- 03 May, 2021 1 commit
-
-
Ian Hickson authored
-
- 12 Mar, 2021 1 commit
-
-
Greg Spencer authored
Update samples to use repo analysis options, Fix sample templates and a ton of analyzer issues (#77868)
-
- 24 Dec, 2020 1 commit
-
-
Shi-Hao Hong authored
-
- 16 Dec, 2020 1 commit
-
-
Sam Rawlins authored
-
- 11 Dec, 2020 1 commit
-
-
Michael Goderbauer authored
-
- 14 Nov, 2020 1 commit
-
-
creativecreatorormaybenot authored
-
- 08 Oct, 2020 1 commit
-
-
Alexandre Ardhuin authored
* enable null_check_on_nullable_type_parameter and tighten_type_of_initializing_formals * fix CI
-
- 24 Sep, 2020 1 commit
-
-
Michael Goderbauer authored
-
- 15 Sep, 2020 1 commit
-
-
Alexandre Ardhuin authored
* Reland "Nnbd widgets (#64672)" This reverts commit 127e6790. * remove non-nullable enforcement on AsyncSnapshot * make data param non-nullable for AsyncSnapshot.withData * make some Text params non-nullable
-
- 09 Sep, 2020 2 commits
-
-
Michael Goderbauer authored
This reverts commit e682ec71.
-
Alexandre Ardhuin authored
* migrate widget to nullsafety * remove double blank line after license * address review comments in actions.dart * nullable ObjectKey.value * use local variable oldElement * make State.build non-nullable * make State.context non-nullable * newline at eof * make ProxyWidget.child non-nullable * make _InactiveElements.debugContains non-nullable * make Element.depth non-nullable * make ProxyElement.build non-nullable * make StatefulElement.state non-nullable * remove 'Notice that' * avoid cast of list in RenderObjectElement.updateChildren * make IndexedSlot.value non-nullable * avoid cast of list in MultiChildRenderObjectElement.mount * make some WidgetsApp parameters non-nullable * hitTest take non-nullable position * make ScrollableState.position non-nullable * use _pixels instead of pixels * make ViewportOffset.pixels non-nullable * make param and return type of IndexedWidgetBuilder non-nullable * unused_import * make context param non-nullable for Builder in animated_list.dart * make ScrollMetrics.viewportDimension non-nullable * make ScrollMetrics.{min,max}ScrollExtent non-nullable * make _Location.file non-nullable * _WidgetForTypeTests.createElement throw UnimplementedError * update _NullWidget.build error message * make _ShortcutsState.manager non-nullable * Fix childCount issues for NNBD * fix childCount computation on web * increase max value on js side to compute childCount * make aspect parameter of dependOnInheritedWidgetOfExactType nullable * merge has{min,max}ScrollExtent into hasScrollExtents * update focus_manager.dart * address review comments in icon.dart * address review comments in image.dart * address review comments in routes.dart * address review comments in scroll_activity.dart * update doc comments * make UserScrollNotification.direction non-nullable and required * rename hasScrollExtents to hasContentDimensions * unnecessary late Co-authored-by:
Ian Hickson <ian@hixie.ch>
-
- 10 Aug, 2020 1 commit
-
-
Ian Hickson authored
-
- 29 Jul, 2020 1 commit
-
-
Michael Goderbauer authored
-
- 11 Jun, 2020 1 commit
-
-
Alexandre Ardhuin authored
* add language version 2.8 in packages/flutter * enable non-nullable analyzer flag
-
- 04 Jun, 2020 1 commit
-
-
chunhtai authored
-
- 06 May, 2020 1 commit
-
-
Kate Lovett authored
-
- 10 Feb, 2020 1 commit
-
-
Greg Spencer authored
This PR modifies the existing API docs samples to use DartPad so that all of the samples are now interactive apps on the API docs site. It also removes the restriction for the max width of the description area so that the dartpad region can expand horizontally. I updated the first paragraph on the API docs to indicate that Flutter is more than just mobile now (same text as the README.md at the top level). I modified a few of the examples so that they looked nicer, and fit better on the page. I added the sample description text above each DartPad instance, since that often defines the context of the example. I removed animations and images when they were redundant with the sample content. There were a few that made sense to keep, so I did.
-
- 15 Jan, 2020 1 commit
-
-
Dan Field authored
-
- 09 Jan, 2020 1 commit
-
-
Alexandre Ardhuin authored
-
- 08 Jan, 2020 1 commit
-
-
Greg Spencer authored
-