Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/material_ui/example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This file is also used by dev/bots/analyze_snippet_code.dart to analyze code snippets (`{@tool snippet}` sections).

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
analyzer:
Expand Down
9 changes: 6 additions & 3 deletions packages/material_ui/lib/src/about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,15 @@ import 'theme.dart';
/// If your application does not have a [Drawer], you should provide an
/// affordance to call [showAboutDialog] or (at least) [showLicensePage].
///
/// {@tool dartpad}
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
///
/// This sample shows two ways to open [AboutDialog]. The first one
/// uses an [AboutListTile], and the second uses the [showAboutDialog] function.
///
/// ** See code in examples/api/lib/material/about/about_list_tile.0.dart **
/// {@end-tool}
/// {@example /example/lib/about/about_list_tile.0.dart}
///
// TODO(framework): End of the @dartpad directive.
class AboutListTile extends StatelessWidget {
/// Creates a list tile for showing an about box.
///
Expand Down
9 changes: 6 additions & 3 deletions packages/material_ui/lib/src/action_chip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,15 @@ enum _ChipVariant { flat, elevated }
///
/// Requires one of its ancestors to be a [Material] widget.
///
/// {@tool dartpad}
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
///
/// This example shows how to create an [ActionChip] with a leading icon.
/// The icon is updated when the [ActionChip] is pressed.
///
/// ** See code in examples/api/lib/material/action_chip/action_chip.0.dart **
/// {@end-tool}
/// {@example /example/lib/action_chip/action_chip.0.dart}
///
// TODO(framework): End of the @dartpad directive.
///
/// ## Material Design 3
///
Expand Down
9 changes: 6 additions & 3 deletions packages/material_ui/lib/src/action_icons_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,15 @@ class ActionIconThemeData with Diagnosticable {
/// [CloseButtonIcon], [DrawerButtonIcon], and [EndDrawerButtonIcon] in this
/// widget's subtree.
///
/// {@tool dartpad}
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
///
/// This example shows how to define custom builders for drawer and back
/// buttons.
///
/// ** See code in examples/api/lib/material/action_buttons/action_icon_theme.0.dart **
/// {@end-tool}
/// {@example /example/lib/action_buttons/action_icon_theme.0.dart}
///
// TODO(framework): End of the @dartpad directive.
class ActionIconTheme extends InheritedTheme {
/// Creates a theme that overrides the default icon of [BackButtonIcon],
/// [CloseButtonIcon], [DrawerButtonIcon], and [EndDrawerButtonIcon] in this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,15 @@ class AdaptiveTextSelectionToolbar extends StatelessWidget {
/// button appearance for the given platform, but where the toolbar and/or the
/// button actions and labels may be custom.
///
/// {@tool dartpad}
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
///
/// This sample demonstrates how to use `getAdaptiveButtons` to generate
/// default button widgets in a custom toolbar.
///
/// ** See code in examples/api/lib/material/context_menu/editable_text_toolbar_builder.2.dart **
/// {@end-tool}
/// {@example /example/lib/context_menu/editable_text_toolbar_builder.2.dart}
///
// TODO(framework): End of the @dartpad directive.
///
/// See also:
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ part of material_animated_icons; // ignore: use_string_in_part_of_directives
///
/// {@youtube 560 315 https://www.youtube.com/watch?v=pJcbh8pbvJs}
///
/// {@tool dartpad}
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
///
/// This example shows how to create an animated icon. The icon is animated
/// forward and reverse in a loop.
///
/// ** See code in examples/api/lib/material/animated_icon/animated_icon.0.dart **
/// {@end-tool}
/// {@example /example/lib/animated_icon/animated_icon.0.dart}
///
// TODO(framework): End of the @dartpad directive.
///
/// See also:
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ part of material_animated_icons; // ignore: use_string_in_part_of_directives
///
/// Use with [AnimatedIcon] class to show specific animated icons.
///
/// {@tool dartpad}
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
///
/// This example shows how to create an animated icon. The icon is animated
/// forward and reverse in a loop.
///
/// ** See code in examples/api/lib/material/animated_icon/animated_icons_data.0.dart **
/// {@end-tool}
/// {@example /example/lib/animated_icon/animated_icons_data.0.dart}
///
// TODO(framework): End of the @dartpad directive.
///
/// See also:
///
Expand Down
54 changes: 41 additions & 13 deletions packages/material_ui/lib/src/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ enum ThemeMode {
/// If [home], [routes], [onGenerateRoute], and [onUnknownRoute] are all null,
/// and [builder] is not null, then no [Navigator] is created.
///
/// {@tool snippet}
// TODO(framework): Replace the following block with a blue example container
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243
// TODO(framework): Add unit tests to this code snippet.
// https://github.com/flutter/flutter/issues/188530
///
/// This example shows how to create a [MaterialApp] that disables the "debug"
/// banner with a [home] route that will be displayed when the app is launched.
///
Expand All @@ -134,9 +138,14 @@ enum ThemeMode {
/// debugShowCheckedModeBanner: false,
/// )
/// ```
/// {@end-tool}
///
/// {@tool snippet}
// TODO(framework): End of the blue example container.
///
// TODO(framework): Replace the following block with a blue example container
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243
// TODO(framework): Add unit tests to this code snippet.
// https://github.com/flutter/flutter/issues/188530
///
/// This example shows how to create a [MaterialApp] that uses the [routes]
/// `Map` to define the "home" route and an "about" route.
///
Expand All @@ -160,9 +169,14 @@ enum ThemeMode {
/// },
/// )
/// ```
/// {@end-tool}
///
/// {@tool snippet}
// TODO(framework): End of the blue example container.
///
// TODO(framework): Replace the following block with a blue example container
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243
// TODO(framework): Add unit tests to this code snippet.
// https://github.com/flutter/flutter/issues/188530
///
/// This example shows how to create a [MaterialApp] that defines a [theme] that
/// will be used for material widgets in the app.
///
Expand All @@ -181,7 +195,8 @@ enum ThemeMode {
/// ),
/// )
/// ```
/// {@end-tool}
///
// TODO(framework): End of the blue example container.
///
/// ## Troubleshooting
///
Expand Down Expand Up @@ -679,7 +694,11 @@ class MaterialApp extends StatefulWidget {
final bool debugShowCheckedModeBanner;

/// {@macro flutter.widgets.widgetsApp.shortcuts}
/// {@tool snippet}
// TODO(framework): Replace the following block with a blue example container
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243
// TODO(framework): Add unit tests to this code snippet.
// https://github.com/flutter/flutter/issues/188530
///
/// This example shows how to add a single shortcut for
/// [LogicalKeyboardKey.select] to the default shortcuts without needing to
/// add your own [Shortcuts] widget.
Expand All @@ -702,12 +721,17 @@ class MaterialApp extends StatefulWidget {
/// );
/// }
/// ```
/// {@end-tool}
///
// TODO(framework): End of the blue example container.
/// {@macro flutter.widgets.widgetsApp.shortcuts.seeAlso}
final Map<ShortcutActivator, Intent>? shortcuts;

/// {@macro flutter.widgets.widgetsApp.actions}
/// {@tool snippet}
// TODO(framework): Replace the following block with a blue example container
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243
// TODO(framework): Add unit tests to this code snippet.
// https://github.com/flutter/flutter/issues/188530
///
/// This example shows how to add a single action handling an
/// [ActivateAction] to the default actions without needing to
/// add your own [Actions] widget.
Expand Down Expand Up @@ -735,7 +759,8 @@ class MaterialApp extends StatefulWidget {
/// );
/// }
/// ```
/// {@end-tool}
///
// TODO(framework): End of the blue example container.
/// {@macro flutter.widgets.widgetsApp.actions.seeAlso}
final Map<Type, Action<Intent>>? actions;

Expand Down Expand Up @@ -791,12 +816,15 @@ class MaterialApp extends StatefulWidget {
///
/// To disable the theme animation, use [AnimationStyle.noAnimation].
///
/// {@tool dartpad}
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
///
/// This sample showcases how to override the theme animation curve and
/// duration in the [MaterialApp] widget using [AnimationStyle].
///
/// ** See code in examples/api/lib/material/app/app.0.dart **
/// {@end-tool}
/// {@example /example/lib/app/app.0.dart}
///
// TODO(framework): End of the @dartpad directive.
final AnimationStyle? themeAnimationStyle;

@override
Expand Down
Loading
Loading