Unverified Commit 096cdc39 authored by Parker Lougheed's avatar Parker Lougheed Committed by GitHub

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

Issue reference: https://github.com/flutter/flutter/issues/133877
parent a8fbd274
......@@ -145,4 +145,4 @@ cd dev/devicelab
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)
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).
......@@ -15,8 +15,8 @@ request permission.
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
framework, and (for submitted changes only) rebuilds and updates the master
branch API docs [staging site](https://master-docs.flutter.dev/).
framework, and (for submitted changes only) rebuilds and updates the main
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
the app stores. It is configured by the [.cirrus.yml](/.cirrus.yml).
......
......@@ -15,7 +15,7 @@ the following locations:
* [flutter.dev](https://flutter.dev) (main Flutter site)
* [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:
* [Android Embedder](../javadoc/index.html)
* [iOS Embedder](../ios-embedder/index.html)
......@@ -39,7 +39,7 @@ to 900 MB.**
Offline HTML documentation ZIP bundles:
* [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
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:
<https://api.flutter.dev/offline/flutter.xml>
* Master channel Zeal XML configuration URL:
<https://master-api.flutter.dev/offline/flutter.xml>
* Main channel Zeal XML configuration URL:
<https://main-api.flutter.dev/offline/flutter.xml>
## Importing a Library
......
......@@ -341,7 +341,7 @@ class Configurator {
final String branch = FlutterInformation.instance.getBranchName();
final String metadata = template.replaceAll(
'{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.writeAsStringSync(metadata);
......@@ -412,7 +412,7 @@ class Configurator {
final bool isStable = platform.environment['LUCI_BRANCH'] == 'stable';
offlineDir.childFile('flutter.xml').writeAsStringSync('<entry>\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');
}
......
......@@ -122,7 +122,7 @@ class _TableBuilder extends StatelessWidget {
return SizedBox(
// 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.
// See: https://master-api.flutter.dev/flutter/widgets/InteractiveViewer/constrained.html
// See: https://api.flutter.dev/flutter/widgets/InteractiveViewer/constrained.html
width: 1,
height: 1,
child: Stack(
......
......@@ -101,7 +101,7 @@ class CreateCommand extends CreateBase {
/// The hostname for the Flutter docs for the current channel.
String get _snippetsHost => globals.flutterVersion.channel == 'stable'
? 'api.flutter.dev'
: 'master-api.flutter.dev';
: 'main-api.flutter.dev';
Future<String?> _fetchSampleFromServer(String sampleId) async {
// Sanity check the sampleId
......
......@@ -2035,7 +2035,7 @@ void main() {
return () {
return FakeHttpClient.list(<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() {}')),
),
]);
......@@ -2058,7 +2058,7 @@ void main() {
return () {
return FakeHttpClient.list(<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')),
),
]);
......@@ -2085,7 +2085,7 @@ void main() {
return () {
return FakeHttpClient.list(<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)),
),
]);
......@@ -2114,7 +2114,7 @@ void main() {
return () {
return FakeHttpClient.list(<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 FakeHttpClient.list(<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),
),
]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment