Fix errors in examples (#87962)

This commit is contained in:
Greg Spencer 2021-08-11 14:37:06 -07:00 committed by GitHub
parent d8da091751
commit cb651352dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 20 additions and 20 deletions

View File

@ -44,7 +44,7 @@ import 'theme_data.dart';
/// ),
/// ),
/// )
///```
/// ```
///
/// In this case the background color for all other button states would fallback
/// to the ElevatedButtons default values. To unconditionally set the button's
@ -56,7 +56,7 @@ import 'theme_data.dart';
/// backgroundColor: MaterialStateProperty.all<Color>(Colors.green),
/// ),
/// )
///```
/// ```
///
/// Configuring a ButtonStyle directly makes it possible to very
/// precisely control the buttons visual attributes for all states.
@ -77,7 +77,7 @@ import 'theme_data.dart';
/// TextButton(
/// style: TextButton.styleFrom(primary: Colors.green),
/// )
///```
/// ```
///
/// To configure all of the application's text buttons in the same
/// way, specify the overall theme's `textButtonTheme`:
@ -90,7 +90,7 @@ import 'theme_data.dart';
/// ),
/// home: MyAppHome(),
/// )
///```
/// ```
/// See also:
///
/// * [TextButtonTheme], the theme for [TextButton]s.

View File

@ -109,7 +109,7 @@ import 'theme_data.dart';
/// final String label;
/// final EdgeInsets padding;
/// final bool value;
/// final Function onChanged;
/// final ValueChanged<bool> onChanged;
///
/// @override
/// Widget build(BuildContext context) {
@ -135,7 +135,7 @@ import 'theme_data.dart';
/// Checkbox(
/// value: value,
/// onChanged: (bool? newValue) {
/// onChanged(newValue);
/// onChanged(newValue!);
/// },
/// ),
/// ],
@ -190,7 +190,7 @@ import 'theme_data.dart';
/// final String label;
/// final EdgeInsets padding;
/// final bool value;
/// final Function onChanged;
/// final ValueChanged<bool> onChanged;
///
/// @override
/// Widget build(BuildContext context) {
@ -206,7 +206,7 @@ import 'theme_data.dart';
/// Checkbox(
/// value: value,
/// onChanged: (bool? newValue) {
/// onChanged(newValue);
/// onChanged(newValue!);
/// },
/// ),
/// ],

View File

@ -120,7 +120,7 @@ import 'theme_data.dart';
/// final EdgeInsets padding;
/// final bool groupValue;
/// final bool value;
/// final Function onChanged;
/// final ValueChanged<bool> onChanged;
///
/// @override
/// Widget build(BuildContext context) {
@ -132,7 +132,7 @@ import 'theme_data.dart';
/// groupValue: groupValue,
/// value: value,
/// onChanged: (bool? newValue) {
/// onChanged(newValue);
/// onChanged(newValue!);
/// }
/// ),
/// RichText(
@ -221,7 +221,7 @@ import 'theme_data.dart';
/// final EdgeInsets padding;
/// final bool groupValue;
/// final bool value;
/// final Function onChanged;
/// final ValueChanged<bool> onChanged;
///
/// @override
/// Widget build(BuildContext context) {
@ -239,7 +239,7 @@ import 'theme_data.dart';
/// groupValue: groupValue,
/// value: value,
/// onChanged: (bool? newValue) {
/// onChanged(newValue);
/// onChanged(newValue!);
/// },
/// ),
/// Text(label),

View File

@ -112,7 +112,7 @@ enum _SwitchListTileType { material, adaptive }
/// final String label;
/// final EdgeInsets padding;
/// final bool value;
/// final Function onChanged;
/// final ValueChanged<bool> onChanged;
///
/// @override
/// Widget build(BuildContext context) {
@ -193,7 +193,7 @@ enum _SwitchListTileType { material, adaptive }
/// final String label;
/// final EdgeInsets padding;
/// final bool value;
/// final Function onChanged;
/// final ValueChanged<bool> onChanged;
///
/// @override
/// Widget build(BuildContext context) {

View File

@ -1139,7 +1139,7 @@ class _AnimatedAlignState extends AnimatedWidgetBaseState<AnimatedAlign> {
/// ),
/// );
/// }
///```
/// ```
/// {@end-tool}
///
/// See also:

View File

@ -94,7 +94,7 @@ abstract class PreferredSizeWidget implements Widget {
/// }
/// }
/// ```
///```dart
/// ```dart
/// Widget build(BuildContext context) {
/// return Scaffold(
/// appBar: PreferredSize(

View File

@ -50,7 +50,7 @@ class _ListenerEntry extends LinkedListEntry<_ListenerEntry> {
/// To remove the listener from a [ScrollNotificationObserver] ancestor:
/// ```dart
/// ScrollNotificationObserver.of(context).removeListener(listener);
///```
/// ```
///
/// Stateful widgets that share an ancestor [ScrollNotificationObserver] typically
/// add a listener in [State.didChangeDependencies] (removing the old one

View File

@ -163,7 +163,7 @@ class _DriverBinding extends BindingBase with SchedulerBinding, ServicesBinding,
///
/// final int times;
/// }
///```
/// ```
///
/// ```dart
/// class SomeCommandResult extends Result {

View File

@ -28,12 +28,12 @@ const String kFontManifestJson = 'FontManifest.json';
/// The effect of adding `uses-material-design: true` to the pubspec is to insert
/// the following snippet into the asset manifest:
///
///```yaml
/// ```yaml
/// material:
/// - family: MaterialIcons
/// fonts:
/// - asset: fonts/MaterialIcons-Regular.otf
///```
/// ```
const List<Map<String, Object>> kMaterialFonts = <Map<String, Object>>[
<String, Object>{
'family': 'MaterialIcons',