Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
5 changes: 5 additions & 0 deletions packages/cupertino_ui/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ analyzer:
- windows/**
- macos/**
- linux/**

linter:
rules:
# TODO(dkwingsmt): Remove when https://github.com/dart-lang/sdk/issues/63777 is fixed.
unintended_html_in_doc_comment: false
14 changes: 8 additions & 6 deletions packages/cupertino_ui/lib/src/activity_indicator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ const Color _kActiveTickColor = CupertinoDynamicColor.withBrightness(
///
/// {@youtube 560 315 https://www.youtube.com/watch?v=AENVH-ZqKDQ}
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// This example shows how [CupertinoActivityIndicator] can be customized.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/activity_indicator/cupertino_activity_indicator.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
Comment thread
dkwingsmt marked this conversation as resolved.
///
/// See also:
///
Expand Down Expand Up @@ -204,14 +205,15 @@ class _CupertinoActivityIndicatorPainter extends CustomPainter {
/// The [CupertinoLinearActivityIndicator] is a linear progress bar that
/// displays a colored bar to indicate the progress of an ongoing task.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// This example shows how [CupertinoLinearActivityIndicator] can be customized.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/activity_indicator/cupertino_linear_activity_indicator.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
/// See also:
///
Expand Down
7 changes: 4 additions & 3 deletions packages/cupertino_ui/lib/src/bottom_tab_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,15 @@ const Color _kDefaultTabBarInactiveColor = CupertinoColors.inactiveGray;
/// this behavior, wrap each of the `navigationBar`'s components inside a
/// [MediaQuery] with the desired [TextScaler].
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// This example shows a [CupertinoTabBar] placed in a [CupertinoTabScaffold].
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/bottom_tab_bar/cupertino_tab_bar.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
Comment thread
dkwingsmt marked this conversation as resolved.
///
/// See also:
///
Expand Down
7 changes: 4 additions & 3 deletions packages/cupertino_ui/lib/src/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ enum _CupertinoButtonStyle {
/// with the [CupertinoThemeData.primaryColor] (or
/// [CupertinoThemeData.primaryContrastingColor] if the button is disabled).
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// This sample shows produces an enabled and disabled [CupertinoButton] and
/// [CupertinoButton.filled].
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/button/cupertino_button.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
Comment thread
dkwingsmt marked this conversation as resolved.
///
/// See also:
///
Expand Down
7 changes: 4 additions & 3 deletions packages/cupertino_ui/lib/src/checkbox.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,15 @@ const List<double> _kDisabledDarkGradientOpacities = <double>[0.08, 0.14];
/// [kMinInteractiveDimensionCupertino] pixels to meet accessibility
/// guidelines.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// This example shows a toggleable [CupertinoCheckbox].
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/checkbox/cupertino_checkbox.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
/// See also:
///
Expand Down
21 changes: 12 additions & 9 deletions packages/cupertino_ui/lib/src/context_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,25 +96,27 @@ enum _ContextMenuLocation { center, left, right }
/// background or by calling `Navigator.pop(context)`. Unlike [PopupRoute], it can
/// also be closed by swiping downwards.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// This sample shows a very simple [CupertinoContextMenu] for the Flutter logo.
/// Long press on it to open.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/context_menu/cupertino_context_menu.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// This sample shows a similar CupertinoContextMenu, this time using [builder]
/// to add a border radius to the widget.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/context_menu/cupertino_context_menu.1.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
/// See also:
///
Expand Down Expand Up @@ -332,8 +334,7 @@ class CupertinoContextMenu extends StatefulWidget {
///
// TODO(framework): End of the blue example container.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// Additionally below is an example of a real world use case for [builder].
///
Expand All @@ -345,9 +346,11 @@ class CupertinoContextMenu extends StatefulWidget {
/// like [CupertinoContextMenu.kEndBoxShadow], to match the native iOS
/// animation as close as desired.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/context_menu/cupertino_context_menu.1.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
final CupertinoContextMenuBuilder builder;

// TODO(mitchgoodwin): deprecate [child] with builder refactor https://github.com/flutter/flutter/issues/116306
Expand Down
14 changes: 8 additions & 6 deletions packages/cupertino_ui/lib/src/date_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -230,18 +230,19 @@ enum _PickerColumnType {
/// full screen width. Content texts are shown with
/// [CupertinoTextThemeData.dateTimePickerTextStyle].
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// This sample shows how to implement CupertinoDatePicker with different picker modes.
/// We can provide initial dateTime value for the picker to display. When user changes
/// the drag the date or time wheels, the picker will call onDateTimeChanged callback.
///
/// CupertinoDatePicker can be displayed directly on a screen or in a popup.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/date_picker/cupertino_date_picker.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
/// See also:
///
Expand Down Expand Up @@ -2173,14 +2174,15 @@ enum CupertinoTimerPickerMode {
/// provides more space than it needs, the picker will position itself according
/// to its [alignment] property.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// This example shows a [CupertinoTimerPicker] that returns a countdown duration.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/date_picker/cupertino_timer_picker.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
/// See also:
///
Expand Down
21 changes: 12 additions & 9 deletions packages/cupertino_ui/lib/src/dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,17 @@ bool _isInAccessibilityMode(BuildContext context) {
/// Typically passed as the child widget to [showDialog], which displays the
/// dialog.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// This sample shows how to use a [CupertinoAlertDialog].
/// The [CupertinoAlertDialog] shows an alert with a set of two choices
/// when [CupertinoButton] is pressed.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/dialog/cupertino_alert_dialog.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
Comment thread
dkwingsmt marked this conversation as resolved.
///
/// See also:
///
Expand Down Expand Up @@ -520,16 +521,17 @@ class _CupertinoAlertDialogState extends State<CupertinoAlertDialog> {
/// which is useful for more complicated layouts, such as rendering divider gaps
/// in [CupertinoAlertDialog] or rendering custom surface colors.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// This sample shows how to use a [CupertinoPopupSurface]. The [CupertinoPopupSurface]
/// shows a modal popup from the bottom of the screen.
/// Toggle the switch to configure its surface color.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/dialog/cupertino_popup_surface.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
/// See also:
///
Expand Down Expand Up @@ -1058,16 +1060,17 @@ class _ActionSheetGestureDetector extends StatelessWidget {
/// [showCupertinoModalPopup], which displays the action sheet by sliding it up
/// from the bottom of the screen.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// This sample shows how to use a [CupertinoActionSheet].
/// The [CupertinoActionSheet] shows a modal popup that slides in from the
/// bottom when [CupertinoButton] is pressed.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/dialog/cupertino_action_sheet.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
/// See also:
///
Expand Down
7 changes: 4 additions & 3 deletions packages/cupertino_ui/lib/src/expansion_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@ enum ExpansionTileTransitionMode {
/// A single-line [CupertinoListTile] with an expansion arrow icon that expands
/// or collapses the tile to reveal or hide the [child].
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// This example shows how to use [CupertinoExpansionTile] with different transition modes.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/expansion_tile/cupertino_expansion_tile.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
/// See also:
///
Expand Down
7 changes: 4 additions & 3 deletions packages/cupertino_ui/lib/src/form_row.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,16 @@ const EdgeInsetsGeometry _kDefaultPadding = EdgeInsetsDirectional.fromSTEB(20.0,
/// be shown in [CupertinoColors.destructiveRed] coloring and
/// medium-weighted font.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// Creates a [CupertinoFormSection] containing a [CupertinoFormRow] with [prefix],
/// [child], [helper] and [error] specified.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/form_row/cupertino_form_row.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
class CupertinoFormRow extends StatelessWidget {
/// Creates an iOS-style split form row with a standard prefix and child widget.
Expand Down
14 changes: 8 additions & 6 deletions packages/cupertino_ui/lib/src/list_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -161,26 +161,28 @@ enum CupertinoListSectionType {
///
/// {@macro flutter.material.Material.clipBehavior}
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// Creates a base [CupertinoListSection] containing [CupertinoListTile]s with
/// `leading`, `title`, `additionalInfo` and `trailing` widgets.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/list_section/list_section_base.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// Creates an "Inset Grouped" [CupertinoListSection] containing
/// notched [CupertinoListTile]s with `leading`, `title`, `additionalInfo` and
/// `trailing` widgets.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/list_section/list_section_inset.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
/// See also:
///
Expand Down
7 changes: 4 additions & 3 deletions packages/cupertino_ui/lib/src/list_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,16 @@ enum _CupertinoListTileType { base, notched }
/// behavior it should not be used for example to toggle the [CupertinoSwitch]
/// in the trailing widget.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// <callout-box>
///
/// This example uses a [ListView] to demonstrate different configurations of
/// [CupertinoListTile]s.
///
// TODO(framework): Replace the following block with a @dartpad directive
// when it's supported. https://github.com/dart-lang/dartdoc/issues/4123
/// {@example /example/lib/list_tile/cupertino_list_tile.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
/// See also:
///
Expand Down
Loading
Loading