Flutter watch app begins
Hey!, I have tried the new Flutter watch app, and it’s just beginning. Let's see how I have implemented it.
First, open your iOS folder from a Flutter project with Xcode, create a new target (File -> New -> Target), and select a watchOS “App”.
To implement a Flutter watchOS app on iOS, you need to integrate native code. The process involves the following steps:
- SwiftUI Interface: Create the user interface for the watchOS app using SwiftUI.
- Update Native Code: Modify the
Runner/AppDelegate.swift
file to establish communication between the Flutter app and the watchOS component. - Configure Dart-WatchOS Bridge: Adjust the
watch_interface.dart
file to handle interactions and data exchange between the Flutter codebase and the watchOS app.
This approach leverages native watchOS capabilities while integrating seamlessly with Flutter.
Currently, there are no existing packages available for developing watchOS apps in Flutter. To address this gap, I plan to create my own library specifically for Flutter watchOS integration. Stay tuned for more details in part 2!
Thanks for the reading! Happy coding!!