Commit Graph

254 Commits

Author SHA1 Message Date
auto-submit[bot]
b099bf0b4c Reverts "Use dartpad's main channel for master/main docs (#144329)" (#144429)
Reverts flutter/flutter#144329
Initiated by: goderbauer
Reason for reverting: broke postsubmit doc generation.
Original PR Author: goderbauer

Reviewed By: {devoncarew, HansMuller, gspencergoog}

This change reverts the following previous change:
Original Description:
Dartpad doesn't have a "master" channel anymore, it got renamed to "main". Sadly, specifying "master" is now falling back to "stable" which breaks some of our examples in the docs that require a more current Flutter version, e.g. https://main-api.flutter.dev/flutter/material/TextButton-class.html
2024-02-29 21:57:18 +00:00
Michael Goderbauer
41eeb2bb8c Use dartpad's main channel for master/main docs (#144329)
Dartpad doesn't have a "master" channel anymore, it got renamed to "main". Sadly, specifying "master" is now falling back to "stable" which breaks some of our examples in the docs that require a more current Flutter version, e.g. https://main-api.flutter.dev/flutter/material/TextButton-class.html
2024-02-29 19:08:25 +00:00
Parker Lougheed
c313083a88 Remove null-safety argument from DartPad doc samples (#127345)
Removes the `null_safety=true` query parameter from DartPad samples in the API docs, since all DartPad channels only support null safety now and the parameter does nothing.

## Test

Removing code, but updates the check in the dartdoc tool for the removal.
2023-05-23 00:10:11 +00:00
Greg Spencer
d4e1209cc0 Update the copy icon in snippets and samples to use the standard one (#123651)
## Description

This updates the copy icon for copying sample code to use `content_copy` instead of `assignment`.
Before:
<img width="369" alt="223876418-2470c4c5-abfc-4511-9762-1fd0b6e05903" src="https://user-images.githubusercontent.com/8867023/228396142-450125ee-d8cf-4ede-8545-5920eb0da99d.png">

After:
<img width="408" alt="image" src="https://user-images.githubusercontent.com/8867023/228395959-8531704a-77aa-43af-9dcf-7456bb2ed090.png">

## Related Issues
 - Fixes https://github.com/flutter/flutter/issues/122246

## Tests
 - No tests needed.
2023-04-18 17:38:13 +00:00
Greg Spencer
d0491dcf15 Add the channel parameter to the Dartpad samples (#115018)
* Add the channel paramter to the Dartpad samples

* Add sanity check test

* Make sample_id more generic
2022-11-09 23:47:05 +00:00
Greg Spencer
1f0760a1cc Fix API docs CSS files so dark mode works (#112023) 2022-09-21 18:33:08 +00:00
Ian Hickson
de938e508c Fix HTML in skeletons (ampersands must be escaped) (#109360) 2022-08-11 15:39:17 +00:00
Ian Hickson
9b2668a451 Minor fix compendium (#107874) 2022-08-11 02:33:07 +00:00
Michael Goderbauer
9ee566beb4 Remove sample templates (#103575) 2022-05-12 10:27:11 -07:00
Greg Spencer
c7643cf54e Fix samples so that they present properly in the docs (#97224) 2022-02-24 18:51:22 -08:00
Greg Spencer
bbc21fe3ed Fix some issues with samples (#95044) 2021-12-13 09:29:09 -08:00
Greg Spencer
983cbb273b Add example test, update example READMEs (#91130) 2021-10-04 13:53:02 -07:00
Greg Spencer
ab2b0851a2 Add smoke tests for all the examples, fix 17 broken examples. (#89021)
This adds a smoke test for every single API example. It also fixes 17 tests that had bugs in them, or were otherwise broken, and even fixes one actual bug in the framework, and one limitation in the framework.

The bug in the framework is that NetworkImage's _loadAsync method had await response.drain<List<int>>();, but if the response is null, it will throw a cryptic exception saying that Null can't be assigned to List<int>. The fix was just to use await response.drain<void>(); instead.

The limitation is that RelativePositionedTransition takes an Animation<Rect> rect parameter, and if you want to use a RectTween with it, the value emitted there is Rect?, and one of the examples was just casting from Animation<Rect> to Animation<Rect?>, which is invalid, so I modified RelativePositionedTransition to take a Rect? and just use Rect.zero if the rect is null.
2021-09-28 09:32:06 -07:00
Greg Spencer
10e4b04010 Switch document generation to use the snippets package (#87231)
Switch document generation to use the snippets package instead of the snippets code in the Flutter repo. In the process, some bugs in sample code analysis have been fixed, and I've fixed some more errors in the samples.

This will allow the snippets package to be developed separately from the Flutter repo, and reduce the code in the Flutter repo.

The snippets code is deleted in this PR.

I also converted some comments in the snippet templates to be regular comments instead of doc comments, because having a doc comment block before the imports causes the Dart import sorter to lose the comment. They should have been regular comments in the first place.

The snippets package resides in the assets-for-api-docs repo.

The sample analysis has also been converted to be run in parallel, and I've bumped the Dartdoc version to 1.0.2.
2021-08-11 19:48:29 -07:00
Anna Gringauze
cc63c81408 Update all packages (#87579)
- Update dwds and and the rest of the packages

Closes: https://github.com/flutter/flutter/issues/87100
2021-08-03 16:37:48 -07:00
Jacob MacDonald
fdb80f916d update packages to the latest (#86880) 2021-07-22 13:26:05 -07:00
Anna Gringauze
84c3b56877 Update dwds (and other packages) (#86832)
* Upgrade all packages

In particular, bring in dwds with latest fixes for flakes.

Closes: https://github.com/flutter/flutter/issues/85043
Related: https://github.com/flutter/flutter/issues/85575

* Re-enable fixed tests

* Disable failing test due to DDS issue
2021-07-21 21:47:10 -07:00
Christopher Fujino
2108fbd78d add a check for env variable RELEASE_CHANNEL while generating docs (#86501)
* add a check for env variable RELEASE_CHANNEL in dev/snippets/lib/main.dart during doc generation
* update to LUCI_BRANCH, which is already populated
* validate env variable is either master or stable
2021-07-16 15:59:54 -07:00
Eng Zer Jun
57a4b023f1 build: update dependencies (#86433) 2021-07-14 13:46:04 -07:00
Yegor
78e06e716b [web] move e2e tests from flutter/engine to flutter/flutter (#86119)
* [web] move e2e tests from flutter/engine to flutter/flutter
* flutter update-packages --force-upgrade
2021-07-09 15:31:49 -07:00
Filip Hracek
76d5e62f42 Add a more complete app template for Flutter (skeleton) (#83530) 2021-06-28 15:26:04 -07:00
Jonah Williams
03d14a30c8 [versions] remove mockito (#85076) 2021-06-22 17:41:03 -07:00
Phil Quitslund
875b420cc8 remove deprecated author fields (#84997) 2021-06-22 06:06:03 -07:00
Hans Muller
ab9df83645 Retry dev/snippets git status, deflake snippets generator (#84728) 2021-06-16 15:39:02 -07:00
Jonah Williams
cd13c91119 [versions] update dependencies (#84639) 2021-06-15 11:08:57 -07:00
Michael Goderbauer
14b2e7ffee flutter update-packages --force-upgrade (#83911) 2021-06-03 10:50:11 -07:00
Greg Spencer
bb40270069 Add more debug output to snippet git failures (#83806) 2021-06-02 15:34:28 -07:00
Jonah Williams
025a3a7da3 [versions] roll package test redux (#83367) 2021-05-26 17:22:28 -07:00
Jenn Magder
d7e49e559b Run update packages, pick up file 6.1.1 (#82770) 2021-05-18 13:09:03 -07:00
Chris Bracken
3445cb86f2 Update dependency versions (#82577)
shelf 1.1.2 -> 1.1.4
flutter_template_images 1.0.2 -> 3.0.0
2021-05-14 16:51:36 -07:00
Abhishek Ghaskata
b554f893bd Enable unnecessary_null_checks lint (#82084) 2021-05-14 10:44:03 -07:00
Kenzie Schmoll
766b4509c6 Add 'v' hotkey to open DevTools in the browser (#82227)
* Add 'v' hotkey to open DevTools in the browser
2021-05-13 09:54:10 -07:00
Michael Goderbauer
b8a2456737 Enable library_private_types_in_public_api lint (#81578) 2021-05-10 16:26:16 -07:00
Greg Spencer
59b406c760 Sort imports when interpolating sample templates (#81873) 2021-05-07 15:34:04 -07:00
Greg Spencer
7bff366b96 Convert snippets tool to null safety (#78646) 2021-04-29 22:34:04 -07:00
Jonah Williams
2b0d09dd81 [versions] roll versions and add ffi dep (#81403) 2021-04-28 11:19:03 -07:00
Jonah Williams
7d6e581f61 [versions] roll in latest shelf (#81099) 2021-04-23 20:39:02 -07:00
Jenn Magder
0f899f2b64 Roll packages (#80989) 2021-04-22 15:01:49 -07:00
Greg Spencer
b33c7891c1 Fix the sample analyzer to analyze dart:ui and make the analyzer null safe (#80742) 2021-04-22 12:14:02 -07:00
Jenn Magder
4f3ec01d32 Add frontend_server_client to dependency allowlist (#80912) 2021-04-21 18:13:43 -07:00
Phil Quitslund
61c30c41b2 fix sort_directives violations (#80817) 2021-04-21 13:49:03 -07:00
Dan Field
e7b7ebc066 Shake widget inspector from non-debug builds (#80157) 2021-04-14 21:54:03 -07:00
Dan Field
d7da6190ff roll packages (#80307) 2021-04-13 18:19:02 -07:00
Jonah Williams
443d07b707 [versions] roll to latest test (#79099) 2021-03-31 07:45:40 -07:00
Jonah Williams
dfc134dd9a [versions] roll many versions (#79088) 2021-03-25 15:43:44 -07:00
Shi-Hao Hong
49adef6792 [State Restoration] Code sample templates, migrate existing code samples (#78757)
* Create state restoration templates, 

* Update existing state restoration samples to use the new templates

* Add to README, decided to require stateful widgets to include RestorationMixin
2021-03-23 09:24:34 +08:00
Jonah Williams
28532edaa5 Update all versions and migrate devicelab framework to package:vm_service (#78557) 2021-03-18 12:38:12 -07:00
Greg Spencer
a8d820a46e Update samples to use repo analysis options, Fix sample templates and a ton of analyzer issues (#77868) 2021-03-11 16:45:03 -08:00
Jonah Williams
ddcb8d7d6d Update all versions! (#77153) 2021-03-03 14:11:30 -08:00
Michael Goderbauer
7e017d318e Enable file_names and package_names lints (#77087) 2021-03-02 15:24:04 -08:00