Add missing links to examples that aren't linked anywhere (#130422)

## Description

This adds links to examples that were not linked anywhere.

## Related Issues
 - Fixes #129956

## Tests
 - Documentation only change
This commit is contained in:
Greg Spencer
2023-07-12 13:08:05 -07:00
committed by GitHub
parent d75735eea6
commit 3d67ca4311
14 changed files with 78 additions and 14 deletions

View File

@@ -73,7 +73,13 @@ class MyHomePage extends StatelessWidget {
appBar: AppBar(
title: Text(title),
),
drawer: const Drawer(),
drawer: Drawer(
child: Column(
children: <Widget>[
TextButton(child: const Text('Drawer Item'), onPressed: () {}),
],
),
),
body: const Center(
child: NextPageButton(),
),

View File

@@ -4,8 +4,7 @@
import 'package:flutter/material.dart';
/// Flutter code sample for [SearchAnchor] that shows how to fetch the suggestions
/// from a remote API.
/// Flutter code sample for [SearchAnchor].
const Duration fakeAPIDuration = Duration(seconds: 1);
@@ -60,7 +59,7 @@ class _AsyncSearchAnchorState extends State<_AsyncSearchAnchor > {
final List<String> options = (await _FakeAPI.search(_searchingWithQuery!)).toList();
// If another search happened after this one, throw away these options.
// Use the previous options intead and wait for the newer request to
// Use the previous options instead and wait for the newer request to
// finish.
if (_searchingWithQuery != controller.text) {
return _lastOptions;

View File

@@ -6,8 +6,7 @@ import 'dart:async';
import 'package:flutter/material.dart';
/// Flutter code sample for [SearchAnchor] that demonstrates fetching the
/// suggestions asynchronously and debouncing the network calls.
/// Flutter code sample for [SearchAnchor].
const Duration fakeAPIDuration = Duration(seconds: 1);
const Duration debounceDuration = Duration(milliseconds: 500);

View File

@@ -4,12 +4,12 @@
import 'package:flutter/material.dart';
/// Flutter code sample for [SnackBar] with Material 3 specifications.
/// Flutter code sample for [SnackBar].
void main() => runApp(const SnackBarExampleApp());
// A Material 3 [SnackBar] demonstrating an optional icon, in either floating
// or fixed format.
/// A Material 3 [SnackBar] demonstrating an optional icon, in either floating
/// or fixed format.
class SnackBarExampleApp extends StatelessWidget {
const SnackBarExampleApp({super.key});

View File

@@ -16,7 +16,7 @@ class SwitchApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.light(useMaterial3: true).copyWith(
// Use the ambient [CupetinoThemeData] to style all widgets which would
// Use the ambient CupertinoThemeData to style all widgets which would
// otherwise use iOS defaults.
cupertinoOverrideTheme: const CupertinoThemeData(applyThemeToAll: true),
),
@@ -54,7 +54,7 @@ class _SwitchExampleState extends State<SwitchExample> {
},
),
Switch.adaptive(
// Don't use the ambient [CupetinoThemeData] to style this switch.
// Don't use the ambient CupertinoThemeData to style this switch.
applyCupertinoTheme: false,
value: light,
onChanged: (bool value) {

View File

@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Examples of LinearBorder and LinearBorderEdge.
import 'package:flutter/material.dart';
/// Examples for [LinearBorder] and [LinearBorderEdge].
void main() {
runApp(const ExampleApp());
}
@@ -18,7 +18,8 @@ class ExampleApp extends StatelessWidget {
return MaterialApp(
theme: ThemeData.light(useMaterial3: true),
home: const Directionality(
textDirection: TextDirection.ltr, // Or try rtl.
// TRY THIS: Switch to TextDirection.rtl to see how the borders change.
textDirection: TextDirection.ltr,
child: Home(),
),
);