cupertino_native library
Cupertino Native Extra - Native iOS widgets for Flutter
This plugin provides pixel-perfect native iOS widgets with liquid glass effects, using native UIKit rendering for authentic Apple design language implementation. All widgets support dark mode and iOS 14+ features.
Quick Start
Import the package:
import 'package:cupertino_native_extra/cupertino_native.dart';
Core Components
Navigation
- CNNavigationBar - Native iOS navigation bar with blur effect
- CNNavigationBar.scrollable - Large title with smooth collapse animation
- CNToolbar - Native iOS toolbar for top/bottom placement
Controls
- CNButton - 8 native iOS button styles
- CNSlider - Native iOS slider with step support
- CNSwitch - Native toggle switch
- CNSegmentedControl - Native segmented control
Menus & Popups
- CNPopupMenuButton - Context menu from button
- CNPopupButton - Dropdown selection menu
- CNPullDownButton - Pull-down menu (iOS 13+)
- CNPullDownButtonAnchor - Anchored popup menu (iOS 14+)
Pickers & Search
- CNTabBar - Native tab bar with badges
- CNSearchBar - Native search bar with scope
- CNNativeSearchController - Fullscreen search (iOS 16+)
Sheets & Dialogs
- CNActionSheet - Native action sheet/menu
- CNAlert - Native alert dialog
- CNSheet - Native bottom sheet with detents
Styling
- CNIcon - SF Symbols with rendering modes
- CNSymbol - SF Symbol description
- CNButtonStyle - 8 button style options
Key Features
- Pixel-Perfect: True native UIKit rendering
- Liquid Glass: Frosted glass blur effects
- Dark Mode: Full light/dark mode support
- Accessibility: Native accessibility integration
- Performance: Hardware-accelerated animations
- Type-Safe: Full Dart type safety
Platform Support
- iOS 14.0+
- macOS 11.0+
Architecture
The plugin uses:
- Platform channels for Swift/Objective-C communication
- UIKit/AppKit for native rendering
- Method channels for configuration
- PlatformView for widget embedding
Example
CNButton(
label: 'Save',
style: CNButtonStyle.filled,
onPressed: () => print('Tapped'),
)
Classes
- CNActionSheet
- Native iOS Action Sheet
- CNActionSheetAction
- Represents a single action in an action sheet
- CNAlert
- A native iOS/macOS alert dialog.
- CNAlertAction
- Represents an action button in an alert.
- CNBottomToolbar
- A native iOS bottom toolbar with expandable search.
- CNButton
- A Cupertino-native push button.
- CNCustomSheet
- A custom widget sheet presentation using Flutter overlay rendering.
- CNCustomSheetItem
- An item to display in a custom widget sheet
- CNIcon
- A platform-rendered SF Symbol icon.
- CNNativeSearchController
- Native iOS search controller that displays a fullscreen search interface.
- CNNativeSheet
- A native iOS/macOS sheet presentation using UIKit rendering.
- A Cupertino-native navigation bar with liquid glass translucent effect.
- Action item for navigation bar trailing/leading positions.
- CNPopupButton
- A Cupertino-native popup button that displays a menu of mutually exclusive options.
- CNPopupMenuButton
- A Cupertino-native popup menu button.
- CNPopupMenuDivider
- A visual divider between popup menu items.
- CNPopupMenuEntry
- Base type for entries in a CNPopupMenuButton menu.
- CNPopupMenuItem
- A selectable item in a popup menu.
- CNPullDownButton
- A Cupertino-native pull-down button.
- CNPullDownButtonAnchor
- A Cupertino-native pull-down button with automatic menu anchoring.
- CNPullDownInlineAction
- An individual inline action button.
- CNPullDownMenuDivider
- A visual divider between pull-down menu items.
- CNPullDownMenuEntry
- Base type for entries in a CNPullDownButton menu.
- CNPullDownMenuInlineActions
- A horizontal row of inline action buttons in a pull-down menu.
- CNPullDownMenuItem
- A selectable item in a pull-down menu.
- A submenu in a pull-down menu.
- CNSearchBar
- A native iOS UISearchBar widget.
- CNSearchConfig
- Configuration for search integration in native components.
- CNSearchField
- An iOS-style search field that follows Apple HIG best practices.
- CNSegmentedControl
- A Cupertino-native segmented control.
- CNSheet
- Backward compatibility class for CNSheet
- CNSheetDetent
- Detent heights for resizable sheets (iOS only)
- CNSheetInlineAction
- An individual inline action button for sheets.
- CNSheetInlineActions
- A horizontal row of inline action buttons in a native sheet.
- CNSheetItem
- An item to display in a native sheet
- CNSheetItemRow
- A horizontal row of vertical-style items displayed side-by-side.
- CNSlider
- A Cupertino-native slider rendered by the host platform.
- CNSliderController
- Controller for a CNSlider allowing imperative changes to the native NSSlider/UISlider instance.
- CNSwitch
- A Cupertino-native switch rendered by the host platform.
- CNSwitchController
- Controller for a CNSwitch that allows imperative updates from Dart to the underlying native UISwitch/NSSwitch instance.
- CNSymbol
- Describes an SF Symbol to render natively.
- CNTabBar
- A Cupertino-native tab bar. Uses native UITabBar/NSTabView style visuals.
- CNTabBarItem
- Immutable data describing a single tab bar item.
- CNToolbar
- A Cupertino-native toolbar with liquid glass translucent effect.
- CNToolbarAction
- Action item for toolbar trailing/leading positions.
- CNTransformingToolbar
- A bottom toolbar that transforms between search mode and tab bar mode.
- CupertinoNative
- Top-level facade for simple plugin interactions.
- CupertinoNativePlatform
- Platform interface for Cupertino Native Extra plugin.
- IOS26NativeSearchTabBar
- iOS 26+ Native Tab Bar with Search Support
- MethodChannelCupertinoNative
- Method channel implementation of CupertinoNativePlatform.
- NativeTabConfig
- Configuration for a native tab
- ToolbarTab
- Represents a tab in the transforming toolbar
Enums
- CNActionSheetButtonStyle
- Button style for action sheet actions
- CNAlertActionStyle
- Style for alert buttons.
- CNAutocapitalizationType
- Auto-capitalization type
- CNAutocorrectionType
- Auto-correction type
- CNButtonStyle
- Visual styles for CNButton and related controls.
- CNKeyboardAppearance
- Keyboard appearance
- CNKeyboardType
- Keyboard type
- CNReturnKeyType
- Return key type
- CNSearchBarStyle
- Search bar visual style
- CNSpellCheckingType
- Spell checking type
- CNSymbolRenderingMode
- Rendering modes for SF Symbols in native iOS widgets.
- CNToolbarMiddleAlignment
- Alignment options for middle toolbar actions.
Typedefs
- SearchResultsBuilder = Widget Function(BuildContext context, String searchText)
- Callback for search text changes with search results.