Skip to content

(WIP -experiment) feat: add flutter-convert-to-flutter skill for native Android and iOS migrations - #237

Open
jwren wants to merge 1 commit into
flutter:mainfrom
jwren:new-flutter-convert-to-flutter
Open

jwren wants to merge 1 commit into
flutter:mainfrom
jwren:new-flutter-convert-to-flutter

Conversation

@jwren

@jwren jwren commented Sep 15, 2026

Copy link
Copy Markdown
Member

Add a unified Agent Skill flutter-convert-to-flutter to guide migrating native mobile applications from Android (Java, Kotlin) and iOS (Objective-C, Swift) to Dart and Flutter.

  • Structure skill using progressive disclosure:
    • Root SKILL.md contains core Flutter paradigms, declarative UI mental model, Dart 3 type system, universal subsystem mapping, and interop decision trees.
    • reference/android.md: Android Java migration guide (Activities, XML, Room, Retrofit, Threads/RxJava, Pigeon/JNI).
    • reference/kotlin.md: Android Kotlin migration guide (Compose, Coroutines, Flow, data/sealed classes, Drift, Dio).
    • reference/swift.md: iOS Swift & SwiftUI migration guide (SwiftUI, async/await, Combine, structs, Codable, Pigeon).
    • reference/objective-c.md: iOS Objective-C & UIKit migration guide (UIKit, Foundation types, GCD, ffigen FFI interop).

… migrations

Add a unified Agent Skill `flutter-convert-to-flutter` to guide migrating native
mobile applications from Android (Java, Kotlin) and iOS (Objective-C, Swift) to
Dart and Flutter.

- Structure skill using progressive disclosure:
  - Root `SKILL.md` contains core Flutter paradigms, declarative UI mental model,
    Dart 3 type system, universal subsystem mapping, and interop decision trees.
  - `reference/android.md`: Android Java migration guide (Activities, XML, Room,
    Retrofit, Threads/RxJava, Pigeon/JNI).
  - `reference/kotlin.md`: Android Kotlin migration guide (Compose, Coroutines,
    Flow, data/sealed classes, Drift, Dio).
  - `reference/swift.md`: iOS Swift & SwiftUI migration guide (SwiftUI, async/await,
    Combine, structs, Codable, Pigeon).
  - `reference/objective-c.md`: iOS Objective-C & UIKit migration guide (UIKit,
    Foundation types, GCD, ffigen FFI interop).

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive new skill, flutter-convert-to-flutter, which provides detailed documentation and guides for migrating native Android (Java/Kotlin) and iOS (Objective-C/Swift) applications to Flutter. The feedback highlights a few copy-paste errors in the Swift migration guide where 'Jetpack Compose' was incorrectly referenced instead of 'SwiftUI', and suggests replacing LaTeX math arrows with standard Unicode arrows in the main skill file to avoid potential Markdown rendering issues.

| `.map { ... }` | `stream.map((event) => ...)` |
| `.filter { ... }` | `stream.where((event) => ...)` |
| `.debounce(for: .seconds(0.5))` | `stream.debounceTime(Duration(milliseconds: 500))` (`rxdart`) |
| `.sink { value in ... }` | `stream.listen((value) { ... })` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In the Swift & SwiftUI migration guide, the table header incorrectly references 'Jetpack Compose' instead of 'SwiftUI'. This appears to be a copy-paste error from the Android/Kotlin guide.

Suggested change
| `.sink { value in ... }` | `stream.listen((value) { ... })` |
| SwiftUI | Flutter Equivalent | Notes |

| `Spacer()` | `Spacer()` | Expands to fill flex space |
| `Divider()` | `Divider()` | Rule separator |
| `Text("...")` | `Text('...')` | Text rendering |
| `Button("Title") { ... }` | `CupertinoButton(...)` or `ElevatedButton(...)` | Action button |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In the Swift & SwiftUI migration guide, the component equivalents table header incorrectly references 'Jetpack Compose' instead of 'SwiftUI'. This appears to be a copy-paste error from the Android/Kotlin guide.

Suggested change
| `Button("Title") { ... }` | `CupertinoButton(...)` or `ElevatedButton(...)` | Action button |
| SwiftUI | Flutter (Material 3) Equivalent |

