mirror of
https://github.com/flutter/flutter.git
synced 2026-02-15 07:11:44 +08:00
Fix errors in examples (#87962)
This commit is contained in:
parent
d8da091751
commit
cb651352dd
@ -44,7 +44,7 @@ import 'theme_data.dart';
|
||||
/// ),
|
||||
/// ),
|
||||
/// )
|
||||
///```
|
||||
/// ```
|
||||
///
|
||||
/// 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
|
||||
@ -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 button’s 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.
|
||||
|
||||
@ -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!);
|
||||
/// },
|
||||
/// ),
|
||||
/// ],
|
||||
|
||||
@ -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),
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -1139,7 +1139,7 @@ class _AnimatedAlignState extends AnimatedWidgetBaseState<AnimatedAlign> {
|
||||
/// ),
|
||||
/// );
|
||||
/// }
|
||||
///```
|
||||
/// ```
|
||||
/// {@end-tool}
|
||||
///
|
||||
/// See also:
|
||||
|
||||
@ -94,7 +94,7 @@ abstract class PreferredSizeWidget implements Widget {
|
||||
/// }
|
||||
/// }
|
||||
/// ```
|
||||
///```dart
|
||||
/// ```dart
|
||||
/// Widget build(BuildContext context) {
|
||||
/// return Scaffold(
|
||||
/// appBar: PreferredSize(
|
||||
|
||||
@ -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
|
||||
|
||||
@ -163,7 +163,7 @@ class _DriverBinding extends BindingBase with SchedulerBinding, ServicesBinding,
|
||||
///
|
||||
/// final int times;
|
||||
/// }
|
||||
///```
|
||||
/// ```
|
||||
///
|
||||
/// ```dart
|
||||
/// class SomeCommandResult extends Result {
|
||||
|
||||
@ -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',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user