Update links and surrounding text for new main-api docs (#138602)

Issue reference: https://github.com/flutter/flutter/issues/133877
This commit is contained in:
Parker Lougheed 2023-11-17 16:27:53 -06:00 committed by GitHub
parent a8fbd27404
commit 096cdc39a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 16 deletions

View File

@ -145,4 +145,4 @@ cd dev/devicelab
File `test/frame_policy.dart` and its driving script `test_driver/frame_policy_test.dart` File `test/frame_policy.dart` and its driving script `test_driver/frame_policy_test.dart`
are used for testing [`fullyLive`](https://api.flutter.dev/flutter/flutter_test/LiveTestWidgetsFlutterBindingFramePolicy-class.html) are used for testing [`fullyLive`](https://api.flutter.dev/flutter/flutter_test/LiveTestWidgetsFlutterBindingFramePolicy-class.html)
and [`benchmarkLive`](https://api.flutter.dev/flutter/flutter_test/LiveTestWidgetsFlutterBindingFramePolicy-class.html) and [`benchmarkLive`](https://api.flutter.dev/flutter/flutter_test/LiveTestWidgetsFlutterBindingFramePolicy-class.html)
policies in terms of its effect on [`WidgetTester.handlePointerEventRecord`](https://master-api.flutter.dev/flutter/flutter_test/WidgetTester/handlePointerEventRecord.html). policies in terms of its effect on [`WidgetTester.handlePointerEventRecord`](https://api.flutter.dev/flutter/flutter_test/WidgetTester/handlePointerEventRecord.html).

View File

@ -15,8 +15,8 @@ request permission.
The [Cirrus](https://cirrus-ci.org)-based bots run the [`test.dart`](test.dart) The [Cirrus](https://cirrus-ci.org)-based bots run the [`test.dart`](test.dart)
script for each PR and submission. This does testing for the tools, for the script for each PR and submission. This does testing for the tools, for the
framework, and (for submitted changes only) rebuilds and updates the master framework, and (for submitted changes only) rebuilds and updates the main
branch API docs [staging site](https://master-docs.flutter.dev/). branch API docs [staging site](https://main-api.flutter.dev/).
For tagged dev and beta builds, it also builds and deploys the gallery app to For tagged dev and beta builds, it also builds and deploys the gallery app to
the app stores. It is configured by the [.cirrus.yml](/.cirrus.yml). the app stores. It is configured by the [.cirrus.yml](/.cirrus.yml).

View File

@ -15,7 +15,7 @@ the following locations:
* [flutter.dev](https://flutter.dev) (main Flutter site) * [flutter.dev](https://flutter.dev) (main Flutter site)
* [Stable channel API Docs](https://api.flutter.dev) * [Stable channel API Docs](https://api.flutter.dev)
* [Main channel API Docs](https://master-api.flutter.dev) * [Main channel API Docs](https://main-api.flutter.dev)
* Engine Embedder API documentation: * Engine Embedder API documentation:
* [Android Embedder](../javadoc/index.html) * [Android Embedder](../javadoc/index.html)
* [iOS Embedder](../ios-embedder/index.html) * [iOS Embedder](../ios-embedder/index.html)
@ -39,7 +39,7 @@ to 900 MB.**
Offline HTML documentation ZIP bundles: Offline HTML documentation ZIP bundles:
* [Stable channel](https://api.flutter.dev/offline/flutter.docs.zip) * [Stable channel](https://api.flutter.dev/offline/flutter.docs.zip)
* [Master channel](https://master-api.flutter.dev/offline/flutter.docs.zip) * [Main channel](https://main-api.flutter.dev/offline/flutter.docs.zip)
Or, you can add Flutter to the open-source [Zeal](https://zealdocs.org/) app Or, you can add Flutter to the open-source [Zeal](https://zealdocs.org/) app
using the following XML configurations. Follow the instructions in the using the following XML configurations. Follow the instructions in the
@ -47,8 +47,8 @@ application for adding a feed.
* Stable channel Zeal XML configuration URL: * Stable channel Zeal XML configuration URL:
<https://api.flutter.dev/offline/flutter.xml> <https://api.flutter.dev/offline/flutter.xml>
* Master channel Zeal XML configuration URL: * Main channel Zeal XML configuration URL:
<https://master-api.flutter.dev/offline/flutter.xml> <https://main-api.flutter.dev/offline/flutter.xml>
## Importing a Library ## Importing a Library

View File

@ -341,7 +341,7 @@ class Configurator {
final String branch = FlutterInformation.instance.getBranchName(); final String branch = FlutterInformation.instance.getBranchName();
final String metadata = template.replaceAll( final String metadata = template.replaceAll(
'{SITE_URL}', '{SITE_URL}',
branch == 'stable' ? 'https://api.flutter.dev/' : 'https://master-api.flutter.dev/', branch == 'stable' ? 'https://api.flutter.dev/' : 'https://main-api.flutter.dev/',
); );
metadataPath.parent.create(recursive: true); metadataPath.parent.create(recursive: true);
metadataPath.writeAsStringSync(metadata); metadataPath.writeAsStringSync(metadata);
@ -412,7 +412,7 @@ class Configurator {
final bool isStable = platform.environment['LUCI_BRANCH'] == 'stable'; final bool isStable = platform.environment['LUCI_BRANCH'] == 'stable';
offlineDir.childFile('flutter.xml').writeAsStringSync('<entry>\n' offlineDir.childFile('flutter.xml').writeAsStringSync('<entry>\n'
' <version>${FlutterInformation.instance.getFlutterVersion()}</version>\n' ' <version>${FlutterInformation.instance.getFlutterVersion()}</version>\n'
' <url>https://${isStable ? '' : 'master-'}api.flutter.dev/offline/flutter.docset.tar.gz</url>\n' ' <url>https://${isStable ? '' : 'main-'}api.flutter.dev/offline/flutter.docset.tar.gz</url>\n'
'</entry>\n'); '</entry>\n');
} }

View File

@ -122,7 +122,7 @@ class _TableBuilder extends StatelessWidget {
return SizedBox( return SizedBox(
// Stack needs constraints, even though we then Clip.none outside of them. // Stack needs constraints, even though we then Clip.none outside of them.
// InteractiveViewer.builder always sets constrained to false, giving infinite constraints to the child. // InteractiveViewer.builder always sets constrained to false, giving infinite constraints to the child.
// See: https://master-api.flutter.dev/flutter/widgets/InteractiveViewer/constrained.html // See: https://api.flutter.dev/flutter/widgets/InteractiveViewer/constrained.html
width: 1, width: 1,
height: 1, height: 1,
child: Stack( child: Stack(

View File

@ -101,7 +101,7 @@ class CreateCommand extends CreateBase {
/// The hostname for the Flutter docs for the current channel. /// The hostname for the Flutter docs for the current channel.
String get _snippetsHost => globals.flutterVersion.channel == 'stable' String get _snippetsHost => globals.flutterVersion.channel == 'stable'
? 'api.flutter.dev' ? 'api.flutter.dev'
: 'master-api.flutter.dev'; : 'main-api.flutter.dev';
Future<String?> _fetchSampleFromServer(String sampleId) async { Future<String?> _fetchSampleFromServer(String sampleId) async {
// Sanity check the sampleId // Sanity check the sampleId

View File

@ -2035,7 +2035,7 @@ void main() {
return () { return () {
return FakeHttpClient.list(<FakeRequest>[ return FakeHttpClient.list(<FakeRequest>[
FakeRequest( FakeRequest(
Uri.parse('https://master-api.flutter.dev/snippets/foo.bar.Baz.dart'), Uri.parse('https://main-api.flutter.dev/snippets/foo.bar.Baz.dart'),
response: FakeResponse(body: utf8.encode('void main() {}')), response: FakeResponse(body: utf8.encode('void main() {}')),
), ),
]); ]);
@ -2058,7 +2058,7 @@ void main() {
return () { return () {
return FakeHttpClient.list(<FakeRequest>[ return FakeHttpClient.list(<FakeRequest>[
FakeRequest( FakeRequest(
Uri.parse('https://master-api.flutter.dev/snippets/foo.bar.Baz.dart'), Uri.parse('https://main-api.flutter.dev/snippets/foo.bar.Baz.dart'),
response: FakeResponse(body: utf8.encode('void main() { String? foo; print(foo); } // ignore: avoid_print')), response: FakeResponse(body: utf8.encode('void main() { String? foo; print(foo); } // ignore: avoid_print')),
), ),
]); ]);
@ -2085,7 +2085,7 @@ void main() {
return () { return () {
return FakeHttpClient.list(<FakeRequest>[ return FakeHttpClient.list(<FakeRequest>[
FakeRequest( FakeRequest(
Uri.parse('https://master-api.flutter.dev/snippets/index.json'), Uri.parse('https://main-api.flutter.dev/snippets/index.json'),
response: FakeResponse(body: utf8.encode(samplesIndexJson)), response: FakeResponse(body: utf8.encode(samplesIndexJson)),
), ),
]); ]);
@ -2114,7 +2114,7 @@ void main() {
return () { return () {
return FakeHttpClient.list(<FakeRequest>[ return FakeHttpClient.list(<FakeRequest>[
FakeRequest( FakeRequest(
Uri.parse('https://master-api.flutter.dev/snippets/index.json'), Uri.parse('https://main-api.flutter.dev/snippets/index.json'),
), ),
]); ]);
}; };
@ -2138,7 +2138,7 @@ void main() {
return () { return () {
return FakeHttpClient.list(<FakeRequest>[ return FakeHttpClient.list(<FakeRequest>[
FakeRequest( FakeRequest(
Uri.parse('https://master-api.flutter.dev/snippets/index.json'), Uri.parse('https://main-api.flutter.dev/snippets/index.json'),
response: const FakeResponse(statusCode: HttpStatus.notFound), response: const FakeResponse(statusCode: HttpStatus.notFound),
), ),
]); ]);