Comment on lines +66 to +69
| **Android (Java)** | [reference/android.md](reference/android.md) | Activities/Fragments $\rightarrow$ Widgets, XML layouts $\rightarrow$ `Column`/`Row`/`Stack`, `RecyclerView` $\rightarrow$ `ListView.builder`, `AsyncTask`/`Handler` $\rightarrow$ `Future`/`Stream`, Room $\rightarrow$ Drift/Sqflite, Retrofit $\rightarrow$ Dio/Http, Pigeon/JNI. |
| **Android (Kotlin)** | [reference/kotlin.md](reference/kotlin.md) | `data class` $\rightarrow$ immutable models, `sealed class`/`interface` $\rightarrow$ Dart 3 sealed classes, Coroutines/`Flow` $\rightarrow$ `async`/`await`/`Stream`, Jetpack Compose $\rightarrow$ Widgets, Compose Modifiers $\rightarrow$ composition, Hilt/Koin $\rightarrow$ Riverpod/GetIt. |
| **iOS (Swift / SwiftUI)** | [reference/swift.md](reference/swift.md) | Swift `struct` $\rightarrow$ Dart models, `Codable` $\rightarrow$ `json_serializable`, Swift Concurrency (`Task`/`actor`) $\rightarrow$ `Future`/`Isolate.run()`, Combine $\rightarrow$ `Stream`, SwiftUI `View` $\rightarrow$ `StatelessWidget`, `@State`/`@Binding`/`@Observable` $\rightarrow$ `StatefulWidget`/`ChangeNotifier`. |
| **iOS (Objective-C)** | [reference/objective-c.md](reference/objective-c.md) | `@interface`/`@implementation` $\rightarrow$ Dart classes, Foundation types $\rightarrow$ Dart core types, GCD / Blocks $\rightarrow$ `Future`/Closures, `UIViewController` $\rightarrow$ `StatefulWidget`, `UITableView` $\rightarrow$ `ListView.builder`, direct C/ObjC FFI via `ffigen`. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using LaTeX math notation $\rightarrow$ in Markdown tables can lead to rendering issues depending on the Markdown parser used. It is cleaner and more universally supported to use the standard Unicode arrow .

Suggested change
| **Android (Java)** | [reference/android.md](reference/android.md) | Activities/Fragments $\rightarrow$ Widgets, XML layouts $\rightarrow$ `Column`/`Row`/`Stack`, `RecyclerView` $\rightarrow$ `ListView.builder`, `AsyncTask`/`Handler` $\rightarrow$ `Future`/`Stream`, Room $\rightarrow$ Drift/Sqflite, Retrofit $\rightarrow$ Dio/Http, Pigeon/JNI. |
| **Android (Kotlin)** | [reference/kotlin.md](reference/kotlin.md) | `data class` $\rightarrow$ immutable models, `sealed class`/`interface` $\rightarrow$ Dart 3 sealed classes, Coroutines/`Flow` $\rightarrow$ `async`/`await`/`Stream`, Jetpack Compose $\rightarrow$ Widgets, Compose Modifiers $\rightarrow$ composition, Hilt/Koin $\rightarrow$ Riverpod/GetIt. |
| **iOS (Swift / SwiftUI)** | [reference/swift.md](reference/swift.md) | Swift `struct` $\rightarrow$ Dart models, `Codable` $\rightarrow$ `json_serializable`, Swift Concurrency (`Task`/`actor`) $\rightarrow$ `Future`/`Isolate.run()`, Combine $\rightarrow$ `Stream`, SwiftUI `View` $\rightarrow$ `StatelessWidget`, `@State`/`@Binding`/`@Observable` $\rightarrow$ `StatefulWidget`/`ChangeNotifier`. |
| **iOS (Objective-C)** | [reference/objective-c.md](reference/objective-c.md) | `@interface`/`@implementation` $\rightarrow$ Dart classes, Foundation types $\rightarrow$ Dart core types, GCD / Blocks $\rightarrow$ `Future`/Closures, `UIViewController` $\rightarrow$ `StatefulWidget`, `UITableView` $\rightarrow$ `ListView.builder`, direct C/ObjC FFI via `ffigen`. |
| **Android (Java)** | [reference/android.md](reference/android.md) | Activities/Fragments Widgets, XML layouts Column/Row/Stack, RecyclerViewListView.builder, AsyncTask/HandlerFuture/Stream, Room Drift/Sqflite, Retrofit Dio/Http, Pigeon/JNI. |
| **Android (Kotlin)** | [reference/kotlin.md](reference/kotlin.md) | data class immutable models, sealed class/interface Dart 3 sealed classes, Coroutines/Flowasync/await/Stream, Jetpack Compose Widgets, Compose Modifiers composition, Hilt/Koin Riverpod/GetIt. |
| **iOS (Swift / SwiftUI)** | [reference/swift.md](reference/swift.md) | Swift struct Dart models, Codablejson_serializable, Swift Concurrency (Task/actor) → Future/Isolate.run(), Combine Stream, SwiftUI ViewStatelessWidget, @State/@Binding/@ObservableStatefulWidget/ChangeNotifier. |
| **iOS (Objective-C)** | [reference/objective-c.md](reference/objective-c.md) | @interface/@implementation Dart classes, Foundation types Dart core types, GCD / Blocks Future/Closures, UIViewControllerStatefulWidget, UITableViewListView.builder, direct C/ObjC FFI via ffigen. |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant