This example demonstrates how to use the WebF Cupertino UI package to create iOS-style interfaces in WebF applications across multiple platforms.
This example app supports the following platforms:
- ✅ iOS - Native iOS app with Cupertino-style components
- ✅ Android - Android app with iOS-style components through WebF
- ✅ macOS - Desktop app for macOS
- ✅ Windows - Desktop app for Windows
- ✅ Linux - Desktop app for Linux distributions
- Flutter SDK installed
- WebF Enterprise subscription
- Platform-specific requirements:
- iOS: Xcode and iOS Simulator/Device
- Android: Android Studio and Android Emulator/Device
- macOS: Xcode
- Windows: Visual Studio with Desktop development with C++
- Linux: Development libraries (see Flutter docs)
-
Install dependencies:
flutter pub get
-
Run on your desired platform:
# iOS flutter run -d ios # Android flutter run -d android # macOS flutter run -d macos # Windows flutter run -d windows # Linux flutter run -d linux
Shows all available Cupertino UI components including:
- Buttons (plain, filled, tinted variants)
- Form controls (text input, search, textarea)
- Selection controls (switch, checkbox, radio, slider)
- Indicators (loading, toast)
Demonstrates how to build forms using:
- Form sections and form rows
- List sections and list tiles
- Various input types with proper layout
Shows different types of iOS-style dialogs:
- Alert dialogs
- Action sheets
- Date pickers
- Timer pickers
- Custom pickers
Demonstrates navigation components:
- Segmented controls (tabs)
- Tab switching with content
A comprehensive Vue.js application demonstrating all components. This example loads directly from the deployed Vercel app.
The Vue.js gallery is automatically deployed and available at the configured URL. Simply run the Flutter example app and navigate to "Cupertino Gallery (Vue.js)" to see it in action.
To customize the gallery or deploy your own version:
-
Clone the vue-cupertino-gallery repository:
git clone https://github.com/openwebf/vue-cupertino-gallery.git cd vue-cupertino-gallery -
Deploy to Vercel:
vercel
-
Update the
vercelUrlinlib/main.dartwith your deployment URL.
Note: The Vue.js gallery source code is maintained separately at: https://github.com/openwebf/vue-cupertino-gallery
-
Initialize Components: Always call
installWebFCupertinoUI()before using any components. -
WebFControllerManager: The example uses WebFControllerManager for efficient WebF instance management.
-
Event Handling: All components dispatch standard DOM events that can be handled in JavaScript:
element.addEventListener('change', (e) => { console.log('Value changed:', e.detail.value); });
-
Styling: Components can be styled with CSS while maintaining their iOS appearance.
- App Transport Security is configured to allow loading from localhost and HTTP URLs during development
- The app will request network access on first launch
- Internet permission is already configured in the manifest
- The app supports all Android versions that Flutter supports
- No special configuration required
- The app will use the system's default network settings
The example supports Flutter's hot reload for the Dart code. However, changes to the HTML/CSS/JavaScript content require a hot restart.