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
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
18 changes: 12 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,17 @@ 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
/// {@macro cupertino_ui.dartpad_guide}
///
/// {@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 +207,17 @@ 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
/// {@macro cupertino_ui.dartpad_guide}
///
/// {@example /example/lib/activity_indicator/cupertino_linear_activity_indicator.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
/// See also:
///
Expand Down
9 changes: 6 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,17 @@ 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
/// {@macro cupertino_ui.dartpad_guide}
///
/// {@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
15 changes: 12 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,24 @@ 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
/// {@template cupertino_ui.dartpad_guide}
/// <small>
///
/// To see it in action, copy and run this code snippet on [DartPad](https://dartpad.dev/).
///
/// </small>
/// {@endtemplate}
///
/// {@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
9 changes: 6 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,17 @@ 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
/// {@macro cupertino_ui.dartpad_guide}
///
/// {@example /example/lib/checkbox/cupertino_checkbox.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
/// See also:
///
Expand Down
27 changes: 18 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,31 @@ 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
/// {@macro cupertino_ui.dartpad_guide}
///
/// {@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
/// {@macro cupertino_ui.dartpad_guide}
///
/// {@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 +338,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 +350,13 @@ 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
/// {@macro cupertino_ui.dartpad_guide}
///
/// {@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
18 changes: 12 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,21 @@ 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
/// {@macro cupertino_ui.dartpad_guide}
///
/// {@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 +2176,17 @@ 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
/// {@macro cupertino_ui.dartpad_guide}
///
/// {@example /example/lib/date_picker/cupertino_timer_picker.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
/// See also:
///
Expand Down
27 changes: 18 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,19 @@ 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
/// {@macro cupertino_ui.dartpad_guide}
///
/// {@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 +523,19 @@ 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
/// {@macro cupertino_ui.dartpad_guide}
///
/// {@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 +1064,19 @@ 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
/// {@macro cupertino_ui.dartpad_guide}
///
/// {@example /example/lib/dialog/cupertino_action_sheet.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
/// See also:
///
Expand Down
9 changes: 6 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,17 @@ 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
/// {@macro cupertino_ui.dartpad_guide}
///
/// {@example /example/lib/expansion_tile/cupertino_expansion_tile.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
/// See also:
///
Expand Down
9 changes: 6 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,18 @@ 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
/// {@macro cupertino_ui.dartpad_guide}
///
/// {@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
18 changes: 12 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,32 @@ 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
/// {@macro cupertino_ui.dartpad_guide}
///
/// {@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
/// {@macro cupertino_ui.dartpad_guide}
///
/// {@example /example/lib/list_section/list_section_inset.0.dart}
///
// TODO(framework): End of the @dartpad directive.
/// </callout-box>
///
/// See also:
///
Expand Down
Loading
Loading