Latest samples and snippets for cupertino

Cupertino:App

CUPERTINO APP

Cupertino:Switch

CUPERTINO SWITCH

Cupertino:Icons

CUPERTINO ICONS

Cupertino:Dialog

This sample shows how to use a [CupertinoAlertDialog]. The [CupertinoAlertDialog] shows an alert with a set of two choices when [CupertinoButton] is pressed.
CUPERTINO DIALOG

Cupertino:Refresh

When the user scrolls past [refreshTriggerPullDistance], this sample shows the default iOS pull to refresh indicator for 1 second and adds a new item to the top of the list view.
CUPERTINO REFRESH

Cupertino:Colors

CUPERTINO COLORS

Cupertino:TextFormFieldRow

This example shows how to move the focus to the next field when the user presses the SPACE key.
CUPERTINO TEXTFORMFIELDROW

Cupertino:DatePicker

This sample shows how to implement CupertinoDatePicker with different picker modes. We can provide intiial 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.
CUPERTINO DATEPICKER

Cupertino:NavBar

This example shows a [CupertinoNavigationBar] placed in a [CupertinoPageScaffold]. Since [backgroundColor]'s opacity is not 1.0, there is a blur effect and content slides underneath.
CUPERTINO NAVBAR

Cupertino:SlidingSegmentedControl

CUPERTINO SLIDINGSEGMENTEDCONTROL

Cupertino:App

CUPERTINO APP

Cupertino:DatePicker

This example shows a [CupertinoTimerPicker] that returns a countdown duration.
CUPERTINO DATEPICKER

Cupertino:Dialog

This sample shows how to use a [CupertinoActionSheet]. The [CupertinoActionSheet] shows a modal popup that slides in from the bottom when [CupertinoButton] is pressed.
CUPERTINO DIALOG

Cupertino:App

CUPERTINO APP

Cupertino:PageScaffold

This example shows a [CupertinoPageScaffold] with a [ListView] as a [child]. The [CupertinoButton] is connected to a callback that increments a counter. The [backgroundColor] can be changed.
CUPERTINO PAGESCAFFOLD

Cupertino:App

CUPERTINO APP

Cupertino:BottomTabBar

This example shows a [CupertinoTabBar] placed in a [CupertinoTabScaffold].
CUPERTINO BOTTOMTABBAR

Cupertino:SearchField

CUPERTINO SEARCHFIELD

Cupertino:Route

This sample demonstrates how to create a restorable Cupertino dialog. This is accomplished by enabling state restoration by specifying [CupertinoApp.restorationScopeId] and using [Navigator.restorablePush] to push [CupertinoDialogRoute] when the [CupertinoButton] is tapped. {@macro flutter.widgets.RestorationManager}
CUPERTINO ROUTE

Cupertino:NavBar

This example shows [CupertinoSliverNavigationBar] in action inside a [CustomScrollView].
CUPERTINO NAVBAR

Cupertino:Scrollbar

When [thumbVisibility] is true, the scrollbar thumb will remain visible without the fade animation. This requires that a [ScrollController] is provided to controller, or that the [PrimaryScrollController] is available. [isAlwaysShown] is deprecated in favor of `thumbVisibility`.
CUPERTINO SCROLLBAR

Cupertino:Button

This sample shows produces an enabled and disabled [CupertinoButton] and [CupertinoButton.filled].
CUPERTINO BUTTON

Cupertino:TextField

This example shows how to set the initial value of the `CupertinoTextField` using a [controller] that already contains some text.
CUPERTINO TEXTFIELD

Cupertino:ContextMenu

CUPERTINO CONTEXTMENU

Cupertino:Slider

CUPERTINO SLIDER

Cupertino:TabScaffold

CUPERTINO TABSCAFFOLD

Cupertino:SegmentedControl

This example shows a [CupertinoSegmentedControl] with an enum type. The callback provided to [onValueChanged] should update the state of the parent [StatefulWidget] using the [State.setState] method, so that the parent gets rebuilt; for example:
CUPERTINO SEGMENTEDCONTROL

Cupertino:Slider

This example shows how to show the current slider value as it changes.
CUPERTINO SLIDER

Cupertino:Picker

This example shows a [CupertinoPicker] that displays a list of fruits on a wheel for selection.
CUPERTINO PICKER

Cupertino:Scrollbar

This sample shows a [CupertinoScrollbar] that fades in and out of view as scrolling occurs. The scrollbar will fade into view as the user scrolls, and fade out when scrolling stops. The `thickness` of the scrollbar will animate from 6 pixels to the `thicknessWhileDragging` of 10 when it is dragged by the user. The `radius` of the scrollbar thumb corners will animate from 34 to the `radiusWhileDragging` of 0 when the scrollbar is being dragged by the user.
CUPERTINO SCROLLBAR

Cupertino:TabScaffold

CUPERTINO TABSCAFFOLD

Cupertino:FormRow

CUPERTINO FORMROW

Cupertino:Route

This sample demonstrates how to create a restorable Cupertino modal route. This is accomplished by enabling state restoration by specifying [CupertinoApp.restorationScopeId] and using [Navigator.restorablePush] to push [CupertinoModalPopupRoute] when the [CupertinoButton] is tapped. {@macro flutter.widgets.RestorationManager}
CUPERTINO ROUTE

Cupertino:SlidingSegmentedControl

This example shows a [CupertinoSlidingSegmentedControl] with an enum type. The callback provided to [onValueChanged] should update the state of the parent [StatefulWidget] using the [State.setState] method, so that the parent gets rebuilt; for example:
CUPERTINO SLIDINGSEGMENTEDCONTROL

Cupertino:App

CUPERTINO APP

Cupertino:TextFormFieldRow

CUPERTINO TEXTFORMFIELDROW

Cupertino:SearchField

CUPERTINO SEARCHFIELD

Cupertino:ContextMenu

This sample shows a very simple CupertinoContextMenu for an empty red 100x100 Container. Simply long press on it to open.
CUPERTINO CONTEXTMENU