cupertino_native library Main
Native Cupertino widgets for Flutter with Liquid Glass support.
This library provides native iOS and macOS widgets including buttons, sliders, switches, tab bars, and more. Supports Liquid Glass effects on iOS 26+ and macOS 26+.
Getting Started
Import this library to access all Cupertino native widgets:
import 'package:cupertino_native_better/cupertino_native.dart';
Available Components
- CNButton - Native button with multiple styles including glass effects
- CNSlider - Native slider control
- CNSwitch - Native toggle switch
- CNSegmentedControl - Native segmented control
- CNTabBar - Native tab bar
- CNIcon - SF Symbols icon renderer
- CNGlassButtonGroup - Glass button group with Liquid Glass effects
CNLiquidGlassContainer- Container with Liquid Glass background
Classes
- CNButton
- A Cupertino-native push button.
- CNButtonConfig
- Configuration for CNButton with default values.
- CNGlassButtonGroup
- A group of buttons that can be rendered together for proper Liquid Glass blending effects.
- CNIcon
- A platform-rendered SF Symbol icon, custom image asset, or IconData.
- CNImageAsset
- Describes a custom image asset to render natively.
- CNPopupGesture
- A widget that wraps a child and shows a popup menu on long press.
- 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.
- CNSegmentedControl
- A Cupertino-native segmented control.
- 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.
- CupertinoNative
- Top-level facade for simple plugin interactions.
- CupertinoNativePlatform
- The platform interface that platform implementations of this plugin must extend.
- LiquidGlassConfig
- Configuration for Liquid Glass effects.
- LiquidGlassContainer
- A container that applies Liquid Glass effects to its child widget.
- MethodChannelCupertinoNative
- An implementation of CupertinoNativePlatform that uses method channels.
- PlatformVersion
- Utility class for checking OS version with caching and auto-initialization.
- ThemeHelper
- Utility class for accessing theme data with fallback support.
Enums
- CNButtonStyle
- Visual styles for CNButton and related controls.
- CNGlassEffect
- Liquid Glass effect variants for iOS 26+.
- CNGlassEffectShape
- Shapes for Liquid Glass effects.
- CNImagePlacement
- Image placement options for buttons with both image and label.
- CNSymbolRenderingMode
- Rendering modes for SF Symbols.
Extensions
- LiquidGlassExtension on Widget
- Extension on Widget to apply Liquid Glass effects.