Unverified Commit cb651352 authored by Greg Spencer's avatar Greg Spencer Committed by GitHub

Fix errors in examples (#87962)

parent d8da0917
...@@ -44,7 +44,7 @@ import 'theme_data.dart'; ...@@ -44,7 +44,7 @@ import 'theme_data.dart';
/// ), /// ),
/// ), /// ),
/// ) /// )
///``` /// ```
/// ///
/// In this case the background color for all other button states would fallback /// In this case the background color for all other button states would fallback
/// to the ElevatedButton’s default values. To unconditionally set the button's /// to the ElevatedButton’s default values. To unconditionally set the button's
...@@ -56,7 +56,7 @@ import 'theme_data.dart'; ...@@ -56,7 +56,7 @@ import 'theme_data.dart';
/// backgroundColor: MaterialStateProperty.all<Color>(Colors.green), /// backgroundColor: MaterialStateProperty.all<Color>(Colors.green),
/// ), /// ),
/// ) /// )
///``` /// ```
/// ///
/// Configuring a ButtonStyle directly makes it possible to very /// Configuring a ButtonStyle directly makes it possible to very
/// precisely control the button’s visual attributes for all states. /// precisely control the button’s visual attributes for all states.
...@@ -77,7 +77,7 @@ import 'theme_data.dart'; ...@@ -77,7 +77,7 @@ import 'theme_data.dart';
/// TextButton( /// TextButton(
/// style: TextButton.styleFrom(primary: Colors.green), /// style: TextButton.styleFrom(primary: Colors.green),
/// ) /// )
///``` /// ```
/// ///
/// To configure all of the application's text buttons in the same /// To configure all of the application's text buttons in the same
/// way, specify the overall theme's `textButtonTheme`: /// way, specify the overall theme's `textButtonTheme`:
...@@ -90,7 +90,7 @@ import 'theme_data.dart'; ...@@ -90,7 +90,7 @@ import 'theme_data.dart';
/// ), /// ),
/// home: MyAppHome(), /// home: MyAppHome(),
/// ) /// )
///``` /// ```
/// See also: /// See also:
/// ///
/// * [TextButtonTheme], the theme for [TextButton]s. /// * [TextButtonTheme], the theme for [TextButton]s.
......
...@@ -109,7 +109,7 @@ import 'theme_data.dart'; ...@@ -109,7 +109,7 @@ import 'theme_data.dart';
/// final String label; /// final String label;
/// final EdgeInsets padding; /// final EdgeInsets padding;
/// final bool value; /// final bool value;
/// final Function onChanged; /// final ValueChanged<bool> onChanged;
/// ///
/// @override /// @override
/// Widget build(BuildContext context) { /// Widget build(BuildContext context) {
...@@ -135,7 +135,7 @@ import 'theme_data.dart'; ...@@ -135,7 +135,7 @@ import 'theme_data.dart';
/// Checkbox( /// Checkbox(
/// value: value, /// value: value,
/// onChanged: (bool? newValue) { /// onChanged: (bool? newValue) {
/// onChanged(newValue); /// onChanged(newValue!);
/// }, /// },
/// ), /// ),
/// ], /// ],
...@@ -190,7 +190,7 @@ import 'theme_data.dart'; ...@@ -190,7 +190,7 @@ import 'theme_data.dart';
/// final String label; /// final String label;
/// final EdgeInsets padding; /// final EdgeInsets padding;
/// final bool value; /// final bool value;
/// final Function onChanged; /// final ValueChanged<bool> onChanged;
/// ///
/// @override /// @override
/// Widget build(BuildContext context) { /// Widget build(BuildContext context) {
...@@ -206,7 +206,7 @@ import 'theme_data.dart'; ...@@ -206,7 +206,7 @@ import 'theme_data.dart';
/// Checkbox( /// Checkbox(
/// value: value, /// value: value,
/// onChanged: (bool? newValue) { /// onChanged: (bool? newValue) {
/// onChanged(newValue); /// onChanged(newValue!);
/// }, /// },
/// ), /// ),
/// ], /// ],
......
...@@ -120,7 +120,7 @@ import 'theme_data.dart'; ...@@ -120,7 +120,7 @@ import 'theme_data.dart';
/// final EdgeInsets padding; /// final EdgeInsets padding;
/// final bool groupValue; /// final bool groupValue;
/// final bool value; /// final bool value;
/// final Function onChanged; /// final ValueChanged<bool> onChanged;
/// ///
/// @override /// @override
/// Widget build(BuildContext context) { /// Widget build(BuildContext context) {
...@@ -132,7 +132,7 @@ import 'theme_data.dart'; ...@@ -132,7 +132,7 @@ import 'theme_data.dart';
/// groupValue: groupValue, /// groupValue: groupValue,
/// value: value, /// value: value,
/// onChanged: (bool? newValue) { /// onChanged: (bool? newValue) {
/// onChanged(newValue); /// onChanged(newValue!);
/// } /// }
/// ), /// ),
/// RichText( /// RichText(
...@@ -221,7 +221,7 @@ import 'theme_data.dart'; ...@@ -221,7 +221,7 @@ import 'theme_data.dart';
/// final EdgeInsets padding; /// final EdgeInsets padding;
/// final bool groupValue; /// final bool groupValue;
/// final bool value; /// final bool value;
/// final Function onChanged; /// final ValueChanged<bool> onChanged;
/// ///
/// @override /// @override
/// Widget build(BuildContext context) { /// Widget build(BuildContext context) {
...@@ -239,7 +239,7 @@ import 'theme_data.dart'; ...@@ -239,7 +239,7 @@ import 'theme_data.dart';
/// groupValue: groupValue, /// groupValue: groupValue,
/// value: value, /// value: value,
/// onChanged: (bool? newValue) { /// onChanged: (bool? newValue) {
/// onChanged(newValue); /// onChanged(newValue!);
/// }, /// },
/// ), /// ),
/// Text(label), /// Text(label),
......
...@@ -112,7 +112,7 @@ enum _SwitchListTileType { material, adaptive } ...@@ -112,7 +112,7 @@ enum _SwitchListTileType { material, adaptive }
/// final String label; /// final String label;
/// final EdgeInsets padding; /// final EdgeInsets padding;
/// final bool value; /// final bool value;
/// final Function onChanged; /// final ValueChanged<bool> onChanged;
/// ///
/// @override /// @override
/// Widget build(BuildContext context) { /// Widget build(BuildContext context) {
...@@ -193,7 +193,7 @@ enum _SwitchListTileType { material, adaptive } ...@@ -193,7 +193,7 @@ enum _SwitchListTileType { material, adaptive }
/// final String label; /// final String label;
/// final EdgeInsets padding; /// final EdgeInsets padding;
/// final bool value; /// final bool value;
/// final Function onChanged; /// final ValueChanged<bool> onChanged;
/// ///
/// @override /// @override
/// Widget build(BuildContext context) { /// Widget build(BuildContext context) {
......
...@@ -1139,7 +1139,7 @@ class _AnimatedAlignState extends AnimatedWidgetBaseState<AnimatedAlign> { ...@@ -1139,7 +1139,7 @@ class _AnimatedAlignState extends AnimatedWidgetBaseState<AnimatedAlign> {
/// ), /// ),
/// ); /// );
/// } /// }
///``` /// ```
/// {@end-tool} /// {@end-tool}
/// ///
/// See also: /// See also:
......
...@@ -94,7 +94,7 @@ abstract class PreferredSizeWidget implements Widget { ...@@ -94,7 +94,7 @@ abstract class PreferredSizeWidget implements Widget {
/// } /// }
/// } /// }
/// ``` /// ```
///```dart /// ```dart
/// Widget build(BuildContext context) { /// Widget build(BuildContext context) {
/// return Scaffold( /// return Scaffold(
/// appBar: PreferredSize( /// appBar: PreferredSize(
......
...@@ -50,7 +50,7 @@ class _ListenerEntry extends LinkedListEntry<_ListenerEntry> { ...@@ -50,7 +50,7 @@ class _ListenerEntry extends LinkedListEntry<_ListenerEntry> {
/// To remove the listener from a [ScrollNotificationObserver] ancestor: /// To remove the listener from a [ScrollNotificationObserver] ancestor:
/// ```dart /// ```dart
/// ScrollNotificationObserver.of(context).removeListener(listener); /// ScrollNotificationObserver.of(context).removeListener(listener);
///``` /// ```
/// ///
/// Stateful widgets that share an ancestor [ScrollNotificationObserver] typically /// Stateful widgets that share an ancestor [ScrollNotificationObserver] typically
/// add a listener in [State.didChangeDependencies] (removing the old one /// add a listener in [State.didChangeDependencies] (removing the old one
......
...@@ -163,7 +163,7 @@ class _DriverBinding extends BindingBase with SchedulerBinding, ServicesBinding, ...@@ -163,7 +163,7 @@ class _DriverBinding extends BindingBase with SchedulerBinding, ServicesBinding,
/// ///
/// final int times; /// final int times;
/// } /// }
///``` /// ```
/// ///
/// ```dart /// ```dart
/// class SomeCommandResult extends Result { /// class SomeCommandResult extends Result {
......
...@@ -28,12 +28,12 @@ const String kFontManifestJson = 'FontManifest.json'; ...@@ -28,12 +28,12 @@ const String kFontManifestJson = 'FontManifest.json';
/// The effect of adding `uses-material-design: true` to the pubspec is to insert /// The effect of adding `uses-material-design: true` to the pubspec is to insert
/// the following snippet into the asset manifest: /// the following snippet into the asset manifest:
/// ///
///```yaml /// ```yaml
/// material: /// material:
/// - family: MaterialIcons /// - family: MaterialIcons
/// fonts: /// fonts:
/// - asset: fonts/MaterialIcons-Regular.otf /// - asset: fonts/MaterialIcons-Regular.otf
///``` /// ```
const List<Map<String, Object>> kMaterialFonts = <Map<String, Object>>[ const List<Map<String, Object>> kMaterialFonts = <Map<String, Object>>[
<String, Object>{ <String, Object>{
'family': 'MaterialIcons', 'family': 'MaterialIcons',
......
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