dart-lang / dart-lang/native

Chrome extension for documentation websites

Open
#1,240 0 comments 4 reactions 0 assignees View on GitHub
package:jni package:jnigen
Dominant language
Dart
Stars
275
Forks
144
Avg merge
2d 10h
Merged PRs (30d)
47

Description

**Problem**

JNIgen makes using Java and Kotlin APIs much easier. But Dart and Java/Kotlin are after all different languages with different syntax and semantics. While following documentations, users have to change the code mentally in their head, the changes are not much, but it means that they can't simply copy-paste the code examples from the documentation website.

**Example**

Take the documentation for the Android's MediaPlayer: https://developer.android.com/media/platform/mediaplayer

Codes are presented like so:

Screenshot 2024-06-27 at 14 24 42

Screenshot 2024-06-27 at 14 24 47

**Proposal**

Create a chrome extension that adds a new "Dart" tab:

Screenshot 2024-06-27 at 14 57 12

**Technical challenges**

* There can be a variety of different documentation websites
* The code can be incomplete, for example it can use `...` to show that a value can be filled by the user.
* Each code block might depend on other code blocks in the same page or different pages.

**Potential solutions**

* We can start from the android docs as a proof-of-concept.
* Gemini can help us make a solution for all websites with a documentation.

@liamappelbe – A similar approach can be used for Obj-C/Swift -> Dart. The same plugin can be used to translate Apple documentations.
@dcharkes – Pure C libraries could also use this.
cc/ @mit-mit @mariamhas @sethladd

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.