Unverified Commit 5d1306e7 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Update outdated links (#73514)

parent f461f1c9
......@@ -63,42 +63,42 @@ class _ButtonsDemoState extends State<ButtonsDemo> {
description: _elevatedText,
demoWidget: buildElevatedButton(_buttonShape),
exampleCodeTag: _elevatedCode,
documentationUrl: 'https://docs.flutter.io/flutter/material/ElevatedButton-class.html',
documentationUrl: 'https://api.flutter.dev/flutter/material/ElevatedButton-class.html',
),
ComponentDemoTabData(
tabName: 'TEXT',
description: _textText,
demoWidget: buildTextButton(_buttonShape),
exampleCodeTag: _textCode,
documentationUrl: 'https://docs.flutter.io/flutter/material/TextButton-class.html',
documentationUrl: 'https://api.flutter.dev/flutter/material/TextButton-class.html',
),
ComponentDemoTabData(
tabName: 'OUTLINED',
description: _outlinedText,
demoWidget: buildOutlinedButton(_buttonShape),
exampleCodeTag: _outlinedCode,
documentationUrl: 'https://docs.flutter.io/flutter/material/OutlinedButton-class.html',
documentationUrl: 'https://api.flutter.dev/flutter/material/OutlinedButton-class.html',
),
ComponentDemoTabData(
tabName: 'DROPDOWN',
description: _dropdownText,
demoWidget: buildDropdownButton(),
exampleCodeTag: _dropdownCode,
documentationUrl: 'https://docs.flutter.io/flutter/material/DropdownButton-class.html',
documentationUrl: 'https://api.flutter.dev/flutter/material/DropdownButton-class.html',
),
ComponentDemoTabData(
tabName: 'ICON',
description: _iconText,
demoWidget: buildIconButton(),
exampleCodeTag: _iconCode,
documentationUrl: 'https://docs.flutter.io/flutter/material/IconButton-class.html',
documentationUrl: 'https://api.flutter.dev/flutter/material/IconButton-class.html',
),
ComponentDemoTabData(
tabName: 'ACTION',
description: _actionText,
demoWidget: buildActionButton(),
exampleCodeTag: _actionCode,
documentationUrl: 'https://docs.flutter.io/flutter/material/FloatingActionButton-class.html',
documentationUrl: 'https://api.flutter.dev/flutter/material/FloatingActionButton-class.html',
),
];
......
......@@ -43,21 +43,21 @@ class _SelectionControlsDemoState extends State<SelectionControlsDemo> {
description: _checkboxText,
demoWidget: buildCheckbox(),
exampleCodeTag: _checkboxCode,
documentationUrl: 'https://docs.flutter.io/flutter/material/Checkbox-class.html',
documentationUrl: 'https://api.flutter.dev/flutter/material/Checkbox-class.html',
),
ComponentDemoTabData(
tabName: 'RADIO',
description: _radioText,
demoWidget: buildRadio(),
exampleCodeTag: _radioCode,
documentationUrl: 'https://docs.flutter.io/flutter/material/Radio-class.html',
documentationUrl: 'https://api.flutter.dev/flutter/material/Radio-class.html',
),
ComponentDemoTabData(
tabName: 'SWITCH',
description: _switchText,
demoWidget: buildSwitch(),
exampleCodeTag: _switchCode,
documentationUrl: 'https://docs.flutter.io/flutter/material/Switch-class.html',
documentationUrl: 'https://api.flutter.dev/flutter/material/Switch-class.html',
),
];
......
......@@ -217,13 +217,13 @@ class _SliderDemoState extends State<SliderDemo> {
tabName: 'SINGLE',
description: 'Sliders containing 1 thumb',
demoWidget: _Sliders(),
documentationUrl: 'https://docs.flutter.io/flutter/material/Slider-class.html',
documentationUrl: 'https://api.flutter.dev/flutter/material/Slider-class.html',
),
ComponentDemoTabData(
tabName: 'RANGE',
description: 'Sliders containing 2 thumbs',
demoWidget: _RangeSliders(),
documentationUrl: 'https://docs.flutter.io/flutter/material/RangeSlider-class.html',
documentationUrl: 'https://api.flutter.dev/flutter/material/RangeSlider-class.html',
),
];
......
......@@ -50,7 +50,7 @@ class _GalleryAppState extends State<GalleryApp> {
Map<String, WidgetBuilder> _buildRoutes() {
// For a different example of how to set up an application routing table
// using named routes, consider the example in the Navigator class documentation:
// https://docs.flutter.io/flutter/widgets/Navigator-class.html
// https://api.flutter.dev/flutter/widgets/Navigator-class.html
return <String, WidgetBuilder>{
for (final GalleryDemo demo in kAllGalleryDemos) demo.routeName: demo.buildRoute,
};
......
......@@ -24,8 +24,8 @@ const String kPlatformIntegrationPackageName = 'platform_integration';
/// documentation to `//dev/docs/doc/api/`.
///
/// This script also updates the index.html file so that it can be placed
/// at the root of docs.flutter.io. We are keeping the files inside of
/// docs.flutter.io/flutter for now, so we need to manipulate paths
/// at the root of api.flutter.dev. We are keeping the files inside of
/// api.flutter.dev/flutter for now, so we need to manipulate paths
/// a bit. See https://github.com/flutter/flutter/issues/3900 for more info.
///
/// This will only work on UNIX systems, not Windows. It requires that 'git' be
......@@ -303,7 +303,7 @@ void createSearchMetadata(String templatePath, String metadataPath) {
final String branch = getBranchName();
final String metadata = template.replaceAll(
'{SITE_URL}',
branch == 'stable' ? 'https://docs.flutter.io/' : 'https://master-docs.flutter.io/',
branch == 'stable' ? 'https://api.flutter.dev/' : 'https://master-api.flutter.dev/',
);
Directory(path.dirname(metadataPath)).create(recursive: true);
File(metadataPath).writeAsStringSync(metadata);
......
......@@ -809,7 +809,7 @@ class SliverAnimatedList extends StatefulWidget {
'happen when the context provided is from the same StatefulWidget that '
'built the AnimatedList. Please see the SliverAnimatedList documentation '
'for examples of how to refer to an AnimatedListState object: '
'https://docs.flutter.io/flutter/widgets/SliverAnimatedListState-class.html\n'
'https://api.flutter.dev/flutter/widgets/SliverAnimatedListState-class.html\n'
'The context used was:\n'
' $context');
}
......
......@@ -140,10 +140,10 @@ translations, they're keywords that help define an app's text theme
and time picker layout respectively.
The value of `timeOfDayFormat` defines how a time picker displayed by
[showTimePicker()](https://docs.flutter.io/flutter/material/showTimePicker.html)
[showTimePicker()](https://api.flutter.dev/flutter/material/showTimePicker.html)
formats and lays out its time controls. The value of `timeOfDayFormat`
must be a string that matches one of the formats defined by
<https://docs.flutter.io/flutter/material/TimeOfDayFormat-class.html>.
<https://api.flutter.dev/flutter/material/TimeOfDayFormat-class.html>.
It is converted to an enum value because the `material_en.arb` file
has this value labeled as `"x-flutter-type": "icuShortTimePattern"`.
......@@ -152,7 +152,7 @@ The value of `scriptCategory` is based on the
section in the Material spec. The Material theme uses the
`scriptCategory` value to lookup a localized version of the default
`TextTheme`, see
[Typography.geometryThemeFor](https://docs.flutter.io/flutter/material/Typography/geometryThemeFor.html).
[Typography.geometryThemeFor](https://api.flutter.dev/flutter/material/Typography/geometryThemeFor.html).
### 'generated_*_localizations.dart': all of the localizations as a Map
......
......@@ -92,8 +92,8 @@ class CreateCommand extends CreateBase {
/// The hostname for the Flutter docs for the current channel.
String get _snippetsHost => globals.flutterVersion.channel == 'stable'
? 'docs.flutter.io'
: 'master-docs.flutter.io';
? 'api.flutter.dev'
: 'master-api.flutter.dev';
Future<String> _fetchSampleFromServer(String sampleId) async {
// Sanity check the sampleId
......
......@@ -244,7 +244,7 @@ void main() {
testWithoutContext('flattenNameSubdirs', () {
expect(flattenNameSubdirs(Uri.parse('http://flutter.dev/foo/bar'), MemoryFileSystem.test()), 'flutter.dev/foo/bar');
expect(flattenNameSubdirs(Uri.parse('http://docs.flutter.io/foo/bar'), MemoryFileSystem.test()), 'docs.flutter.io/foo/bar');
expect(flattenNameSubdirs(Uri.parse('http://api.flutter.dev/foo/bar'), MemoryFileSystem.test()), 'api.flutter.dev/foo/bar');
expect(flattenNameSubdirs(Uri.parse('https://www.flutter.dev'), MemoryFileSystem.test()), 'www.flutter.dev');
});
......
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